[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - State of @Transient instance variables

toni do-not-reply at jboss.com
Mon Aug 20 14:50:52 EDT 2007


I'm using a counter in an Entity Bean. It tracks the number of times a certain condition occurs. I have marked the counter with @Transient, because I only need it temporarily.

My questions is: 

If several threads look up the same Entity Bean (with the same primary key), does each entity bean get it's own counter or do they all share one instance variable of the counter?

Basically I need to know, whether or not the counter can be used reliably to compute some result for the duration of the current thread.

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075998



More information about the jboss-user mailing list