Subject Re: [Firebird-Java] Using multiple transactions with one connection handle
Author Evgeny Putilin
Hi Nikoly

> We need to be able to work with multiple concurrent transactions over a
> 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)
I 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?

WBR Evgeny Putilin