Subject Re: [Firebird-Architect] Re: External procedures: implementation proposal.
Author Jim Starkey
Roman Rokytskyy wrote:

>>The j2ee specs effectively require you to use thread locals in
>>several places, and indeed I haven't found any way to implement JTA
>>transactions without a thread local.
>>
>>
>
>Also, for your information, SQLJ requires to obtain context connection
>in Java method like this:
>
>public static void someProcedure(int valueA, String valueB) {
> Connection connection =
> DriverManager.getConnection("jdbc:default:connection");
>
> ...
>}
>
>So, the code first has to call the method (in our case reflection) and
>only then access to the connection happens. I see no chance to solve
>this without TLS in this case. But sure, this can be done already in
>Java code.
>
>
A better way to handle this would be to define your procedure as:

public static void someProcedure (Connection connect, int valueA,
String valueB)
{
}

If you do it this way, anyone can call the procedure with a connection
object an expect it to work.

--

Jim Starkey
Netfrastructure, Inc.
978 526-1376