While integrating EJB3 service into current AS trunk, I noticed that if
a Component's service (or any service in general) has unresolved
dependencies, although the service stays in DOWN state (as expected), no
error is reported and the deployment does *not* fail. As a side effect
of this, a runtime invocation on the service (a InitialContext.lookup()
leading to the ServiceReferenceObjectFactory.getObjectInstance() in this
case) ended up hanging indefinitely
http://pastebin.com/jK0i1aCi
To debug this, I had to use jconsole and then get a list of all the
services, their dependencies and the state and then figure out what's
missing:
Service
"jboss.deployment.unit.ejb3-example.jar.component.SimpleStatelessSessionBean"
(class org.jboss.as.ee.component.service.ComponentService) mode ACTIVE
state DOWN (dependencies:
jboss.naming.context.java.module.ejb3-example.jar,
jboss.naming.context.java.app.ejb3-example.jar,
jboss.naming.context.java.comp.ejb3-example.jar.SimpleStatelessSessionBean,
jboss.naming.context.java.global."ejb3-example/SimpleStatelessSessionBean!org.jboss.as.demos.ejb3.archive.SimpleStatelessSessionLocal")
(has missing dependency)
Shouldn't a unresolved dependency on a service result in deployment failure?
-Jaikiran