Hot topics
eBook shop
PDF edition of articles
Window id concept
An approach to leverage the use of the HTTP session
Web Framework Test and Analysis
Article series on web technologies with detailed reviews.
Hibernate eBook
A continuously updated book on Hibernate and Java Persistence
Recent Posts
- Blogging like a developer » 24 Feb 2010
- Window Id - Practical use cases » 18 Jan 2010
- GWT tip - better exception logging on the server » 18 Dec 2009
- Oh JavaFX, Oh JavaFX - why don't you progress? » 01 Dec 2009
- Devoxx 2009 Presentation - Selecting Web Technologies » 18 Nov 2009
- Window id - browser extension » 13 Nov 2009
- JSF 2 - evaluation and test » 01 Nov 2009
Java Persistence and Hibernate book
I publish a continuously updated ebook on Hibernate and Java Persistence for more than 3 years by now.
In 2007 I have translated this ebook for the well known German publisher Galileo Press into German language. It is available as paper book in German language and can be purchased in book shops or online at Galileo Press: http://www.galileocomputing.de/978?GPP=hibernate
Hibernate and Java Persistence eBook
Extensive, easy-to-follow introduction to Hibernate. It starts from the beginning and will still be a great help when you deal with performance tuning or Hibernate architecture.
It covers the current Hibernate version 3.3 and is constantly updated. It is full of examples showing you how things look like in real code. What do you get?
- eBook in PDF Format
- You can choose the number of updates of the book.
- The book has more than 240 pages. The format is Din A4.
- More than 20 sample projects
- More than 26 samples showing either mappings, Hibernate filter, named queries or other things
- About 60 mapping variants (1:1, 1:n, m:n, ternary, uni/bidirectional, components, entity associations, inheritance, ...)
- Mappings are explained for Annotations and XML including query examples
- Taking care of the developer and explain problem zones in detail
- Focus on best practices
- Real projects showing how to integrate Hibernate with other technologies and craft propper architectures
The book is provided as PDF and is lizenzed to a single person only.
Ordering can be done in my Online Shop. The table of content can be found below.
Any questions? Please contact me.
Explanations with complete working examples
Whenever something is explained you will find a complete sample application. If a specific mapping is demonstrated you can find a sample application, too. It shows how to insert, update, delete or query the classes included in this mapping.
Larger sample applications show the implementation of real applications using Hibernate in detail. Each application has an increasing complexity.
Cache configurations, deployment configurations for particular application server rounds off the examples.
Altogether the book provides about 20 mapping examples + variations, 4 real projects and some smaller projects showing a specific configurations.
Hibernate Project Setup
Examples to set up Hibernate projects with Eclipse and MyEclipse. Automatic generation of Hibernate mappings from existing databases.
Potential problems are investigated in detail
Hibernate has some problem zones where you can easily make mistakes. These are covered in detail to help you to avoid these problems. Some topics are LazyLoading, Session and transaction handling, optimistic concurrency and version handling.
Best Practices
One chapter is completely focussing on how to implement well designed Hibernate applications. DAO patterns and business layers are discussed. Pros and cons and the logic behind this structure are explained.
Focus on important features
Deliberately, I did not explain some rare concepts which I consider to be either not stable or very rarely used. Instead I referred to the corresponding chapters of the Hibernate reference - the documentation available with Hibernate. In my opinion the Hibernate reference is far too complex for people learning Hibernate. However, it is a valuable resource for people who already know Hibernate.
What this book is not?
The texts are short and frequently you are referred to parts of sample applications. If you prefer larger narrative parts you should not read this book.
Feel free to contact me and to comment on the book in the forum at http://www.laliluna.de
Sebastian Hennebrueder
Table of Content
1 Introduction to Hibernate 1
1 Where to find what? 1
2 Basic idea of Hibernate 2
3 A first Hibernate example 3
4 Using MyEclipse for Hibernate projects 15
5 Hibernate basics 20
6 Working with Objects 26
7 A more complex example – web application 33
2 Time to jump 60
3 Best practices and DAO 61
1 Data Access Objects DAO 61
2 Weaving the application structure 62
4 Session handling and Transactions 69
1 Hibernate Session 69
2 JTA versus JDBC Transactions 70
3 Transaction handling – default pattern 70
4 JDBC transactions with ThreadLocal 71
5 JTA transaction with a single database 72
6 JDBC or JTA with the Spring framework 73
7 Conversations and Session Lifetime 73
8 Concurrent Access 77
5 Integration with other technologies 81
1 Hibernate and Spring 81
2 Hibernate and Struts 87
3 JBoss integration with Hibernate Service Bean 88
6 Performance 93
1 Debugging to analyse the performance problem 93
2 Iterating through relations efficiently – load in batches 94
3 Iterating through relations efficiently – load all 95
4 Iterating through relations efficiently – load all with a query 95
5 Reporting queries 96
6 Iterating through large resultsets 97
7 Advanced topics 98
1 Hibernate Search 98
2 Lob with Oracle and PostgreSQL 100
3 Stored Procedures 106
8 Configuration 107
1 Connection Pools 107
2 Caches 111
9 Mapping by example 117
1 Annotation or XML mapping 117
2 Annotation mapping 118
3 XML Mapping 120
4 Primary key mapping 122
5 Relation mapping 129
6 Components = Composition mapping 172
7 Inheritance 186
8 Other mappings 207
10 Querying Data 208
1 HQL 208
2 Criteria Queries 214
3 Native SQL 218
11 Annotation Reference 220
1 Entity and table annotation 221
2 Primary key annotations 222
3 Column annotations 225
4 Special 227
5 Relation annotations 229
6 Join column annotations 230
7 Components 232
8 Inheritance 233
9 Not yet described 235
12 Index 236
