@Singleton on JBoss AS 6.0.0.M4 failing to register in .ear file
genman Aug 20, 2010 3:48 PM@Singleton and its like work in .war deployments, and I've been happily testing in Arquillian, but in an .ear package they DO show up in JNDI, but DO NOT show up under jboss.j2ee: (in the JMX console).
For example:
jboss.j2ee
* ear=geoserver.ear,jar=llejb-1.0.0.0-SNAPSHOT.jar,name=ClientManagerEJB,service=EJB3
* ear=geoserver.ear,jar=llejb-1.0.0.0-SNAPSHOT.jar,name=ContentManagerEJB,service=EJB3
...
But under JNDI you see the singletons here (and not the @Stateless beans). The @Stateless beans fail to register regardless if the @EJB depends on the singletons.
+- geoserver (class: org.jnp.interfaces.NamingContext)
| +- LLCacheManagerEJB (class: org.jnp.interfaces.NamingContext)
| | +- remote-com.autodesk.lbs.afx.llcachemanager.LLCacheManager (proxy: $Proxy174 implements interface com.autodesk.lbs.afx.llcachemanager.LLCacheManager)
| | +- remote (proxy: $Proxy174 implements interface com.autodesk.lbs.afx.llcachemanager.LLCacheManager)
| +- PropertyAccessEJB (class: org.jnp.interfaces.NamingContext)
| | +- remote-com.autodesk.lbs.gis.naming.PropertyAccess (proxy: $Proxy177 implements interface com.autodesk.lbs.gis.naming.PropertyAccess)
| | +- remote (proxy: $Proxy177 implements interface com.autodesk.lbs.gis.naming.PropertyAccess)
The logs are:
<< Bunch of @Stateless beans logged like:
INFO [JBossASKernel] Added bean(jboss.j2ee:ear=geoserver.ear,jar=llejb-1.0.0.0-SNAPSHOT.jar,name=SubscriptionManagerMDB,service=EJB3) to KernelDeployment of: llejb-1.0.0.0-SNAPSHOT.jar
INFO [JBossASKernel] installing bean: jboss.j2ee:ear=geoserver.ear,jar=llejb-1.0.0.0-SNAPSHOT.jar,name=SubscriptionManagerEJB,service=EJB3
INFO [JBossASKernel] with dependencies:
INFO [JBossASKernel] and demands:
...
INFO [JBossASKernel] and supplies:
>>
...
INFO [SessionSpecContainer] Starting jboss.j2ee:ear=geoserver.ear,jar=llejb-1.0.0.0-SNAPSHOT.jar,name=PropertyAccessBean,service=EJB3
INFO [EJBContainer] STARTED EJB: com.autodesk.lbs.gis.naming.PropertyAccessBean ejbName: PropertyAccessBean
INFO [SessionSpecContainer] Starting jboss.j2ee:ear=geoserver.ear,jar=llejb-1.0.0.0-SNAPSHOT.jar,name=LLCacheManagerEJB,service=EJB3
INFO [EJBContainer] STARTED EJB: com.autodesk.lbs.afx.llcachemanager.LLCacheManagerEJB ejbName: LLCacheManagerEJB
Oddly enough, the @Singleton aren't listed with demands/dependencies.
The error is then:
WARN [MainDeployer] Failed to deploy: file:/C:/dev/workspace/geoserver/deployment/target/geoserver.ear: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.ejb3:application=geoserver,module=llejb-1.0.0.0-SNAPSHOT,component=SubscriptionManagerEJB,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:application=geoserver,component=SubscriptionManagerEJB,module=llejb-1.0.0.0-SNAPSHOT" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=geoserver,component=SubscriptionManagerEJB,module=llejb-1.0.0.0-SNAPSHOT' **")
Deployment "jboss.ejb3:application=geoserver,module=llejb-1.0.0.0-SNAPSHOT,component=SubscriptionManagerMDB,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:application=geoserver,component=SubscriptionManagerMDB,module=llejb-1.0.0.0-SNAPSHOT" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=geoserver,component=SubscriptionManagerMDB,module=llejb-1.0.0.0-SNAPSHOT' **")
Couple of thoughts/questions...
How does JBoss treat a @Singleton EJB differently, in the context of .ear versus .war packaging? How does JBoss detect a 3.1 versus 3.0 deployment?
Also, is there some way JBoss detects a 3.1 deploymentversus 3.0, in the class org.jboss.metadata.ejb.jboss.JBossMetaData ? Does it matter in this case?