• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Autonomous transaction in Oracle Using Java.

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

i got the connection using java.sql.Connection class.

i need to commit only a part of transaction and remaining thing is based on condition, i got information that, through Autonomous transaction we can archive this.

but, i dont know how to do this, please help me.

Bennet Xavier.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I understand what you are asking. pseudo code could be something like this:

 
Bennet Xavier
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply.

please see the steps below...

1. Get the connection with auto commit false.

2. Perform database operation and don't commit.

3. Perform database operation Again and commit.(this place i need only step 3, database operation to be committed not step 2)

4. Perform database operation Again and don't commit.

5. roll back the connection.(step 2 and step 4 should be rolled back and nothing should happen to step 3.)

i need to achieve this with only one connection. how to do this.

If i am not clear, please let me know..

Thanks,

Bennet Xavier
 
Agador Paloi
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That helps, You want to do the steps using pl/sql autonomous stored procedures? Do you know how to write an autonomous
pl/sql procedure ?
 
Uh oh, we're definitely being carded. Here, show him this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic