-
1. Re: Problem: Tx shared between threads: JBoss 2.4.3 & JSQLCo
davidjencks Apr 29, 2002 8:41 AM (in response to bdobby)Are you are using an XADataSource?
With xa, many transactions can use the same connection, one after the other. When you commit a particular transaction, you identify it by id so the db knows what work to commmit -- the work associated with that id, no matter which connection it came over.
Are there any actual errors or are you just surprised? -
2. Re: Problem: Tx shared between threads: JBoss 2.4.3 & JSQLCo
bdobby Apr 29, 2002 9:09 AM (in response to bdobby)1. We are using xa, because we may sometimes need to enlist multiple datasources in the tx.
2. How can a BMT bean commit by id? UserTransaction does not make the id available, and commit() takes no arguments.
3. We are getting application errors because, for example:
a. thread 1 creates an entity (BMT)
b. thread 2 runs a query (CMT) and its tx commits
c. because thread 2 used the same tx as thread 1,
the entity is now visible in the db before other
work on thread 1 is complete.