jbossas/jboss-as — pull request #1551 by jaikiran (2012-02-20 08:38:55+00:00)
Title: Fix @EJB injection when the target bean has a @WebService view

The commit here fixes a @EJB injection issue which would result in the following exception if a target bean had a @WebService view exposed (along with other views):

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: More than 1 component found for type 'foo.bar.Bean' and bean name null for binding foo.bar.OtherBean/targetBean
at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:88)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:227)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:194)
at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)

The issue has been reported here https://community.jboss.org/message/717861#717861. The fix makes sure that we only consider valid @EJB injection views.