5 Replies Latest reply on Oct 27, 2005 9:30 AM by sile_98

    Integration JOTM with JBoss

      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

        • 1. Re: Integration JOTM with JBoss

          Which part of "DO NOT POST USER QUESTIONS HERE"
          didn't you understand?

          • 2. Re: Integration JOTM with JBoss
            japaz

            I've implemented the necessary classes to use Jotm as TransactionManager for Jboss, but with the following restrictions:
            It doesn't implement context propagation, I'm working on it.
            It works OK in 3.2.x
            For 4.x I have implemented a simple JBossXATerminator, but I have not tested all JCA functionality.

            If you want I can provided you the sources and the needed configuration files

            I think that your error have to be with carol configuration.

            • 3. Re: Integration JOTM with JBoss

              That would be greatly helpful. Can you please post them to knvms@hotmail.com

              Advance thanks
              M

              • 4. Re: Integration JOTM with JBoss
                floechen

                Could you please send me the source code too, ideally with a short
                read-me describing how to set up JOTM with your adapter and JBoss 4.0.x (I'm using 4.0.1 SP1)? Were you successful in eliminating the restrictions (missing context propagation, JBossXATerminator)?

                Thank you in advance
                Florian

                mail: florian at steinsiepe dot ch

                • 5. Re: Integration JOTM with JBoss
                  sile_98

                  I have the same need (after trying and failing), so if somebody would like to help me please send the code and eventually the instructions at

                  sile_98 at easynet dot ro

                  Thank you.