[jboss-jira] [JBoss JIRA] (AS7-5147) @Resource injection of BundleContext into ManagedBean fails

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Tue Jul 10 16:29:12 EDT 2012


     [ https://issues.jboss.org/browse/AS7-5147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler updated AS7-5147:
--------------------------------

    Fix Version/s: 7.2.0.CR1
                       (was: 7.3.0.Alpha1)

    
> @Resource injection of BundleContext into ManagedBean fails
> -----------------------------------------------------------
>
>                 Key: AS7-5147
>                 URL: https://issues.jboss.org/browse/AS7-5147
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: OSGi, Web
>            Reporter: Thomas Diesler
>            Assignee: Thomas Diesler
>             Fix For: 7.2.0.CR1
>
>
> @Resource BundleContext injection fails with
> {code}
> 21:04:12,978 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "managed-bean.ear"
> 21:04:12,987 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "managed-bean.jar"
> 21:04:12,988 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "managed-bean.war"
> 21:04:13,066 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002: Processing weld deployment managed-bean.ear
> 21:04:13,097 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment managed-bean.war
> 21:04:13,099 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016002: Processing weld deployment managed-bean.jar
> 21:04:13,114 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016005: Starting Services for CDI deployment: managed-bean.ear
> 21:04:13,137 INFO  [org.jboss.as.osgi] (MSC service thread 1-1) JBAS011907: Register module: Module "deployment.managed-bean.ear:main" from Service Module Loader
> 21:04:13,141 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016008: Starting weld service for deployment managed-bean.ear
> 21:04:13,187 INFO  [org.jboss.as.osgi] (MSC service thread 1-1) JBAS011907: Register module: Module "deployment.managed-bean.ear.managed-bean.war:main" from Service Module Loader
> 21:04:52,328 INFO  [org.jboss.as.osgi] (MSC service thread 1-1) JBAS011907: Register module: Module "deployment.managed-bean.ear.managed-bean.jar:main" from Service Module Loader
> 21:04:52,402 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /managed-bean.war
> 21:04:52,607 INFO  [org.jboss.as.server] (management-handler-thread - 3) JBAS015870: Deploy of deployment "managed-bean.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.managed-bean.\"managed-bean.jar\".env.\"org.jboss.as.test.integration.osgi.resource.SimpleManagedBean\".context Missing[jboss.naming.context.java.module.managed-bean.\"managed-bean.jar\".BundleContext]","jboss.deployment.subunit.\"managed-bean.ear\".\"managed-bean.jar\".jndiDependencyService Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"managed-bean.ear\".\"managed-bean.jar\".component.SimpleManagedBean.START Missing[JBAS014861: <one or more transitive dependencies>]"]}
> {code}
> This is probably because of this code in BundleContextBindingProcessor
> {code}
>             if (comp.getNamingMode() == ComponentNamingMode.CREATE) {
>                 ServiceName serviceName = contextServiceNameOfComponent(moduleDesc.getApplicationName(), moduleDesc.getModuleName(), comp.getComponentName());
>                 bindServices(depUnit, serviceTarget, moduleDesc, comp.getComponentName(), serviceName);
>             }
> {code}
> The namingMode == USE_MODULE and the BundleContextdoes not get bound.
> Is this binding logic correct?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list