Subject | RE: [Firebird-Java] Re: Should (Could) FBStatements be held in WeakHashMap |
---|---|
Author | Nickolay Samofatov |
Post date | 2003-04-04T17:56:24Z |
Hello, Roman !
Jaybird breaks the spec here. This is not a big problem, in fact.
I created a wrapper around it that is fully thread-safe, does 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.
>> If you do not get resource leaks on server, then I think we can commitAFAIK, all JDBC APIs are required to be thread-safe by the spec.
>> your change. Sorry for arguing so long... Also I'm not convinced that
>> this is 100% correct, but we can try.
>There is at least one issue on which I have no answer. In API you can
>find "The Java programming language does not guarantee which thread
>will invoke the finalize method for any given object.", and this might
>cause some problems. Right now access to FBConnection is not
>threadsafe (and is not planned to be, this, afaik, is not required by
>specs). Also it might have some side effects on JTA implementation...
Jaybird breaks the spec here. This is not a big problem, in fact.
I created a wrapper around it that is fully thread-safe, does 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.
>Sorry, I'm afraid to make this change.Nickolay Samofatov
>Roman