Hi guys,
I have a problem and I need some help to solve it:
It could be possible to propagate the current transaction over RMI to another module in the same instance server? The application uses Spring 3.1 + JPA + Weblogic.
The scenario:
Module A updates some data on the database then calls RMI service on module B and updates some data on the database. All of this in a single transaction. So, if any exception is thrown, both updates on the database are rolled back.
I've read that is supposed to work with Weblogic but it's not working for me.
My XML:
Thanks,
I have a problem and I need some help to solve it:
It could be possible to propagate the current transaction over RMI to another module in the same instance server? The application uses Spring 3.1 + JPA + Weblogic.
The scenario:
Module A updates some data on the database then calls RMI service on module B and updates some data on the database. All of this in a single transaction. So, if any exception is thrown, both updates on the database are rolled back.
I've read that is supposed to work with Weblogic but it's not working for me.
My XML:
HTML Code:
<jee:jndi-lookup id="dataSource" jndi-name="${dataSource.jndiName}" />
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>
<property name="JpaPropertyMap">
<map>
<entry key="hibernate.globally_quoted_identifiers" value="true" />
<entry key="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup" />
<entry key="hibernate.transaction.flush_before_completion" value="true" />
<entry key="hibernate.transaction.auto_close_session" value="true"/>
<entry key="hibernate.current_session_context_class" value="jta"/>
<entry key="hibernate.connection.release_mode" value="auto" />
</map>
</property>
</bean>
<bean class="org.springframework.orm.hibernate4.HibernateExceptionTranslator" />
<tx:annotation-driven />
<tx:jta-transaction-manager />
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="*" rollback-for="Throwable" />
</tx:attributes>
</tx:advice>