Hitachi

uCosminexus Application Server Application Setup Guide


7.2.1 Importing the Enterprise Beans (EJB-JAR)

Before executing the J2EE application by using the EJB components, import the Enterprise Beans (EJB-JAR). You can import EJB-JARs with DDs conforming to EJB 1.1, 2.0, 2.1, or 3.0 specifications, or EJB-JARs with annotations.

Note that various EJB sample programs are stored in the following directories:

In Windows

Cosminexus-installation-directory\CC\examples\

In UNIX

/opt/Cosminexus/CC/examples/

For an EJB-JAR with a DD, confirm that the DD conforms to the DTD and then import the EJB-JAR. If an EJB-JAR with a DD not conforming to the DTD specifications is imported, a message will be output. For details on the output messages, see the manual uCosminexus Application Server Messages.

Execute the following command to import EJB-JAR:

Execution format
cjimportres [server-name] [-nameserver provider-URL] -type ejb -f path-of-EJB-JAR-file
Example of execution
cjimportres MyServer -type ejb -f account.jar

For details on the cjimportres command, see cjimportres (import resource) in the uCosminexus Application Server Command Reference Guide.

Note:
  • If you import an EJB-JAR with a version 1.1 DD, the DD version in the J2EE server will change to version 2.0.

  • You cannot import an EJB-JAR with a DD not conforming to EJB 1.1, 2.0, 2.1, or 3.0 specifications.

  • Do not import EJB-JAR with the name hitachi-runtime.jar.

  • The JAR file name specified when importing is used as the directory name of the working directory. Also, in the JAR file, if there is a class that implements java.rmi.Remote, (for example, the home interface), then based on the definition in the usrconf.properties file, a stub is generated in the working directory when deploying or starting the application. In the case of default settings, a stub will be created for the remote and home interfaces coded in ejb-jar.xml. When app is specified in the ejbserver.deploy.stub.generation.scope key of the usrconf.properties file, the stubs will be generated for all the interfaces that implement the remote interface included in the JAR file.

    Considering the above points, specify a JAR file name and the package name or the class name of the class that implements the java.rmi.Remote, so that the path length of the working directory does not reach the upper limit specified for the platform.

    For details on estimating the path length of the working directory, see C.1 Work directory of the J2EE server in the uCosminexus Application Server System Setup and Operation Guide.