BSF Never Forgets

11 12 2006

Here’s a little something you should know about embedding using BSF, especially if you’re embedding in a long running process:

When a bean is bound to BSF through BSFManager#declareBean, that bean is wrapped in a BSFDeclaredBean object and stored in a vector before the engine implementations have a chance to bind the bean. Or, to put it another way, declared beans will stay alive throughout the life of the BSFManager unless undeclared even if you declare a bean with a name you’ve already used. So, to avoid leaky scripting, either undeclare your beans, or use the bean registry instead.

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: