Subject | Re: Should (Could) FBStatements be held in WeakHashMap |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-04-04T19:40:51Z |
Nickolay,
thread safety. JayBird does not allow multiple threads work on the
same connection (and this is a nature of all JTA-enabled
applications - transaction is associated with a thread, see specs),
but you can happily use connection per thread scheme.
so for now JayBird also has correct TPB mapping :). Thread safe pool
and statement leak tracking I will commit to the project after
release. And I agree that this is a matter of few classes (probably
more than 300 lines, but I added some javadoc comments :)).
Best regards,
Roman
> AFAIK, all JDBC APIs are required to be thread-safe by the spec.No, it's not. You can check the specification. There's nothing about
> Jaybird breaks the spec here. This is not a big problem, in fact.
thread safety. JayBird does not allow multiple threads work on the
same connection (and this is a nature of all JTA-enabled
applications - transaction is associated with a thread, see specs),
but you can happily use connection per thread scheme.
> I created a wrapper around it that is fully thread-safe, doesTPB mapping was discussed few times and we still did not agree on it,
> correct TPB mapping and detects statement leaks and I distribute it
> to clients that reqire portability between different engines
> (Oracle, MSSQL, Firebird, ...).
> This is just a matter of 300 lines to make Jaybird implementation
> usable in cross-platform environment.
so for now JayBird also has correct TPB mapping :). Thread safe pool
and statement leak tracking I will commit to the project after
release. And I agree that this is a matter of few classes (probably
more than 300 lines, but I added some javadoc comments :)).
Best regards,
Roman