Previous Topic: In-Container Testing (ICT)Next Topic: Access using RMI


Access using EJB

To test in-container objects in a standard J2EE container, a stateful session Enterprise JavaBean (EJB) is used. This EJB is bundled as an exploded EAR directory named lisa-remote-object-manager.ear and a stand-alone JAR file LISARemoteObjectManagerEJB.jar with the installer, in LISA_HOME\incontainer\ejb, where LISA_HOME is the directory where DevTest is installed.

This EJB must be deployed with your J2EE application in the J2EE container and be accessible through JNDI using the name "LISARemoteObjectManagerEJB". Deploying an EJB varies depending on the J2EE container being used, and vendor-provided documentation may help if there is a problem deploying the ICT EJB.

If your J2EE application uses an isolated classloader, you must incorporate the ICT EJB into your application by modifying the XML deployment descriptors to include the ICT EJB and its dependencies.

 

JBoss

  1. Test that you can successfully deploy the exploded ICT EAR in JBoss by copying the directory: $LISA\incontainer\ejb\lisa-remote-object-manager.ear to $JBOSS\server\default\deploy or other appropriate deployment directory.
  2. JBoss recognizes the new EAR and deploys it without any errors. Check that you can connect to the EJB from DevTest Workstation.
  3. After the EAR is successfully deployed, in a stand-alone configuration, then try to integrate the ICT EJB with your J2EE application. This may be as simple as copying the contents of $LISA\incontainer\ejb\lisa-remote-object-manager.ear and including them in your existing application EAR. Or create a new EAR that includes your J2EE application that is combined with these files.

See the application XML deployment descriptor application.xml for an idea of how to modify your own application deployment descriptors to include ICT and its dependencies.

The <module> XML elements are used to indicate the presence of the ICT EJB and Java JAR file dependencies.

 

WebLogic

  1. The first test on WebLogic is to deploy the exploded ICT EAR in WebLogic, for example, by using the WebLogic Administrator Console GUI. If your WebLogic Server is in development mode, you can also copy the directory $LISA\incontainer\ejb\lisa-remote-object-manager.ear to the autodeploy directory on the Server and WebLogic will automatically deploy the EAR. You see that the EAR is deployed without any errors.
  2. Check that you can connect to the EJB from DevTest Workstation.
  3. After the EAR is successfully deployed in a stand-alone configuration, try to integrate the ICT EJB with your J2EE application. This may be as simple as copying the contents of $LISA\incontainer\ejb\lisa-remote-object-manager.ear and including them in your own application EAR. Or create a new EAR that includes your J2EE application combined with these files.