Bug 1004191 - Custom JNDI name to lookup EJB in EAP6
Custom JNDI name to lookup EJB in EAP6
Status: CLOSED NOTABUG
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: David M. Lloyd
Jan Martiska
Russell Dickenson
https://c.na7.visual.force.com/apex/C...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-04 03:46 EDT by Hisanobu Okuda
Modified: 2014-09-26 00:16 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-26 00:16:12 EDT
Type: Feature Request
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sample reproducer (8.98 KB, application/x-gzip)
2013-09-09 02:12 EDT, Hisanobu Okuda
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker PRODMGT-534 Major Resolved Custom JNDI name to lookup EJB in EAP6 2015-05-19 06:50:46 EDT

  None (edit)
Description Hisanobu Okuda 2013-09-04 03:46:37 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):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Jaikiran Pai 2013-09-06 06:51:55 EDT
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.
Comment 2 Hisanobu Okuda 2013-09-09 02:11:17 EDT
Hello Jaikiran,
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?
Comment 3 Hisanobu Okuda 2013-09-09 02:12:12 EDT
Created attachment 795503 [details]
sample reproducer
Comment 4 Jaikiran Pai 2013-09-09 08:48:18 EDT
Hi Hisanobu,

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.
Comment 5 Hisanobu Okuda 2013-09-10 00:13:26 EDT
Hi Jaikiran,

Created a thread:-
https://community.jboss.org/discussion/create.jspa?sr=amenu&draftID=288782
Comment 6 Hisanobu Okuda 2013-09-10 05:13:17 EDT
[errata]
The right URL is:-

https://community.jboss.org/message/836828#836828
Comment 7 Hisanobu Okuda 2013-09-24 22:29:12 EDT
I'd like to request inclusion to EAP 6.3.0. How do I do that?
Comment 9 Dimitris Andreadis 2013-10-24 14:27:45 EDT
Assigning jpai@redhat.com EJB issues to david.lloyd@redhat.com. Please re-assign to Cheng or others as needed.
Comment 17 Dominik Pospisil 2014-09-16 08:14:50 EDT
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"/>

Note You need to log in before you can comment on or make changes to this bug.