Hi, How can we develop the client applications providing the location transperency? Whenever we are writing application for a web client then we need to put the ejb component in the class path of the web application.Does it not breach of locational transperency? Thanks in advance
When you make a remote EJB call, you just need to have the stubs in the classpath, not the implementation. The actual implementation could be on multiple servers. As the client, you don't need to know which ones. Hence locational transparency.
First of all the term location transparency has a different meaning. Using a famous Microsoft slogan �the network is the computer� might give you an idea about what location transparency is. Basically the contract is that in a distributed environment developers can access resources everywhere on the network in a similar way they access local resources. From the developer perspective there is no difference (in theory; in practice we kind of figured out that there is). This is also not an EJB specific feature and is an aim of all distributed environments, including RMI, DCOM, CORBA, etc. What you�re actually pointed out is just usual compiling and linking process and is absolutely the same whether you�re using distributed technologies or not, or even whether you�re using Java or not. If you need to use a class, interface or other symbols the compiler/linker needs to have a way of reaching it. It�s the same in C or C++ and Java is no exception of course. Regards.
I think, therefore I exist -- Rene Descartes
posted 14 years ago
Thank u very much Jeanne and valentine ,for ur replies. Now I got the clear idea,that EJB component that is deployed in the application server sholud be maintained in the class path of the clent programm.But the required runtime environment and the middle tier services will be provided by the app server only. As Jeanne said how can we get only stubs to place in the class path instead of the whole ejb component
When you make a remote EJB call, you just need to have the stubs in the classpath, not the implementation.
Let's say that you write a home interface named GetHome, and that the container creates these implementations: - GetHomeImpl (the class of the remote home object) - GetHomeImpl_stub (the class of the home object stub)
The client will need GetHome and GetHomeImpl_stub on its classpath. GetHome is needed as the stub instance may be narrowed and must be cast to this home interface, GetHomeImpl_stub is needed as this is the class of the stub. Both will be loaded by the class loader. So, just to be clear, it's the stub class rather than the stub instance which is needed on the classpath.
Similarly, the component interface and its client implementation (the proxy for the EJBObject) are both needed on the client's classpath. Each EJB vendor will also provide a JAR file (containing the classes needed for interacting with the server) which must also be placed on the client's classpath.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
If you were a tree, what sort of tree would you be? This tiny ad is a poop beast.