O'Reilly logo

Mastering Hibernate by Ramin Rad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scalability

Large enterprise applications that serve large number of users, without a doubt, have to be able to scale to keep up with the demand. There are various ways of accommodating scalability requirements. Let's discuss those here.

Clustering

When working in a clustered environment, you need to be aware of how it could impact Hibernate. One thing that could be impacted by deploying in a clustered environment is identity generation. If you use an increment strategy for ID generation even in a thread-safe mode, you are still not guaranteed uniqueness. Even if you use UUID using java.util.UUID, the likelihood of collision is still there, though very minimal.

Another consideration is when dealing with detached entities. If you keep detached entities ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required