ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholoz Koka Kiknadze <kikna...@gmail.com>
Subject Re: PL/SQL package level variables
Date Tue, 04 Aug 2009 05:29:24 GMT
You are quite right. Your problem is that calls to those two procedures are
not in a single transaction. Include them in a single transaction and proc2
will see package level variables set in proc1. Note that executing those
procs on a single connection object is not enough (i.e. you need
transaction).

hth

On Tue, Aug 4, 2009 at 8:48 AM, CuriousMind <yogeshcjadhav@hotmail.com>wrote:

>
> Hi,
>
> I am having 3 procedures which i want to call using IBatis framework. These
> procedure are using package level variables and hence when I try to call
> them, it ends up throwing error as the package variable value is not found.
> Consider following scenario for more details
> Package level variable = varPK
> Procedure 1 sets varPK (Package level variable) to "SomeValue"
> Procedure 2 tries to check value of varPK and finds that it is empty.
>
> I know this could be resolved by writing wrapper procedure which will call
> above listed procedure in sequence but I am looking for better solution.
> The
> problem is that I am migrating existing application to Ibatis framework and
> hence it is not possible to find out where such scenarios would come.
> The error that I am facing is probably due to for every call to iBatis API
> gets different connection object (I am using connection pool and spring
> integration with ibatis.). I think this can be resolved only if current
> thread will get same connection instance. Is there any way to ensure that
> the current thread will always receive same connection instance?
> --
> View this message in context:
> http://www.nabble.com/PL-SQL-package-level-variables-tp24802267p24802267.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Mime
View raw message