Subject | Re: [Firebird-Java] Using multiple transactions with one connection handle |
---|---|
Author | Evgeny Putilin |
Post date | 2009-10-20T07:33:34Z |
Hi Nikoly
WBR Evgeny Putilin
> We need to be able to work with multiple concurrent transactions over aI think extends java.sql.Connection interface is not good idea. Form my point of view you can create new class implements java.sql.DataSource interface. The DataSource can open one attachment to database and create many transactions by call DataSource.connect() method. If you use forkConnection you should manage attachment handle for multiply connections, what will doing with forked connections if you close first connection?
> single connection.
> Do you have recommendations on how this should be implemented in Jaybird?
>
> I can think of the following approach:
> 1) declare forkConnection method in FirebirdConnection
> 2) implement method in AbstractConnection which would return null (to
> avoid unknown/untested effects with JCA/SPI)
> 3) implement real method in FBConnection which would make a deep copy of
> FBManagedConnection and GDSHelper (except copying the existing
> transaction handle so new transaction would be started)
WBR Evgeny Putilin