Results 1 to 2 of 2

Thread: possible to use 2 transactionManagers ?

  1. #1

    Default 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. #2
    Join Date
    Mar 2005
    Location
    Landskrona, Sweden
    Posts
    505

    Default

    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.
    Mattias Arthursson
    Jayway AB (www.jayway.se)
    Spring-LDAP project member

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •