Hi,
On 2001.06.26 23:30:32 -0400 marc fleury wrote:
> |2 entity beans. 2 connection pools(but same database), each connection
> pool
> |is configured to use a certain JDBC isolation level. Entity 1 is attach
> to
> |pool 1, Entity 2 is attached to pool 2.
> 
> yuck...
> 
> I still don't have a clear answer to
> 
> what we do = (does a jdbc connection support setting isolations level on
> the
> fly)? we use one pool and the container sets levels : we are stuck with
> many
> pools
> 
Well, a jdbc connection certainly supports setting isolation levels.  I
think when you can do it depends on the db.  I think generally it only
makes sense to change when there is no uncommitted work (between
transactions), even though apparently some dbs (someone said informix) may
let you change within a transaction.

> marcf
> 
> PS: of course many pools works but yuck!
> 
> |
> |1. Start JBoss transaction
> |2. Access Entity1.  A connection is grabbed from pool 1,
> |connection1.setIsolation(blah blah),
> |3. access entity2.  A connection is created from pool 2,
> |connection2.setIsolation(blah blah)
> |4. End JBoss transaction.  commit is called on connection 1 and
> connection
> |2.
> |
> |This should work, shouldn't it?
> |

Well, maybe. To make this work, you require true xa capable drivers, and
you need to use real 2pc, not the fake stuff from jbosspool wrappers.  The
wrapped drivers will give you 2 independent conncurrent transactions.

xa drivers, depending on their sophistication, may or may not be able to
recognize that the 2 connections are to the same resource manager and use
just one branch, or they may think they are separate resources and use 2pc.
 It is also possible that the driver would loosely couple (the branches
connot see each others work) or tightly couple (the branches can see each
others work) the branches.  If you have an xa driver, I would like to know
what it does in this situation. 

thanks

david jencks

> |Regards,
> |
> |Bill
> |
> |
> |
> |_______________________________________________
> |Jboss-development mailing list
> |[EMAIL PROTECTED]
> |http://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
> 


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to