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 of 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(R) extension):
For more information on 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 .ddl file are stored in the following directory of the JAR or EAR file:
EJBname\ejbModule\META-INF\backends\backend_id\schemaname.schxmi
EJBname\ejbModule\META-INF\backends\backend_id\Table.ddl
If multiple backends exist and you did not set the current back-end ID in the EJB deployment descriptor, the EJB deployment tool will default 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 will appear 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.
Generating deployment code for enterprise beans from the command line
The EJB deployment tool provides a command-line interface that you can use to generate enterprise bean deployment code. 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. Implementing query methods in home interfaces for CMP entity beans
EJB 2.x provides a query syntax called EJB QL for both finder and select methods of CMP entity beans. Message format for EJB validation
By default, before EJB deployment code is generated when you use theejbdeploy command from the command line, validation is automatically run on the application.
Related reference
The ejbdeploy command