+

Search Tips   |   Advanced Search

Develop a Java thin client application

Develop the application code, then assemble the code into a client application that we can deploy on a client machine.

To develop a Java thin client application, you developing the application code, generate the client bindings needed for the enterprise bean and CORBA objects, and package these pieces together to install on the client machine.

With the Java thin client, the client application must code explicitly the fully-qualified location for each resource that it uses. For example, a Java thin client application that looks up an enterprise bean Home contains the following code:

java.lang.Object ejbHome =  
  initialContext.lookup("the/fully/qualified/path/to/actual/home/in/namespace/MyEJBHome");
yEJBHome = (MyEJBHome)javax.rmi.PortableRemoteObject.narrow(ejbHome,  MyEJBHome.class);

The Java thin client application must know the fully-qualified physical location of the enterprise bean Home in the namespace. If this location changes, the thin client application must also change the value placed on the lookup() statement.

To compile a Java thin client application, include the client jars file needed by the application in the CLASSPATH setting for the javac command.

  • Developing applications that use JNDI