Subject | Re: [Firebird-Java] Using multiple transactions with one connection handle |
---|---|
Author | Roman Rokytskyy |
Post date | 2009-10-20T07:22:58Z |
Hello Nikolay,
I would start from creating own GDS plugin (i.e. new JDBC subprotocol
handler), which will be discovered by Jaybird at runtime. This will
allow you to keep the changes separated from the main source tree.
The strategy you described sounds ok, but I will check, maybe there is a
simpler way to do this.
regarding a NPE under load, so I suspect there is a bug somewhere...
Roman
> I can think of the following approach:Need to think about it.
> 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 would start from creating own GDS plugin (i.e. new JDBC subprotocol
handler), which will be discovered by Jaybird at runtime. This will
allow you to keep the changes separated from the main source tree.
The strategy you described sounds ok, but I will check, maybe there is a
simpler way to do this.
> GDS implementation appears to be thread-safe in Jaybird so this would work.It is synchronized. But there is one or two tickets in the tracker
regarding a NPE under load, so I suspect there is a bug somewhere...
Roman