Announcement Announcement Module
Collapse
No announcement yet.
UserTranaction not found during Jboss MDB Deployment Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • UserTranaction not found during Jboss MDB Deployment

    We have a MDB that extends Spring's AbstractJmsMessageDrivenBean and we pass it the list of spring context files for building the Application Context.

    During this building, services are createed that depend on the JtaTransactionManager from Spring. The JtaTransactionManager works fine in our Web app. But when JBoss does its first create of our MDB, Spring throws an exception that it can't find the UserTransaction at the normal jndi location.

    Anyone know why it would work from within the Webapp, but not from the MDB?

    Thanks,
    Patrick

  • #2
    JBoss has a differrent JNDI name for the UserTransaction: you have to explicitly set the userTransactionName property of the JtaTransactionManager to UserTransaction in the applicationContext:
    Code:
    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
            <property name="userTransactionName"><value>UserTransaction</value></property>
    </bean>
    Hope this helps
    Jens

    Comment


    • #3
      Originally posted by jensv
      JBoss has a differrent JNDI name for the UserTransaction: you have to explicitly set the userTransactionName property of the JtaTransactionManager to UserTransaction in the applicationContext:
      Code:
      <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
              <property name="userTransactionName"><value>UserTransaction</value></property>
      </bean>
      Hope this helps
      Jens
      Well, I can understand that, but when our code is loaded from a Web App ( the exact same applicationContext.xml file) it works fine. JtaTransactionManager finds UserTransaction. I'm still trying to figure out what's going on in the MDB.

      Patrick

      Comment

      Working...
      X