[arquillian-issues] [JBoss JIRA] (ARQ-836) Enricher does not lookup EJB successfully unless the name of deployed archive is "test" or beanName/mappedName attribute is set

Martin Kouba (JIRA) jira-events at lists.jboss.org
Thu Mar 29 09:32:47 EDT 2012


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

Martin Kouba commented on ARQ-836:
----------------------------------

Well, I would  not remove convenience lookup attempt but limit this to portable JNDI names only (as defined in EJB 3.1, 4.4 Global JNDI Access).

{noformat}
java:global[/<app-name>]/<module-name>/<bean-name>[!<fully-quali-fied-interface-name>]
java:global[/<app-name>]/<module-name>/<bean-name>
java:app/<module-name>/<bean-name>[!<fully-qualified-interface-name>]
java:module/<bean-name>[!<fully-qualified-interface-name>]
{noformat} 

However EJBInjectionEnricher still doesn't have access to <app-name>. Isn't it possible to provide some archive information (like archive name)?

                
> Enricher does not lookup EJB successfully unless the name of deployed archive is "test" or beanName/mappedName attribute is set
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARQ-836
>                 URL: https://issues.jboss.org/browse/ARQ-836
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 1.0.0.CR7
>            Reporter: Martin Kouba
>
> The problem is in the way *jndiNames* array is constructed if beanName or mappedName attribute of @EJB annotation is not set.
> For following SLSB with no-interface view...
> {code}
> @Stateless
> public class Foo {
>   public void ping() {
>   }
> }
> {code}
> ... EJBInjectionEnricher tries to lookup following JNDI names:
> {noformat}
> java:global/test.ear/test/FooBean, 
> java:global/test.ear/test/Foo, 
> java:global/test/Foo, 
> java:global/test/FooBean, 
> java:global/test/Foo/no-interface, 
> test/FooBean/local, 
> test/FooBean/remote, 
> test/Foo/no-interface, 
> FooBean/local, 
> FooBean/remote, 
> Foo/no-interface, 
> ejblocal:com.acme.ejb.Foo, 
> com.acme.ejb.Foo,
> {noformat}
> Parts like "java:global/test.ear/test/" and "java:global/test/" are hard coded. So if the name of the test archive is not "test" the SLSB is not found.

--
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