[jboss-dev-forums] [JBoss AS7 Development] - Re: can I avoid a service to block as7 startup ?

Jason Greene do-not-reply at jboss.com
Tue Oct 11 15:37:30 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/631233#631233

--------------------------------------------------------------
complete() needs to be called once when ALL work to indicate the service should be started as done. One way you can achieve what you describe though is to use an AtomicInteger shared by all tasks that is initialized to the number of tasks that must be ran, every task decrements and when the count hits 0 calls, that task calls context.complete().
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/631233#631233]

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/20111011/d6622ca8/attachment.html 


More information about the jboss-dev-forums mailing list