users@glassfish.java.net

Re: persist error - no active transaction on Remote Stateless Session Bean

From: <glassfish_at_javadesktop.org>
Date: Fri, 13 Mar 2009 08:43:35 PDT

Dear Sahoo,

I looked around and found that EclipseLink requires and additional property to integrate with container managed transactions.

I added the following property to the persistence.xml file:

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

Now it works as you described.

Regards,

Antonio

Plese visit the following link:

http://www.nabble.com/Problem-with-container-based-transactions-td15744929.html

Also, this is the "working fine" persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
  <persistence-unit name="myPU" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/myDataSource</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="eclipselink.cache.shared.default" value="false"/>
      <property name="eclipselink.target-server" value="SunAS9"/>
    </properties>
    </persistence-unit>
</persistence>
[Message sent by forum member 'antoniojsg' (antoniojsg)]

http://forums.java.net/jive/thread.jspa?messageID=336866