Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Controlling Transaction commit when using sqlProcedure

adfLearnerFeb 21 2013 — edited Feb 26 2013
Please suggest me if the below usecase can be achieved :

When using sqlProcedure application will not be passivation safe, so we need to do the SqlProcedure and Commit call in same request.

1. SqlProcedure AddPersonProc adds a person in Person table and returns the Success , Warning and Failure status with list of Message and Rule in case of Warning and Failure.
2. Now based on the different status, I want to do following :
a) Success - Commit . ( Pretty Easy )
b) Error - RollBack ( Pretty Easy ) .. and show the Errors.
c) Warning - Show Warnings with AcceptAndContinue and Cancel button ( This i have done ).
On Cancel - Roll Back ( Pretty Easy )
On AcceptAndContinue - Commit the new record to the database.

Problem faced : For warning ... 1) if I do the rollBack... then my VO looses all data.
2) If I don't do rollback and simply call AM commit then there is no data committed in case AM passivate ( point highlighted in bold )
3) If I don't do rollBack and again calls SqlProcedure AddPersonProc and then commit then two records inserted in case AM doesn't passivate .

Please suggest how do I implement this with available SqlProcedure AddPersonProc .

Thanks,
Rajdeep

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 26 2013
Added on Feb 21 2013
4 comments
445 views