I need to call a ejb deployed in remote server.I was able to call it using the direct JNDI name,like this in my client code-
To call the same ejb using the ejb-ref,
Is this syntax is correct?
where ejb/remoteSessionBean is been mapped to ejb/statelessSBean in the descriptors.
Looks correct to me. Why are you asking? Doesn't it work?
YES, that didn't work for me!
and also i like to know,where i can find more information about the meaning of this syntaxt-
Is this something different for remote lookup?
The "java:comp/env" context is used for resources mapped for an EJB using the deployment descriptors. It's a kind of a "private namespace".
In other words, you can't do
from anywhere else but within the component for which the resource was defined. You can't lookup objects from the private context from a remote client (remote as in outside-of-the-EJB).