ninguno2 [https://community.jboss.org/people/ninguno2] created the discussion

"Jboss and Ejb with interceptors"

To view the discussion, visit: https://community.jboss.org/message/719733#719733

--------------------------------------------------------------
I'm using Jboss 4.2.3 + hibernate 3.3 with jta; Jboss is managing my 
hibernatesession, that I obtain with sessionFactory.getCurrentSession().

I have a session bean that has several mutually exclusive methods (when one is 
executing the other should be block). I implement and interceptor using a 
RecurrentLock to get this working (attached through annotations to the session 
bean), and is working almost fine. 

But I need that this kind of "lock" interceptor is executed before the jta 
transacion starts and after the jta ends (and commit my hibernate changes), 
cause now is going the other way. Is there any way to get this working?

A simple schema if my problem it's not understood

Now
1-JTA tran. starts
2-Lock with custom interceptor
3-Ejb method called
4-Unlock with custom interceptor
5-jta tran. ends and commit changes.

I need
1-Lock with custom interceptor
2-JTA tran. starts
3-Ejb method called
4-jta tran. ends and commit changes.
5-Unlock with custom interceptor

Thanks in advance and sorry about me english!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/719733#719733]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to