Subject | Re: [Firebird-Java] Re: OpenOffice, Jaybird and Embedded Server |
---|---|
Author | Mark Rotteveel |
Post date | 2011-12-17T11:06:50Z |
On 16-12-2011 19:06, Roman Rokytskyy wrote:
different Statement is executed on the same connection in autocommit.
I looked through the javadoc and the JDBC 4.1 spec, but as far as I can
see it doesn't actually say that the resultset should be closed if a
different(!) Statement is executed in autocommit.
It just says that every query should execute in its own transaction and
that the transaction for a SELECT should commit if the resultset is
closed. As Firebird supports multiple transactions on one connection, it
should at least technically be possible.
I am going to dive into this for Jaybird 2.3, because as far as I can
see other drivers do not have this problem with OpenOffice.
native or embedded driver.
--
Mark Rotteveel
>>> There appears to be a separate driver plugin in Jaybird forI believe the actual problem is that Jaybird closes the resultset if a
>>> OpenOffice,
>>> because OpenOffice (apparently) does some things wrong with
>>> statements
>>> and/or resultsets. This is however a variant of the pure-java driver
>>> and
>>> won't work with embedded.
>>>
>>> I - unfortunately - think you are out of luck here.
>>
>> I am going to investigate this further, because a quick search does
>> not
>> turn up posts that other drivers have problems with this.
>
> The issue is in autocommit mode - OO opens a result set and while
> looping in the result set it tries to execute the statement. According
> to the JDBC specs the result set has to be closed, which our driver
> does. That is where OO crashes with SQLException.
different Statement is executed on the same connection in autocommit.
I looked through the javadoc and the JDBC 4.1 spec, but as far as I can
see it doesn't actually say that the resultset should be closed if a
different(!) Statement is executed in autocommit.
It just says that every query should execute in its own transaction and
that the transaction for a SELECT should commit if the resultset is
closed. As Firebird supports multiple transactions on one connection, it
should at least technically be possible.
I am going to dive into this for Jaybird 2.3, because as far as I can
see other drivers do not have this problem with OpenOffice.
> The plugin provides workaround for this and it should work with allThe OOGDSFactoryPlugin uses the JavaGDSImpl, so it will not work for the
> driver types.
native or embedded driver.
--
Mark Rotteveel