Dssd
Dssd

Reputation: 1

How to get the id of which database transaction?

I have a java web app that create two database transaction about the same time.

Bit somehow the 2nd db truncation is actually using back the first db transaction connection.

How can I get the id of which database transaction is being used and investigate further?

Upvotes: 0

Views: 227

Answers (1)

Ryan Stewart
Ryan Stewart

Reputation: 128899

At the JDBC level, a simple transaction only consists of getting a Connection, turning autocommit off, creating and executing some Statements, and committing. If you try to run "two transactions" on the same connection in this manner, they'll obviously step on each other. Your question is vague, but it sounds like you might be experiencing something like this. Give more detail, and someone might be able to help you out more.

Upvotes: 1

Related Questions