[
https://issues.jboss.org/browse/ARQ-836?page=com.atlassian.jira.plugin.sy...
]
Aslak Knutsen commented on ARQ-836:
-----------------------------------
The proper fix is to allow some direct interaction with the AppServer, but this is
currently not possible.
As far as I know, there is no way to know which App/Module your in via standard APIs, and
there is no way of getting a mapping between EJB InterfaceName and JNDI name.
The solution is probably to remove the 'convenience/common naming' lookup attempt,
and just simply fail if not using mappedName. (unless you're using CDI of course,
which actually has the hooks into the appserver)
Adding support for java:/module/ will work in some cases, but not all, since we're not
always executing in that module(ear with ejb jars)
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