I created and deployed an ejb using ejb-jar.xml. I created an
application-client.xml. However, no matter what name I use in
<ejb-ref-name> tag, I am unable to bind to it. I am able to bind directly
to the name given in the ejb-jar.xml.
For example if ejb-jar.xml contains:
<ejb-name>com.citysearch.ejb.ClassType</ejb-name>
and application_client.xml contains:
<ejb-ref>
...
<ejb-ref-name>MyValue</ejb-ref-name>
<ejb-link>com.citysearch.ejb.ClassType</ejb-link>
...
</ejb-ref>
Then the following code only finds the home when looking for
"com.citysearch.ejb.ClassType" and NOT "MyValue":
Context context = new InitialContext();
//WORKS
System.out.println("Looking for: com.citysearch.ejb.ClassType");
Object h1 = context.lookup("com.citysearch.ejb.ClassType");
//DOES NOT WORK
System.out.println("Looking for: MyValue");
Object h2 = context.lookup("MyValue");
I know that application-client.xml is being read, because when I put garbage
in to it, I get errors during client startup.
What is the need for application-client.xml if I cannot define to the client
what MyValue really means. Am I missing something?
Thanks.
-AP_