Hi all,

I'm afraid, I have to ask a basis question...
I set up JBossCache as a 2nd-level cache for (hibernate) my ejb3-entities. I 
can see, that the cache is filled, by monitoring the mbean in jmx-console.

Now my question: A stateless (!) sessionbean uses an transactional 
EntityManager. A client calls sessionBean#findEntityWithId(...), then the SLSB 
returns (and with that ends the transaction). After that the client calls the 
same method with same parameters (i.e. "load" the same entity by its ID). 
Will the second call hit the cache or will the database accessed, because 
"after the first transaction, the cache will be discarded"?

In other words, does the 2nd-level cache lives longer than transaction 
boundaries?

Thanks for (this basic) information.
Carsten

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224567#4224567

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224567
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to