Hello,

I am working on an application which accepts "plugins". This is accomplished 
with an interface which the plugins implement. The plugins are invoked from a 
stateful session bean using container managed TXs. The TX demarcation for the 
calling method is "Required". Some of the client plugins will be EJB based 
while others will use JDBC. 

How do I ensure everything takes place in the same transaction? 

To further complicate matters, the plugins manipulate the file system. The 
application requires the file system to be kept in a consistent state. The 
plugins need to be notified of the outcome of the TX (commit or rollback) and 
clean-up accordingly. What's the best way to do this?

Should the calling EJB implement SessionSynchronization and notify the plugins 
in after afterCompletion? Should my plug-in API extend Synchronization so I can 
register the plugins with the TX manger some how? What about the non-EJB, JDBC 
case? (I cannot use setAutoCommit(), commit(), etc.. because the TX context 
follows the thread).

My current implementation has begin(), comit(), and rollback() methods on the 
plugins. I have the plugins using new user transactions which I notify. 
However, this creates locking problems if one of the plugins references an row 
locked by the outer TX. 

Your suggestions are greatly appreciated!


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

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


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to