Announcement Announcement Module
Collapse
No announcement yet.
JTA Transactions in Weblogic 9 with JpaTransactionManager Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">

    <beans>

    <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">
    <props>
    <prop key="hibernate.dialect">org.hibernate.dialect.Orac le9Dialect</prop>
    <prop key="hibernate.ejb.autodetection">class</prop>
    <prop key="hibernate.show_sql">true</prop>
    </props>
    </property>
    <property name="exposeTransactionAwareEntityManagerFactory" value="true"/>
    </bean>

    <!--<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>

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

    </beans>

  • #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.
    Thanks.

    Wito

    Comment


    • #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.

      Comment

      Working...
      X