Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Transaction not committing for JTA Container Managed Transaction in Websphere using Eclipse Link

SaikatSen,
	Hi, likely the transaction controller specific to IBM WebSphere is not being used - because the target-server is not set.
	For example, when using WebSphere 7 - you need to set the following eclipselink.target-server property.

Missing...
<property name="eclipselink.target-server" value="WebSphere_7"/>


See container managed
http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebSphere_Web_Tutorial#persistence.xml_in_ejb.jar
Application managed
http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebSphere_Web_Tutorial#Persistence.xml_1.0_version

	Otherwise, it may be an issue with no changes being detected in the persistence context.
	Did you set both sides of any bidirectional relationship before you called entityManager.persist for example.

	Thank you
	/Michael O'Brien


-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of SaikatSen
Sent: February 13, 2012 12:45
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] Transaction not committing for JTA Container Managed Transaction in Websphere using Eclipse Link


This is the persistence.xml  I use for JTA Container Manager Transaction in
WAS.

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";>
	<persistence-unit name="PersService" transaction-type="JTA">
		<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
		<jta-data-source>jdbcAA</jta-data-source>
		<class>com.aa.persistence.asbo.Testing</class>
		<properties>
		<property name="eclipselink.logging.level.sql" value="FINE"/>
        <property name="eclipselink.logging.parameters" value="true"/>
        <property name="show_sql" value="true"/>
        </properties>
	</persistence-unit>
</persistence>

I use a stateless session bean with ContainerManaged transaction and inject
the  EntityManager using PersistenceContext.

@Stateless
@TransactionManagement(value=TransactionManagementType.CONTAINER)
public class Test implements TestRemote {

	@PersistenceContext
	private EntityManager entityManager;

The select statements work for me but 
 Inserts and updates dont seem to happen.
There is no error but the inserts and update just dont happen, i.e. the
transaction is not getting committed.

Any help on this would be really appreciable as this is critical for our
project.
-- 
View this message in context: http://old.nabble.com/Transaction-not-committing-for-JTA-Container-Managed-Transaction-in-Websphere-using-Eclipse-Link-tp33316707p33316707.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top