Monday 15 July 2013

java - Call a method on successful transaction in EJB 2.0 -


I have been working with ejb 2.0 for the last 2 years on my application and suddenly I am struggling with a problem where I Just want to call a method before and after the transaction from the database.

I'm sure EJB 3.0 has an interceptor to deal with this problem but how to get any information about EJB 2.0.

Your Bean Can Implement the Interface I think it is too old and is already ebb 2.x is in.

Alternatively, javax.transaction.Synchronization and javax.transaction.TransactionSynchronizationRegistry that you can use to register callback.

discussion of the differences between the two; It seems incredible to use the session synchronization for SLSB, I would recommend to understand the related parts of the imagery how they work.

No comments:

Post a Comment