Details
-
Bug
-
Resolution: Done
-
Major
-
7.0.0.Beta1
-
None
-
None
Description
Consider this servlet (or any other component):
public class MyServlet extends HttpServlet { @EJB (name="simpleName", beanName="SomeEJB") private SomeEJB bean; @EJB (name="simpleName", beanName="SomeEJB") private SomeEJB beanAgain; ... }
Notice that both the @EJB injection points expect the bean to be injected from bean in ENC at java:comp/env/simpleName. This however, leads to exception during deployment with the following message:
16:06:43,846 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."myejbapp.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."myejbapp.war".INSTALL: Failed to process phase INSTALL of deployment "myejbapp.war" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:108) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1344) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21] at java.lang.Thread.run(Thread.java:619) [:1.6.0_21] Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.module.myejbapp.myejbapp.env/simpleName is already registered at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:143)
Attachments
Issue Links
- is blocked by
-
AS7-421 Automatic JNDI implementation
- Resolved