Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » problem with rollback
problem with rollback [message #76774] Thu, 31 July 2003 20:02
audrey
Messages: 3
Registered: October 2001
Junior Member
Hi everyone,

I have a servlet that has to update some DB tables, post a request to a remote server, and depending on the server's reponse, either commit or rollback the transaction.

The flow is as follows:
1/ Lookup datasource from jndi context
2/ retrieve DB connection
3/ start transaction by setting autoCommit to false
4/ use a callableStatement to execute a stored procedure. The stored procedure updates some tables in the Central Database as well as in a remote database through a Database link.
5/ open an SSLSocket to the remote server and send the post request
6/ depending on the response, commit or rollack transaction.

The problem is that only the updates in the central database are being rolled back, the ones in the remote database are still there.

Is it that I should use a non-emulated datasource instead of the Oracle 9ias default emulated DS. I have read the oracle docs on non-emulated DS, and it says I have to specify a DBlink to the remote DB in the datasource config file. What confuses me is that my servlet code know nothing about the remote database, it just calls the stored procedure that will then update the remote DB. Does it mean that I have to connect directly to the remote DB and perform the updates there instead of having it in the stored procedure.

Any help would be greatly appreciated. THANKS!

Audrey
Previous Topic: App server installation and management
Next Topic: "A runtime exception occurred while setting nValidationOID null"
Goto Forum:
  


Current Time: Fri Apr 19 03:29:00 CDT 2024