• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JT400 and commitment control

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using jt400 database driver to connect to AS400 database. Using jt400 I am calling a stored procedure in AS400.

When I start commitment control in stored procedure it says commitment control is already active. Whereas I have disabled autocommit and transaction isolation from Java end.

I am looking for a solution to make commitment control work inside stored procedure.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want a transaction inside your stored procedure, then turning off commitment control isn't the way to do that. Commitment control is simply the background process which manages transactions. So don't turn it off. (And don't turn it on, either, it should already be on for files which you are updating with that driver.)

Sorry, I don't know how to start a transaction inside your stored procedure.
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


If you want a transaction inside your stored procedure, then turning off commitment control isn't the way to do that. Commitment control is simply the background process which manages transactions. So don't turn it off. (And don't turn it on, either, it should already be on for files which you are updating with that driver.)


This means we can not turn off the autoCommit inside stored procedure.
Is this restriction is for stored procedure only ?
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Writing START TRANSACTION; turns auto-commit off until the transaction is completed.
Writing COMMIT; at the end of the transaction turns auto-commit back on. As Paul has already told you, leave the auto-commit status alone.
 
reply
    Bookmark Topic Watch Topic
  • New Topic