I think application-client.xml is broken in Orion. The whole purpose of
having application-client.xml is to be able to map a client written by one
vendor, to the EJB written by another vendor. Has any one been able to
"properly" use <application-client><ejb-ref> to map <ejb-ref-name> to
<ejb-link> where both are NOT the same string?
Thanks.
-AP_
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Thursday, March 15, 2001 2:11 PM
To: Orion-Interest
Subject: Problems with JNDI lookups of <ejb-ref-name> defined in
application-client.xml from a client application...
I have a client application which has META-INF with the following
application-client.xml definition:
<application-client>
<ejb-ref>
<ejb-ref-name>ejb/id</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.indnet.model.id.IdSessionHome</home>
<remote>com.indnet.model.id.IdSession</remote>
<ejb-link>Id</ejb-link>
</ejb-ref>
</application-client>
In the client, I attempt to do the following:
new InitialContext().lookup("ejb/id");
The above fails with the naming exception, telling me that ejb/id cannot be
found:
Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
found
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.naming.jz.lookup(JAX)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.indnet.model.id.test.Client.main(Client.java:16)
If I change my client line to read:
new InitialContext().lookup("Id");
Things work correctly. "Id" is the <ejb-name> used for my object:
<enterprise-beans>
<session>
<ejb-name>Id</ejb-name>
<home>com.indnet.model.id.IdSessionHome</home>
<remote>com.indnet.model.id.IdSession</remote>
<ejb-class>com.indnet.model.id.IdSessionBean</ejb-class>
<session-type>Stateless</session-type>
...
What is the purpose of application-client.xml if I cannot create references
and use the name specified in <ejb-ref-name> to lookup the components? Or
am I missing something?
Thanks.
-AP_