[jboss-dev-forums] [Design of POJO Server] - Re: Sub-Profiles ProfileService changes
bstansberry@jboss.com
do-not-reply at jboss.com
Fri Jan 23 17:54:26 EST 2009
I mentioned in my first post there was a reason I didn't turn on HASingletonProfileManager as the way to handle deploy-hasingleton. It's because it makes the ProfileService.activateProfile() processing re-entrant which fails.
ProfileServiceBootstrap.start(Server) --> ProfileService.activateProfile("all") --> HASingletonDeployer bean starts, becomes master --> HASingletonProfileManager.activateProfile() --> ProfileService.activateProfile("deploy-hasingleton")
This fails because the validate() call in AbstractProfileService.activateProfile() fails during the reentrant call. The outer "all" Profile is still in the middle of activating, which the validate() call treats as an exception condition.
The workaround I haven't committed is to use a ThreadLocal to detect the reentrant call and skip the validate() call. That's kind of yuck, which is why I didn't commit.
Another approach would be to have the "deploy-hasingleton" profile depend on "all", but that's not clean would actually break the HASingleton semantic by forcing the undeploy of the deploy-hasingleton/ dir at the start of shutdown, rather than waiting until the HASingletonController stop phase, which does other needed work.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204470#4204470
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204470
More information about the jboss-dev-forums
mailing list