You'll also want to set ConnectionRetainMode to transaction, which
will
ensure that OpenJPA has a single connection for the duration of the
transaction.
Performing a persistence operation and then setting a savepoint is
enough to ensure you keep the same connection, regardless of the
setti
-
> From: Ritika Maheshwari [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 16, 2007 12:05 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: JDBC SAvepointManager does not work
>
> you were right by setting Savepoint after some persistence
> operation seems
> to f
you were right by setting Savepoint after some persistence operation seems
to fix the problem
thanks
ritika
On 1/16/07, Abe White <[EMAIL PROTECTED]> wrote:
Try performing a persistence operation (persisting an entity,
changing a persistent entity, deleting an entity, etc) before setting
the s
here is the persistence.xml
http://java.sun.com/xml/ns/persistence";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
version="1.0">
org.apache.openjpa.persistence.PersistenceProviderImpl
tutorial.ejb.Animal
tutorial.ejb.Dog
ejb.jpa.test.Customer
Try performing a persistence operation (persisting an entity,
changing a persistent entity, deleting an entity, etc) before setting
the savepoint. It could just be a bug with empty savepoints in
optimistic transactions (which aren't too useful anyway).
__
> Any input is this a bug or do I need to set auto-commit to
> false.If so how
> do I do that?
Normally, OpenJPA should set autocommit to false automatically. This
will not happen in certain situations (such as when OpenJPA is used in a
JTA context). Can you post your full configuration file so w
I have defined JDBC SavepointManager in my persistence.xml.I am running
against DB2 v9
Now a run a test client as follows
EntityManagerFactory emf = Persistence.
*
createEntityManagerFactory* ("dwtest");
EntityManager em = emf.createEntityManager ();
em.getTransaction().begin();
OpenJPAEnt