• 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Autonomous transaction in Oracle Using Java.

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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 ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic