-
1. Re: where to configure JNDI in jboss AS 7.1.3 Final
wdfink May 6, 2013 8:25 AM (in response to georgesg)1 of 1 people found this helpfulAs the JNDI names are standartisized with EJB3.x spec there are some restrictions for the JNDI naming.
For local names you can use the java:module/Myname for a lookup or map the names via the naming subsystem in the configuration to not change the code.
The remote names are different and you cannot use mappedName to change.
See the documentation for remote invocation
-
2. Re: where to configure JNDI in jboss AS 7.1.3 Final
georgesg May 6, 2013 11:17 PM (in response to wdfink)Hello Wolf,
Thanks for the reply.
I tried mapping the names via the naming subsystem in the standalone-full.xml something this shown below, but it resulted in Name Not found exception only.
For this Solution, i tried to lookup from the code using the jndi name as "com.cassis.cx.upgrade.VersionUpgraderLocal" (No Code Change, Existing implementation
<subsystem xmlns="urn:jboss:domain:naming:1.2">
<<bindings>
<lookup name="com.cassis.cx.upgrade.VersionUpgraderLocal" lookup="java:module/com.cassis.cx.upgrade.VersionUpgrader!com.cassis.cx.upgrade.VersionUpgrader_LocalHome"/>
</bindings>
<remote-naming/>
</subsystem>
Since in my application (ear), the EJB module is lookedup by the WEB module via a Jar file residing in the ear/lib, i tried lookup using jndi in the below format and i succeeded . Now there is no problem with the jndi lookup.
java:app/MobilematrixCX_ejb-1.0.0-SNAPSHOT/com.cassis.cx.upgrade.VersionUpgrader!com.cassis.cx.upgrade.VersionUpgrader_LocalHome
Neverthless am still keen on the mapping approach in the standalone-full.xml , which does not require any code change.
-
3. Re: where to configure JNDI in jboss AS 7.1.3 Final
wdfink May 10, 2013 4:57 AM (in response to georgesg)You might have a look to this quickstart. If you look to this class (line 100) there an alias is used. There is a indirection in ejb-jar.xml which use the standalone configured name (see install-domain.cli or follow the readme).