We are taking conection from IAS connection pool for our work.My doubt is this. If Bean A takes a connection from pool and set the attribute of the connectio object to con.setAutocommit(false).After commit he is returning the conection to pool. Now suppose Bean B gets the same connection from the pool and he is expecting the default attribute from the connection object.So he is not committing explicitly. I suspect that since bean A sets the attribute to Autocommit(false) the updation done by bean B will not be committed unless bean B explicitly commit it. Can anyone comment on this .Is my conclusion correct or not ?
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
The connection should return to it's default state once it has been returned to the pool.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Adam Hardy
Ranch Hand
Joined: Oct 09, 2001
Posts: 564
posted
0
If you do this for a test you can find out: - configure the pool for a certain number of connections - get that many connections from the pool all at once - set autocommit on them all - close them/release them all - get another connection, which you will know you definitely set autocommit on - call getAutoCommit() [ June 16, 2002: Message edited by: Adam Hardy ]
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.