Announcement Announcement Module
Collapse
No announcement yet.
possible to use 2 transactionManagers ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • possible to use 2 transactionManagers ?

    Hi,

    I've been using the ContextSourceAndDataSourceTransactionManager to take care of the ldap and DB transactions.
    <bean id="transactionManager" class="org.springframework.ldap.transaction.compen sating.manager.ContextSourceAndDataSourceTransacti onManager">
    <property name="dataSource" ref="dataSource" />
    <property name="contextSource" ref="contextSource" />
    </bean>

    Now I'm also using a MDB which normally works with a WebLogicJtaTransactionManager :
    <bean id="transactionManager" class="org.springframework.transaction.jta.WebLogi cJtaTransactionManager" >

    Is it possible to use 2 TransactionManagers in the same applicationContext ?
    Or is this not the correct way to do this ?

    Thanks.

    Kristof

  • #2
    I guess it will be possible to have two separate transaction managers, you'll just not be able to use both of them at the same time. You'll need to specify which one to use on which beans.

    If you are in a Jta transaction originating from a MDB you won't be able to nest an LDAP transaction in there. The ideal situation would of course be if the LDAP transactions were XA compliant. Unfortunately this is currently not the case.

    Comment

    Working...
    X