The remote client view of an enterprise bean is location independent.
The interface used by a remote client of a session bean is implemented by the container as a remote business interface (or a remote EJBObject interface), and the remote client view of a session bean is location-independent. A client running in the same JVM as the session object uses the same API as a client running in a different JVM on the same or different machine.
Originally posted by Mark Spritzler:
Yes, there is still a need for a "hint" so that you aren't looking everywhere to find your bean in a haystack. But with jndi.properties file, your code doesn't need to know exactly what is in there, you you can change that file without changing your client codebase.
Originally posted by Jon Wetherbee:
You're right that the remote client does need to know how to look up the remote session bean, both when it specifies the JNDI name and when it specifies the remote server connection information (this is typically captured in a jndi.properties file).
Originally posted by Jon Wetherbee:
However, the quote you cite addresses a different point regarding location transparency: The session bean's api is constant regardless of the client's location. Here's the quote in context (from section 3.1 of the EJB 3 Core Contracts document)
The remote client view of an enterprise bean is location independent.A client running in the same JVM as a bean instance uses the same API to access the bean as a client running in a different JVM on the same or different machine.
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
It only needs to "know" the location of the JNDI server
Originally posted by Jaikiran Pai:
To be more clear, what i mean is i havent come across something like plugging in a external JNDI server into an application server and bind the beans deployed on the application server into this JNDI server
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Knowing the location of the JNDI server is not same as knowing the location of the bean.
The EJB spec is quite clear on location transparency. AFAIK, you can use a separate JNDI server to register and lookup beans with WebLogic as well as WebSphere. How else will multiple projects use each other's beans? Please check their documentation.
Consider Paul's rocket mass heater. |