[arquillian-issues] [JBoss JIRA] (ARQ-910) JNDI lookup fails for @EJB mappedName when the bean has more instances

Dan Allen (JIRA) jira-events at lists.jboss.org
Thu May 3 09:51:17 EDT 2012


    [ https://issues.jboss.org/browse/ARQ-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690058#comment-12690058 ] 

Dan Allen commented on ARQ-910:
-------------------------------

This seems to stems back to the same problem that we are doing brute force EJB resolution rather than delegating to the container.

As more and more cases come in, I think that we've got to focus on getting the EJB enricher done right, at least for JBoss AS.

I'm linking the issue for reference.
                
> JNDI lookup fails for @EJB mappedName when the bean has more instances
> ----------------------------------------------------------------------
>
>                 Key: ARQ-910
>                 URL: https://issues.jboss.org/browse/ARQ-910
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Josef Cacek
>            Priority: Critical
>
> EJBs are not injected correctly to a test case if they come from different applications.
> For instance following code:
> {code}
> @EJB(mappedName = "java:global/test-app1/HelloBean")
> private Hello hello1;
> @EJB(mappedName = "java:global/test-app2/HelloBean")
> private Hello hello2;
> @Deployment(name = "DEP1")
> public static JavaArchive deploymentApp1() throws IllegalArgumentException, IOException {
>     return createJar("test-app1.jar");
> }
> @Deployment(name = "DEP2")
> public static JavaArchive deploymentApp2() throws IllegalArgumentException, IOException {
>     return createJar("test-app2.jar");
> }
> @Test
> @OperateOnDeployment("DEP1")
> public void test1() throws Exception {
>     assertNotNull(hello1);
> }
> @Test
> @OperateOnDeployment("DEP2")
> public void test2() throws Exception {
>     assertNotNull(hello2);
> }
> {code}
> Then one of the tests fails and one passes (sometime test1, sometime test2).

--
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 arquillian-issues mailing list