Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLException from web service, but works from controller

Status
Not open for further replies.

MoreFeo

Technical User
Nov 29, 2002
547
ES
Hi, we're working with Weblogic Workshop 8.1, with Sun JDK 141_03.
We're having some trouble with a web service, and I don't know why it happens.

We have to include in our application some code from another company (we've got a jar and the source files).
This code uses a data source to a MS SQL database.
We need to create a web service (jws file) and call it from there, so other apps can call it.

If we call this code from the Controller, everything works fine, it connects to the SQL Server thru the data source, executes some inserts, does commit and closes the connection.
But if we call this code from the jws file, when it tries to do the commit it gives a java.sql.SQLException, saying: "Cannot call Connection.commit in distributed transaction. Transaction Manager will commit the resource manager when the distributed transaction is committed."

I don't know why this happens, is this normal behaviour for a web service? Can somebody help us?

Thanks.
 
Solved it, when creating the data source we had to uncheck the "Honor Global transactions" option.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top