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

Dan Sirbu do-not-reply at jboss.com
Tue Oct 11 16:16:19 EDT 2011


Dan Sirbu [http://community.jboss.org/people/lmcdasi] created the discussion

"Re: can I avoid a service to block as7 startup ?"

To view the discussion, visit: http://community.jboss.org/message/631244#631244

--------------------------------------------------------------
OK - I guess I understand. So for example if I do :



context.addStep( *new  AbstractDeploymentChainStep() {*

**     protected** **void** execute(DeploymentProcessorTarget processorTarget) { 
          processorTarget.addDeploymentProcessor(Phase.++DEPENDENCIES++, Phase.++DEPENDENCIES_MODULE++, **new** MyDependencyProcessor());
 
     }
++RUNTIME++);
}, OperationContext.Stage.


And in MyDependencyProcessor I do:  

          ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.
++MODULE_SPECIFICATION++);

ModuleDependency dep = **new** ModuleDependency(Module.+getBootModuleLoader+(), myModule.getIdentifier(), **false**, **false**, **false**);


     dep.addExportFilter(PathFilters.+getMetaInfFilter+(), 
**true**);

     dep.addImportFilter(PathFilters.+getMetaInfFilter+(), 
**true**);     moduleSpecification.addSystemDependency(dep); 








where myModule is the blocking service. Then if service still blocks at deployment, then all deployments would fail until the service is up, right ?




--------------------------------------------------------------

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

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/70f4c91a/attachment.html 


More information about the jboss-dev-forums mailing list