jakarta-bsf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amey Rokde" <aro...@voiceobjects.com>
Subject Context Sharing Using BSF
Date Wed, 11 May 2005 08:00:33 GMT
We are using BSF 2.3.0 for providing scripting functionality into our product.Basically we
are using bsf framework to embedded java script inside our
product.We are facing a tricky scenario.Let me explain

Script 1 :


Script 2 : 
   function add()


   function delete()


when we give a first call with script1, it crashes saying the add() is undefined which is
then second call with script2 delete() is called which is invoked properly and then we make
third call with script1,add() is invoked which should not be 
as script1 does not define it.
Through out we are using the same instance of bsf manager.After calling terminate method on
bsf manager after each call, then this undesired behavior
is stopped.
Now as per i understand looking into code, by calling bsf manager terminate we are unloading
the registered engines and thus the context of javascript is cleared.If this is right or above
behavior is caused by this,then is it possible to clear the context without unloading the
registered engines.Mind you this is same thread which is making all the three calls.

Second,this is not that critical but any ways would like to ask that is there any way to call
a particular function from the entire java script file.
Any light on this matter will be greatly appreciated.

To unsubscribe, e-mail: bsf-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-user-help@jakarta.apache.org

View raw message