File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes L1 and L2 Caches in Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "L1 and L2 Caches in Hibernate" Watch "L1 and L2 Caches in Hibernate" New topic

L1 and L2 Caches in Hibernate

Chandra shekar M
Ranch Hand

Joined: Dec 20, 2006
Posts: 155

In L1 Hibernate cache we can create multiple transactions in a single session object so we are sharing session between multiple transactions. All these transactions are managed by us. But say we have JBoss now which has JTA enabled now what happens? I think we have one transaction created by the Container and In code we have our own transactions still the session can be seen only by the child transactions created by us. But not between the two different master transactions created by the container For this we have to use L2 cache.

Is this Correct?

I agree. Here's the link:
subject: L1 and L2 Caches in Hibernate
It's not a secret anymore!