uCosminexus Application Server, EJB Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

4.2.6 Method for invoking an Enterprise Bean of another J2EE application with the business interface

This subsection describes how to invoke an Enterprise Bean of another J2EE application with the business interface, when the application is running on the same J2EE server, and also when the application is running on another J2EE server.

Organization of this subsection
(1) For an Enterprise Bean running in another application on the same J2EE server
(2) For an Enterprise Bean running on another J2EE server

(1) For an Enterprise Bean running in another application on the same J2EE server

To invoke the Enterprise Bean:

  1. Include the business interface of the invoked Enterprise Bean as well as the user-created classes used in the interface in the invoking EJB-JAR file or the WAR file.
  2. If none is specified for the ejbserver.rmi.localinvocation.scope key in the user-defined file for J2EE server, acquire the stubs by using the cjgetstubsjar command for the invoked Enterprise Bean and include these stubs in the invoking EAR file.#
    The Enterprise Bean is looked up without using the EJB references. The format for specifying the lookup name is as follows:
    HITACHI_EJB/SERVERS/server-name/EJBBI/J2EE-APP-name/Enterprise-Bean-name
    server-name: J2EE server name
    J2EE-APP-name: Lookup name of the J2EE application
    Enterprise-Bean-name: Lookup name of the Enterprise Bean
    #
    If you use the dynamic class loading functionality for invocation of the business interface between applications, you need not include the stubs. However, Hitachi does not recommend the use of the dynamic class loading functionality from the point of view of performance.

(2) For an Enterprise Bean running on another J2EE server

To invoke the Enterprise Bean:

  1. Include the business interface of the invoked Enterprise Bean as well as the user-created classes used in the interface in the invoking EJB-JAR file or the WAR file.
  2. Acquire the stubs by using the cjgetstubsjar command for the invoked Enterprise Bean and include these stubs in the invoking EAR file.#
    The Enterprise Bean is looked up without using the EJB references. The format for specifying the lookup name is as follows:
    HITACHI_EJB/SERVERS/server-name/EJBBI/J2EE-APP-name/Enterprise-Bean-name
    server-name: J2EE server name
    J2EE-APP-name: Lookup name of the J2EE application
    Enterprise-Bean-name: Lookup name of the Enterprise Bean
    #
    If you use the dynamic class loading functionality for invocation of the business interface between applications, you need not include the stubs. However, Hitachi does not recommend the use of the dynamic class loading functionality from the point of view of performance.