Red Hat Bugzilla – Bug 1004191
Custom JNDI name to lookup EJB in EAP6
Last modified: 2014-09-26 00:16:12 EDT
Description of problem:
I want to look up EJB using a custom JNDI name like "com/foo/bar/ejb/session/Hello" instead of a default name like "ejb:myapp/myejbmodule//HelloBean!com.foo.bar.ejb.session.Hello?stateful".
Version-Release number of selected component (if applicable):
Steps to Reproduce:
I can't find an example, but this is already possible. All you have to do is setup proper JNDI name linking in the naming subsystem. Take a look at the naming subsystem xsd for more details.
Thanks for the suggestion, but it does not work for me. Please find the attached samplebz.tar.gz and deploy it as follow:-
1. extract it
2. copy standalone-ha.xml to $JBOSS_HOME/standalone/configuration
3. deploy samplebz.jar
4. run eap610
$ $JBOSS_HOME/bin/standalone.sh -c standalone-ha.xml -Djboss.node.name=node1
5. add jboss-client.jar and samplebz.jar to CLASSPATH and run the client
$ java sample.Client610
Then, you would get an error like:-
Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
Our customer wants to invoke remote clustered ejb. Need to use jboss ejb client API and look up for "ejb:..." to invoke remote clustered ejb. Is my understanding correct?
Created attachment 795503 [details]
For discussing about that error, please create a thread either in the forums or the eap6 support mailing list. That way it gets the right audience and more people can take a look.
Created a thread:-
The right URL is:-
I'd like to request inclusion to EAP 6.3.0. How do I do that?
Assigning firstname.lastname@example.org EJB issues to email@example.com. Please re-assign to Cheng or others as needed.
Closing based on the testing with WF and 6.x master. In both runtimes clustered ejb lookup works using custom bindings. In the above provided example, the lookup should be defined as:
<lookup name="java:jboss/exported/hoge/Hello" lookup="java:jboss/exported/samplebz/SecureHelloBean!sample.Hello"/>