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/631634#631634
--------------------------------------------------------------
Dan Sirbu wrote:
I got that.
My problem is that when the ME.start() is called by the MSC - the SubsystemState did not
build yet the module list: M1, M2 !
And thus when populating the model, SubsystemState will call addModule which in turn will
do the WRONG stuff ! That is clear.
OK, but my point is that a call to asynchronous
from another thread is always going to break. There is a race condition between the thread
starting the service finishing (and MSC thinking it's done) and the other thread
telling it the service is not done. The only way it makes sense to toggle that async
method is to do it in the same thread that MSC is using to execute start() but before
start() completes.
Dan Sirbu wrote:
Any idea what I doing wrong that the ME.start() gets called before the SubsystemState
builds the list of modules ? I do not see why that happens.
Only a service dependecy will prevent a service from starting, so ME has to depend on some
other service that represents the state it needs.
Maybe it would help to take a step back. Could you describe what you are ultimately trying
to build here? It sounds like you are creating some new kind of module system?
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/631634#631634]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]