0 Replies Latest reply: Oct 3, 2011 10:44 AM by gunter zeilinger RSS

    How to specify dependencies on @Singleton EJBs

    gunter zeilinger Newbie

      I need to access a Singleton EJB from a JBoss MC. In opposite to dependencies to Stateless EJBs, declaring

       

      <demands>jndi:{Singleton-impl-class-name}</demands>

       

      does not work. Declaring

       

      <demands>Class:{Singleton-local-interface-name}</demands>

       

      the injection of the @EJB reference of the seems to work. But I get

       

      WARN  [ConfigureAction] Error unconfiguring bean AbstractKernelControllerContext@3b5d6b{ metadata=AbstractBeanMetaData@12021b7{name=InitDeviceHolder bean=org.dcm4chee.proxy.beans.util.InitDeviceHolder properties=[deviceHolder] classLoader=BeanMetaDataDeployer$DeploymentClassLoaderMetaData@783e0d{classloader=null} constructor=null autowireCandidate=true installs=[setDevice]}name=InitDeviceHolder target=org.dcm4chee.proxy.beans.util.InitDeviceHolder@1a68938 state=Configured depends=AbstractDependencyInfo@7ae776{idependOn=[AbstractDependencyItem@32064b{name=InitDeviceHolder dependsOn=Device whenRequired=Installed dependentState=Installed resolved=UNRESOLVED}, AbstractDependencyItem@1f7911b{name=InitDeviceHolder dependsOn=jndi:DeviceHolderBean/local-org.dcm4chee.proxy.ejb.DeviceHolder whenRequired=Configured dependentState=Installed resolved=UNRESOLVED}] unresolved=[AbstractDependencyItem@32064b{name=InitDeviceHolder dependsOn=Device whenRequired=Installed dependentState=Installed resolved=UNRESOLVED}, AbstractDependencyItem@1f7911b{name=InitDeviceHolder dependsOn=jndi:DeviceHolderBean/local-org.dcm4chee.proxy.ejb.DeviceHolder whenRequired=Configured dependentState=Installed resolved=UNRESOLVED}]}}: org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not resolve in current deployments reference: [EJB Reference: beanInterface 'org.dcm4chee.proxy.ejb.DeviceHolder', beanName '', mappedName '']

       

      on undeployment.

       

      I am using JBoss 6.1.0-final.