Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » INSERT outside of transaction?
INSERT outside of transaction? [message #540898] Thu, 17 June 2010 10:56 Go to next message
Marc Fargas is currently offline Marc Fargas
Messages: 22
Registered: May 2010
Junior Member
Hi there,
I amb trying to do strange things with EclipseLink and until I solve the issue linked I need to do a EntityManager.persist() *outside* of transaction control:

//em.getTransaction().begin();
em.persist(objet);
//em.getTransaction().commit();


If I comment out the begin/commit part things *seem* to work, but nothing gets inserted into the database.

Note that I am connecting to a FoxPro table, so it isn't Transaction capable anyway.

How can I Persist() the object wihout a begin()/commit() cycle?

Thanks,
Marc
Re: INSERT outside of transaction? [message #541327 is a reply to message #540898] Sun, 20 June 2010 02:46 Go to previous messageGo to next message
Rolf Paulsen is currently offline Rolf Paulsen
Messages: 14
Registered: June 2010
Junior Member
Hi Marc,
did you try
em.flush();

Greetings
Rolf
Re: INSERT outside of transaction? [message #541722 is a reply to message #541327] Tue, 22 June 2010 06:24 Go to previous message
Marc Fargas is currently offline Marc Fargas
Messages: 22
Registered: May 2010
Junior Member
Didn't. Thanks for the tip Smile
Previous Topic:Unsatisfied import package javax.activation_0.0.0
Next Topic:<transformation> tag documentation?
Goto Forum:
  


Current Time: Sat Aug 30 20:41:26 EDT 2014

Powered by FUDForum. Page generated in 0.06973 seconds