1 Reply Latest reply on Jan 25, 2008 9:28 AM by adrian.brock

    MDB, Container managed and contradiction...

    sriniraghu

      Hi,

      I have an Issue.
      I use CMT MDB, talking to MQSeries.
      below is the ejb-jar.xml.

      <transaction-type>Container</transaction-type>

      <!-- This setting indicates if transactions are container -->

      <!-- managed or not. It must be consistent with the -->

      <!-- transaction-type of the MDB defined above. When set -->

      <!-- to true, the MDB code will randomly generates some -->

      <!-- failures to test the transactional behaviour. -->
      <env-entry>

      <env-entry-name>mdb/containerTransaction</env-entry-name>

      <env-entry-type>java.lang.Boolean</env-entry-type>

      <env-entry-value>true</env-entry-value>

      </env-entry>


      But this configuration had an issue, for big files which tool lots of time to process the transaction was getting rolled back by JBoss. Then I found the above comment that jBoss does this...

      I then modified the entry for "mdb/containerTransaction" to false and it worked fine for big messages, so no roll back this time. Below is the new configuration..

      <transaction-type>Container</transaction-type>

      <env-entry>

      <env-entry-name>mdb/containerTransaction</env-entry-name>

      <env-entry-type>java.lang.Boolean</env-entry-type>

      <env-entry-value>false</env-entry-value>

      </env-entry>


      Any one please tell me why does we have two entries to specify that its Container managed,
      what does the second parameter tell, what it means when I tell it as false??

      Is this analogous to required CMT and not-required CMT, as in the attached link??

      http://wiki.jboss.org/wiki/Wiki.jsp?page=WhatAreTheDifferentStrategiesForDeployingAnMDB

      Friends, please help me in resolving this, I have the fix but now I need to justify my client about the fix...

      Thanks in advance,

      Srini