I've followed the documentation to attach a foreign TM (JOTM) to JBoss but with
not that much luck: Here are the steps
1. Created MBean -->
JOTMTransactionManagerService extends ServiceMBeanSupport implements
ObjectFactory,
| JOTMTransactionManagerServiceMBean
2. In the startService, :
i. Created respective objects
ts = new Jotm(true, true);// TMService
| tm = ts.getTransactionManager(); //TransactionManager
| ut = ts.getUserTransaction(); // user tx
|
ii. Bound the TPCImpl and TPCFactory along wiht TM
| bindRef(JNDI_NAME,"org.objectweb.transaction.jta.TransactionManager");
|
bindRef(JNDI_IMPORTER,"com.mizuho.london.cmi2.framework.transaction.TPCImporter");
|
bindRef(JNDI_EXPORTER,"com.mizuho.london.cmi2.framework.transaction.TPCFactory");
|
(Note: TPCImporter and TPCFactory implement Jboss's interfaces with null return
implementations. No specific code in there yet.)
3. in the conf/jboss-service.xml file, I commented the in memory TM and added
the following code for my JOTM Tx Manager.
<mbean code="framework.transaction.JOTMTransactionManagerService"
| name="jboss:service=TransactionManager"
| xmbean-dd="resource:xmdesc/JOTMTransactionManagerService-xmbean.xml">
| <attribute name="TransactionTimeout">300</attribute>
| <attribute name="GlobalIdsEnabled">true</attribute>
| <depends
optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
| </mbean>
|
When the server started, it's complaining about JDBCStateManager:
2005-04-06 13:47:41,492 TRACE
[framework.transaction.JOTMTransactionManagerService] Constructing
| 2005-04-06 13:47:41,570 DEBUG [org.jboss.util.NestedThrowable]
org.jboss.util.NestedThrowable.parentTraceEnabled=true
| 2005-04-06 13:47:41,570 DEBUG [org.jboss.util.NestedThrowable]
org.jboss.util.NestedThrowable.nestedTraceEnabled=false
| 2005-04-06 13:47:41,570 DEBUG [org.jboss.util.NestedThrowable]
org.jboss.util.NestedThrowable.detectDuplicateNesting=true
| 2005-04-06 13:47:41,570 ERROR [org.jboss.mq.sm.jdbc.JDBCStateManager]
Starting failed jboss.mq:service=StateManager
| org.jboss.mq.SpyJMSException: Error creating connection to the database.; -
nested throwable: (java.lang.NullPointerException)
| at
org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.<init>(JDBCStateManager.java:542)
| at
org.jboss.mq.sm.jdbc.JDBCStateManager.initDB(JDBCStateManager.java:432)
| at
org.jboss.mq.sm.jdbc.JDBCStateManager.startService(JDBCStateManager.java:399)
| at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
| at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java
| etc etc..
It looks like the in the JDBCStateManager code where it calls the begin method
on tm (tm.begin()), the tm is null. I'm not quite sure though.
If I'm doing wrongly, can anyone advise me? If not, can anyone tell me what's
going on?
(note that the I've serialised JOTM's TransactionFactoryImpl and bound it to
JNDI)
I could see the TransactionManager and TPC stull bound royally to the JNDI
though!
Thanks
/M
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872858#3872858
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872858
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development