[arquillian-issues] [JBoss JIRA] Closed: (ARQ-340) mappedName and lookup attributes are ignored for @EJB in jections into test cases, forcing a naming convention on implementations

Aslak Knutsen (JIRA) jira-events at lists.jboss.org
Fri Mar 18 01:45:54 EDT 2011


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

Aslak Knutsen closed ARQ-340.
-----------------------------



> mappedName and lookup attributes are ignored for @EJB in jections into test cases, forcing a naming convention on implementations
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARQ-340
>                 URL: https://issues.jboss.org/browse/ARQ-340
>             Project: Arquillian
>          Issue Type: Bug
>          Components: Runtime Enricher SPI
>    Affects Versions: 1.0.0.Alpha4
>         Environment: JRE 1.6.0.21 windows xp jboss embedded 6
>            Reporter: Radai Rosenblatt
>            Assignee: David Allen
>             Fix For: 1.0.0.Alpha5
>
>         Attachments: testing.zip
>
>
> suppose i have an interface called BeanInterface, which is a local interface implemented a class called BeanImplementation.
> then, in my test case, i have the following in ijected field:
> @EJB(mappedName = "java:global/test/BeanImplementation/local")
> private BeanInterface bean;
> this will fail because the enricher does not bother looking at the annotation attributes. specifically, as can be seen in EJBInjectionEnricher.java line 102, the code does not pass the Field itself to the lookup method, only its name. the lookup method then proceeds to try several JNDI naming alternatives (line 137).
> this means that production classes are forced to adhere to the naming conventions used by arquillian code or tests fail.
> the code in question could take into account the mappedName and/or lookup attributes of @EJB to allow developers to specify the JNDI name for the lookup.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list