Try it in the startup script, which is processed once for each instance.
S.
On Tue, 07 Dec 2004 14:53:42 +0000, Eric Laverge <[EMAIL PROTECTED]> wrote:
> Hello again Sedd.
>
> For my variable initialization problem, there is something I dont get. I
> did a simple Test :
>
> Object myObj = null; // Will be reset avery iteration. Where should I
> put
> this line ?
>
> if(myObj == null)
> {
> myObj = "random_" + new Object().hashCode();
> }
> System.out.println(myObj);
>
> //--------- Start Ouput ---------
> random_33073810
> random_8895772
> random_26255230
> random_30872641
> random_24304966
> //--------- End Ouput ---------
>
> For each iteration , the variable myObj gets reset to Null and then
> Reinitialized. When you say 'define the variable as initially null' where
> should
> I do that. When I do it into antoher BeanShell then the myObj is not in the
> scope.
>
> Thank you.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]