[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Shutdown of controller
alesj
do-not-reply at jboss.com
Fri Jun 8 10:03:18 EDT 2007
"alesj" wrote :
| But I'll have a look what can be done with the current code.
I was able to handle this by introducing parent Controller to AbstractController.
This piece of code does the trick.
| AbstractController parent = getParentController();
| while (parent != null)
| {
| try
| {
| parent.unregisterControllerContext(context);
| }
| catch (Throwable t)
| {
| log.warn("Error unregistering context in parent controller: " + context.toShortString() + " with name: " + name);
| }
| parent = parent.getParentController();
| }
|
And it is legit, since duplicated names are detected while registering, so this code doesn't remove anything it shouldn't.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052590#4052590
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052590
More information about the jboss-dev-forums
mailing list