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.


Actions

Information

Leave a comment