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&...]