[jboss-dev-forums] [JBoss AS7 Development] - Re: can I avoid a service to block as7 startup ?
Jason Greene
do-not-reply at jboss.com
Thu Oct 13 12:24:55 EDT 2011
Jason Greene [http://community.jboss.org/people/jason.greene] created the discussion
"Re: can I avoid a service to block as7 startup ?"
To view the discussion, visit: http://community.jboss.org/message/631620#631620
--------------------------------------------------------------
> Jason Greene wrote:
>
> >
> It's not clear to me exactly what you are doing, but you can't call your own start method. Only when your start method is called BY MSC can you call context.asynchronous(). As mentioned above the purpose of this method is to tell MSC that +*when it is starting a service, that the service did not complete startup*+. Otherwise, once the start method called by MSC returns, the service is started
Put another way this is the chain of events that should happen for it to work
MSC Thread X:
MSC decides to start a service -> MSC calls your service.start() -> {
/* Not done yet! */ ctx.asynchronous();
passToSomeOtherThread(ctx);
return;
}
SomeOtherThread: {
doStuff();
/* Tell MSC I am done */ ctx.complete();
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/631620#631620]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111013/060d7afe/attachment.html
More information about the jboss-dev-forums
mailing list