[Design of JBoss Transaction Services] - UserTransactedStartedListener
by adrian@jboss.org
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
16 years, 5 months
[Design of JBoss Transaction Services] - Re: TransactionManager and AS' ServiceBindingManager
by bstansberry@jboss.com
"jhalliday" wrote :
| - Use a value of '0', which tells the socketProcessId to use a random free port. Upside: probably the easiest fix, since it's a one line change in bindings.xml Downside: odd semantic change when 0 is offset (100, 200, etc) by the SBM - it's now fixed no longer random. The offset would also need to be greater that 1024 or you wind up trying to bind low numbered ports.
The SBM supports configuring certain beans to ignore the "increase ports-default by 100" approach:
|
| <!-- The ports-01 bindings are obtained by taking ports-default and adding 100 to each port value -->
| <bean name="Ports01Bindings" class="org.jboss.bindings.impl.PortOffsetServiceBindingSet">
|
| <constructor>
| <parameter><inject bean="PortsDefaultBindings"/></parameter>
| <parameter>100</parameter>
| <!-- Bindings to which the "offset by 100" approach can't be applied -->
| <parameter>
| <set>
| <!-- Can't apply an offset to an ephemeral port value, so we redeclare this one. -->
| <bean class="org.jboss.bindings.ServiceBinding">
| <constructor>
| <parameter>jboss:service=invoker,type=pooled</parameter>
| <parameter>${jboss.bind.address}</parameter>
| <parameter>0</parameter>
| </constructor>
| </bean>
| </set>
| </parameter>
| <!-- Default host name -->
| <parameter>${jboss.bind.address}</parameter>
| </constructor>
| </bean>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179771#4179771
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179771
16 years, 5 months