[jboss-dev-forums] [Design of JBoss Transaction Services] - UserTransactedStartedListener

adrian@jboss.org do-not-reply at jboss.com
Wed Oct 1 08:40:05 EDT 2008


Within JCA we have a requirement to be told when UserTransactions start
so we can do the "lazy enlist" processing:
http://wiki.jboss.org/wiki/LazyJCAEnlistment

The wiring of this processing is horrible. It is hardcoded into the CCM (CachedConnectionManager).

  |    
  |    protected void startService()
  |            throws Exception
  |    {
  |       tm = (TransactionManager) getServer().getAttribute(transactionManagerServiceName,
  |               "TransactionManager");
  |       TransactionSynchronizer.setTransactionManager(tm);
  |       ServerVMClientUserTransaction.getSingleton().registerTxStartedListener(this);
  |       EnterpriseContext.setUserTransactionStartedListener(this);
  |    }
  | 
  |    protected void stopService() throws Exception
  |    {
  |       ServerVMClientUserTransaction.getSingleton().unregisterTxStartedListener(this);
  |       EnterpriseContext.setUserTransactionStartedListener(null);
  |    }
  | 

As you can see this has a number of problems:

1) The CCM has to be configured with a transaction manager. Something we
want to make optional in the web-profile

2) It has to know implementation details of the EJB2 container

3) It doesn't know about EJB3 or any other supplier of a UT implementation

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

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



More information about the jboss-dev-forums mailing list