EJB deployment tool

The EJB deployment tool is primarily used for generating deployment code for EJB beans at 2.1 or earlier specification-levels. However, the tool can tolerate EJB beans at 3.0 or later specification-levels. For more details on the term tolerate, see the Tolerating Enterprise JavaBeans at 3.0 or later specification-level section in The ejbdeploy command topic.

Before you can successfully run your enterprise beans on either a test or production server, you need to generate deployment code for the enterprise beans. The EJB deployment tool provides a command-line interface that you can use to generate enterprise bean deployment code. The tool employs this command-line environment that enables you to run a build process overnight and have the deployment tool automatically invoked to generate your deployment code in batch mode.

The EJB deployment tool is invoked from the command line using the ejbdeploy command, which accepts an input EJB JAR or EAR file that contains one or more enterprise beans. It then generates an output, deployed JAR file, or EAR file that contains deployment code in the form of .class files.

For a complete description of all the options available to the ejbdeploy, see the related reference The ejbdeploy command.

The EJB deployment tool supports EJB single and multiple table inheritance. It supports the use of converters, which translate a database representation to a Java object type, and composers, which are used to map a single, complex bean field to multiple database columns. The EJB deployment tool supports the following levels of access intent (where AccessIntent is a WebSphere® extension):

  1. wsPessimisticUpdateWeakestLockAtLoad
  2. wsPessimisticUpdate
  3. wsPessimisticUpdate-NoCollision
  4. wsPessimisticUpdate-Exclusive
  5. wsPessimisticRead
  6. wsOptimisticUpdate
  7. wsOptimisticRead

For more information about these access intents, see the related topic Access intent and isolation level.

In addition to these values, an access intent can also contain an optional read ahead hint.

Note: The read ahead hint indicates how deeply to read ahead in an EJB relationship graph.
2.0 EJB projects only: Mapping to multiple back-end databases is also supported. The schemas and the generated data definition language (DDL) file are stored in the following directory of the JAR or EAR file:

META-INF\backends\backend_id\databasename.dbm

META-INF\backends\backend_id\Table.ddl

If multiple back ends exist and you did not set the current back-end ID in the EJB deployment descriptor, the EJB deployment tool defaults to the first back-end ID that appears as a folder in the respective META-INF\backends directory as described earlier. If you map to a single backend database, then the generated DDL file appears both in the directory as described above and also in the META-INF folder.

You can perform the following tasks with the EJB deployment tool:

Also refer to Message format for EJB validation to understand the format used for messages generated by the EJB validator.


Feedback