Subject Re: [Firebird-Java] Re: XA driver pooling issue
Author Roman Rokytskyy
> 8.1 sp5

Ok. I will check what 8.1 I have at home and will test it.

> Could you please also fix the spelling of the error message ? It's not
> very good english. :-)

Sure. :)

> I tried both and they give the same result. I've chosen this one for
> no particular reason.

Ok.

> Is there something I can do to help you reproduce the issue ? I'm very
> eager to get a fully working XA-enabled Firebird.

Hardly. The only way to find the error is to start WL in debugger and check
what is called when. Sure, one could try to analyze logs, but with debugger
should be easier.

> Some other clue: this log appears in the WLS console on startup only
> when connection pooling is on:
> <22-oct.-2005 21 h 25 min 31 s CEST> <Error> <JDBC> <BEA-001112> <Test
> "select 1 from rdb$database" set up for pool "Firebird XA Pool DB1"
> failed with exception: "java.lang.NullPointerException".>
>
> No stack trace in this case but I'm wondering if that NPE is not the
> root cause.

Quite possible.

> I also noticed that XAResource.prepare() never returns XA_RDONLY even
> if no change has been done in the database. Is that some limitation of
> the Firebird engine ?

Firebird does not tells us such information and JayBird does not do any
optimization in this case too. I do not know any other possibility to find
out whether something was changed except to track statement execution, which
is very small number of cases. We cannot assume that SELECT does not change
anything, since SELECT can be used with stored procedures, which can modify
database. Other possibility it to check the update/delete/insert count after
each statement execution, but that would slow down for approx. 25-50%
depending on the network latency.

Roman