Announcement Announcement Module
No announcement yet.
JTA Transactions in Weblogic 9 with JpaTransactionManager Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JTA Transactions in Weblogic 9 with JpaTransactionManager

    I'm using Spring 2m2 in Weblogic 9 and I'm trying to get my DAO's that extend JpaDaoSupport to participate in JtaTransactions. I'm using Hiberate 3.1 and their latest JPA implementation. If I use the configuration listed below, and I create a transaction using the PlatformTransactionManager, my DAOs work correctly. If I switch to the WebLogicJtaTransactionManager, my DAOs fail stating that no transaction is active. Is this the correct way to configure the transaction manager to use Jta in weblogic using Hibernate?

    Below is my application context XML:

    <?xml version="1.0" encoding="UTF-8"?>


    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityMana gerFactoryBean">
    <property name="persistenceProviderClass" value="org.hibernate.ejb.HibernatePersistence"/>
    <property name="entityManagerName" value="MA"/>
    <property name="jpaProperties">
    <prop key="hibernate.dialect">org.hibernate.dialect.Orac le9Dialect</prop>
    <prop key="hibernate.ejb.autodetection">class</prop>
    <prop key="hibernate.show_sql">true</prop>
    <property name="exposeTransactionAwareEntityManagerFactory" value="true"/>

    <!--<bean id="transactionManager" class="org.springframework.transaction.jta.WebLogi cJtaTransactionManager"/>-->

    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionM anager">
    <property name="entityManagerFactory" ref="entityManagerFactory"/>
    <property name="dataSource" ref="dataSource"/>

    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="OraclePool"/>


  • #2
    JTA Transactions in Weblogic 9 with JpaTransactionManager

    Hi, I was just wondering if you found an answer to your question ?
    We are planning to use the same solution (JPA with Spring 2M2 on WLS 9.1 hooked to the WLS JTA provider). It would be good to know if there is some incompatibility.



    • #3
      No not yet. From what I can tell, it seems that the EntityManagerFactory must be managed by Weblogic in order for it to take part in JTA transactions. I haven't been able to find any info on how to set this up though.