I think the examples work well since I run the J2EE server and the EJB client on the same computer, but what happen if the client and the J2EE server are not on the same computer ?
Nothing special, because EJB offers network transparency : "A client using the remote home and remote interfaces can reside on a different machine than the enterprise bean (location transparency), and the object references of the remote home and remote interfaces can be passed over the network to other applications." (EJB specs p. 385) Best, Phil.
Even though EJB offers location transparancy I think that you have to tell the client where to find the server that runs the JNDI service. In this case you include information for where the JNDI service is located. How this is done is specific for a particular container so it will not be on the exam. For example this is how it is done i Weblogic: Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY ,"weblogic.jndi.WLInitialContextFactory"); properties.put(Context.PROVIDER_URL, "t3://localhost:7001");
Context initialContext = new InitialContext(properties);
Phillipe It's very nice to see that you are still with us in the forum even after you passed the exam so gracefully. /Best Regards Magnus [ December 18, 2003: Message edited by: Magnus Stattin ] [ December 18, 2003: Message edited by: Magnus Stattin ]
Phillipe It's very nice to see that you are still with us in the forum even after you passed the exam so gracefully.
Thank you., you're welcome . Now keeping around here is the best way I found out to not forget everything I just learned, ... and to go on with learning new stuff as I just did thanks to your posts. Best, Phil.