[Design of POJO Server] - Re: Sub-Profiles ProfileService changes
by emuckenhuber
"bstansberry(a)jboss.com" wrote :
| 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.
|
Yes, validate should just validate the current activated profile. I've started to do that,
but not finished yet - just copied this part from BasicXmlDeployer.
"bstansberry(a)jboss.com" wrote :
| 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.
Yeah, i thought deploy-hasingleton is independent from the other profiles.
You might still want to set a dependency on a clustering-deployers profile or something like that?
I also need to review the shutdown anyway - don't like this much :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204477#4204477
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204477
17 years, 2 months
[Design of POJO Server] - Re: Sub-Profiles ProfileService changes
by bstansberry@jboss.com
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
17 years, 2 months