Brian,

Firstly, thanks for your prompt replies.

I am using Bitronix TX Manager.

It is now pretty obvious that User.userSessions collection node is NOT getting 
evicted from cache when login() Session flushes or tx commits. If your read is 
that Hibernate code should be evicting this collection node, then that's where 
the problem is. 

Could you please reference class/method where that decision (to evict) is being 
made? I will step through.

I wonder whether the fact that the collection node is created and should be 
evicted in the same Hibernate Session is relevant (and is source of the 
problem). Recall that login() essentially does this:

//check if user's already logged in

begin
session.open()

usr.getSessions().isEmpty() //AFAIK this populates cache with collection node 
with 0 elements

//insert new element into collection
usr.addSession(new UserSession()); //guess nothing is happening in cache here

//flush session
session.flush(); //as you say user.userSessions node should be evicted (but is 
NOT)

commit

Hmm....

Also, let's say the above is the problem. Why isn't this ever happening when 
only 1 user is involved, but happens for a random subset of users under load. 
If work on a given user is done by a distinct thread and there are no worker 
threads involved, why the different results? Perhaps something somewhere is 
forgetting to clear some ThreadLocal (HTTP threads are pooled by tomcat)

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

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

Reply via email to