Yes you are right that each thread has its own MDB instance and each of them 
has their own context, but because the container have the access to the context 
too, and roll it back in certain cases , that makes it hard to control it 
unless I synchronize it.

For example, the following happened chronologically:

1. onMessage() was invoked
2. Connection# 1 was obtained to make query as part of the message processing
3. Query is made and returned
4. Container roll back context
5. Connection# 2 was 'attempted' to be obtained to make an update
6. Because context has been rolled back, exception thrown because No. 5 is not 
aware of the context roll back (please let me know if there's a way for 
Hibernate to be aware of it elegantly)


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

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

Reply via email to