Bug 1004191 - Custom JNDI name to lookup EJB in EAP6
Summary: Custom JNDI name to lookup EJB in EAP6
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: David M. Lloyd
QA Contact: Jan Martiska
Russell Dickenson
URL: https://c.na7.visual.force.com/apex/C...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 07:46 UTC by Hisanobu Okuda
Modified: 2018-12-06 15:16 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-09-26 04:16:12 UTC
Type: Feature Request
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker PRODMGT-534 0 Major Resolved Custom JNDI name to lookup EJB in EAP6 2015-05-19 10:50:46 UTC

Description Hisanobu Okuda 2013-09-04 07:46:37 UTC
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 10:51:55 UTC
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 06:11:17 UTC
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 06:12:12 UTC
Created attachment 795503 [details]
sample reproducer

Comment 4 Jaikiran Pai 2013-09-09 12:48:18 UTC
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 04:13:26 UTC
Hi Jaikiran,

Created a thread:-
https://community.jboss.org/discussion/create.jspa?sr=amenu&draftID=288782

Comment 6 Hisanobu Okuda 2013-09-10 09:13:17 UTC
[errata]
The right URL is:-

https://community.jboss.org/message/836828#836828

Comment 7 Hisanobu Okuda 2013-09-25 02:29:12 UTC
I'd like to request inclusion to EAP 6.3.0. How do I do that?

Comment 9 Dimitris Andreadis 2013-10-24 18:27:45 UTC
Assigning jpai EJB issues to david.lloyd. Please re-assign to Cheng or others as needed.

Comment 17 Dominik Pospisil 2014-09-16 12:14:50 UTC
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.