When a bean is declared it is automatically registered as well so that any declared bean can be gotton to by looking it up as well.
If any of the languages that are already running in this manager says they don't like this (by throwing an exception) then this method will simply quit with that exception. That is, any engines that come after than in the engine enumeration will not even be told about this new bean.
So, in general its best to declare beans before the manager has been asked to load any engines because then the user can be informed when an engine rejects it. Also, its much more likely that an engine can declare a bean at start time than it can at any time. @param beanName name to declare bean as @param bean the bean that's being declared @param type the type to represent the bean as @exception BSFException if any of the languages that are alreadyrunning decides to throw an exception when asked to declare this bean.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|