Basic HTML version of Foils prepared May 19 99

Foil 22 Client-side code gets EJBHome

From Enterprise Javabeans Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Nancy McCracken


1 Context initialContext = new InitialContext();
2 CartHome cartHome = (CartHome)
3 initialContext.lookup
4 ("applications/mall/shopping-carts");
5 Client-side code may be written in Java in an applet, application or servlet, or in a C++ application using CORBA.
6 Getting the home of the remote bean:
  • InitialContext gets the root of the JNDI naming hierarchy
  • lookup method gets the instance of CartHome wanted (from a known JNDI path).
  • The actual container and server are transparent to the user - a container can be on several servers.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999