Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

NO commit() in code, but getting "Operation Connection.commit is not allowed during a global transa"

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All-

I'm not calling commit() anywhere in my code, but am getting this error:


I'm able to read an object from DB, but not persist. Any help would be greatly appreciated.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you find a resolution to this yet?
I'm fighting the same issue, slightly different env (WAS 7.0.0.13 + jpa 2.0 FeP, sqlserver 2005)
 
Code Incomplete
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a solution posted in another forum:
http://www.ibm.com/developerworks/forums/thread.jspa?threadID=260658

In my case, the solution amounted to setting a custom property on the XA datasource
property: nonTransactionalDataSource
value: true

this seems counter-intuitive, since I'm specifically trying to perform transactions with this datasource...

I have my project configured to the point where I can comment/uncomment sections in 2 files to swap back and forth
between Hibernate and OpenJPA as the persistence provider. This setting was not required for Hibernate, but it does not
seem to negatively affect the Hibernate configuration.
 
Code Incomplete
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please note that the environment for the previous posted solution
was different from the originally posed problem.
My environment is:
WAS 7.0.0.13 + JPA 2.0 FeaturePak
Spring 3.x
OpenJPA 2.0 (snapshot version which comes with the feature pak)

Also swapped the same application to use Hibernate 3.5-FINAL
Using container-managed transactions

Hopefully the same will work for the WAS 6, JPA 1.0 environment
 
They weren't very bright, but they were very, very big. Ad contrast:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!