Creating an EJB client application for EAServer 6.x

Building EJB client applications for EJBs running in EAServer 6.x requires you to take some additional steps when you create the EJB client proxy and when you create the client.

To generate a proxy for an EJB deployed to EAServer 6.x:

  1. Copy the packagename directory from the %DJC_HOME%\deploy\ejbjars\ directory on the server to the client computer, where packagename is the package that contains the EJB you want to use.

  2. Add this directory to the Classpath on the Select EJB Component dialog box in the EJB Proxy Project painter.

  3. Generate the proxy.

To create an EJB client application for an EJB deployed to EAServer 6.x:

  1. Copy the eas-server-14.jar file (or eas-server-15.jar if you are using JDK 1.5.x) from the %DJC_HOME%\lib directory to the client computer and include its full path in the client's classpath.

  2. Copy the stub files from %DJC_HOME%\genfiles\java\classes\ directory to the client computer and include this path in the client's classpath.

  3. Copy the packagename directory from the %DJC_HOME%\deploy\ejbjars\ directory on the server to the client computer, where packagename is the package that contains the EJB you want to use and include this path in the client's classpath.

If you copied these files and directories to a directory on the client called EAServer6, and you want to use an EJB in the datamapping package, the client classpath setting might look like this:

Classpath=D:\EAServer6\lib\eas-server-14.jar;D:\EAServer6\genfiles\java\classes;D:\EAServer6\deploy\ejbjars\datamapping