Syntax and parameters of the ejbdeploy tool
Product
The ejbdeploy tool is available in WAS and WAS Network Deployment.
Authority
No special authorities are required to run this script.
Syntax
The syntax of the ejbdeploy command is:
ejbdeploy input_JAR_name working_directory output_JAR_name [ -cp "classpath" ] [ -codegen ] [ -bindear "options" ] [-dbschema schema_name ] [ -dbvendor vendor_name ] [ -debug ] [ -keep ] [ -ignoreErrors ] [ -quiet ] [ -nowarn ] [ -noinform ] [ -rmic "options" ] [ -35 ] [ -40 ] [ -trace ] [ -sqlj ]Parameters
The parameters of the ejbdeploy command are:
input_JAR_name
This is a required parameter. The value input_JAR_name specifies the fully-qualified name of the input JAR or EAR file that contains the enterprise beans for which you want to generate deployment code. If your input JAR or EAR file contains CMP beans, the ejbdeploy command automatically creates the schemas and mappings for the CMP beans. In WAS Version 5, the ejbdeploy tool does not use the information that is specified on the system class path. Instead, the dependent classes need to be contained in a JAR file and included in the command processing using the -cp option. You must ensure that the .class files of each enterprise bean's home and remote classes are packaged in the input JAR or EAR file.working_directory
This is a required parameter. The value working_directory specifies the name of the directory where the tool stores temporary files that are required for code generation. You can specify an existing directory or a new directory for this parameter.
- If you specify an existing directory, the temporary files are created in the working directory and are not removed.
- If you specify a directory that does not exist when you run the command, the tool creates the directory and stores the temporary files in it. After the tool generates the deployment code, it removes the working directory and all of the temporary files stored in the directory. If you specify a new directory and do not want the directory and the temporary files to be removed, include the -keep parameter when you run the tool.
output_JAR_name
This is a required parameter. The value output_JAR_name specifies the fully-qualified name of the output JAR or EAR file that is created by the ejbdeploy command and that contains the generated classes required for deployment. The directories that you specify in the fully-qualified name must exist before you run the ejbdeploy command.Note: If you specify the name of an existing JAR or EAR file for this parameter, the existing file is overwritten.
-cp
Optional. If you want to generate deployment code for a JAR or EAR file that has dependencies on other JAR or EAR files, use the -cp option to specify the classpath of the other JAR or EAR files. Use the -cp option to specify multiple JAR or EAR files. If you specify multiple files, the JAR or EAR file names must be fully-qualified, separated by semicolons (;), and enclosed in double quotation marks ("), as shown in this example:-cp "/home/myProfile/myApps/myJar1.jar:/home/myProfile/myApps/myJar2.jar-codegen
Optional. If you specify this parameter, the ejbdeploy tool performs these tasks:
- Imports code from the input JAR or EAR file
- Generates the deployment code
- Exports the code to the output JAR or EAR file
When you specify the -codegen parameter, the tool does not compile the generated deployment code or run RMIC.
-bindear
Optional that enables you to populate an EAR file with bindings. The options must be separated by a space and enclosed in double quotation marks ("), as shown in this example:-bindear "xx yy zz"If you want to use the default bindings, specify this parameter without any options. For more information on bindings, see Administer namespace bindings in Administration.
Note: This parameter applies only to EAR files.
-dbschema
Optional. The value schema_name specifies the name of the schema that you want to create. If the name of the schema contains any spaces, the entire name must be enclosed in double quotes ("), as shown in this example:-dbschema "my schema"Note: This parameter is only used when creating a database definition in the top-down mode of operation. The database information is then saved in the schema document in the JAR or EAR file, meaning that the options do not need to be respecified. It also means that when a JAR or EAR is generated by WebSphere Studio, the correct database must be defined at that point because it cannot be changed later.
-dbvendor
Optional. The value vendor_name specifies the name of the database vendor, which is used to determine database column types, mapping information, Table.ddl, and other information. For enterprise beans that run on iSeries, specify DB2UDBISERIES for this parameter. DB2 for iSeries is the only vendor supported on iSeries.Note: This parameter is only used when creating a database definition in the top-down mode of operation. The database information is then saved in the schema document in the JAR or EAR file, meaning that the options do not need to be respecified. It also means that when a JAR or EAR is generated by WebSphere Studio, the correct database must be defined at that point because it cannot be changed later.
-debug
Optional. If you specify this parameter, the ejbdeploy tool compiles the deployment code with debug information.-keep
Optional. If you specify this parameter, the ejbdeploy tool does not remove the working directory after it runs.-ignoreErrors
Optional. If you specify this parameter, the ejbdeploy tool continues processing even if compilation or validation errors are detected.-quiet
Optional. If you specify this parameter, the ejbdeploy tool suppresses status messages, but displays error messages.-nowarn
Optional. If you specify this parameter, the ejbdeploy tool suppresses warning and informational messages.-noinform
Optional. If you specify this parameter, the ejbdeploy tool suppresses informational messages.-rmic
Optional. Use this parameter to pass RMIC options to RMIC. The options must be separated by a space and enclosed in double quotation marks ("), as shown in this example:-rmic "-nowarn -verbose"For more information about RMIC options, see Sun's Java RMI documentation.
-35
Optional. For CMP entity beans, the ejbdeploy tool looks in the JAR or EAR file for an existing schema and map to use when it generates deployment code. If the tool does not find an existing schema and map, it creates a schema and map based on improved top-down mapping rules. If you want to use the same top-down mapping rules for CMP entity beans that are used in the ejbdeploy tool provided with WAS, Version 3.5, then specify the -35 option. If you do not specify the -35 option, the ejbdeploy tool uses a new form of top-down mapping. (In the top-down mapping approach, you already have existing enterprise beans and their design determines the database design. You generate a schema and map and the generated schema contains one table for each entity bean with container-managed persistence. In these tables, each column corresponds to a CMP field of the enterprise bean, and the generated mapping maps the field to the column.)Note: This parameter is only used when creating a database definition in the top-down mode of operation. The database information is then saved in the schema document in the JAR or EAR file, meaning that the options do not need to be respecified. It also means that when a JAR or EAR is generated by WebSphere Studio, the correct database must be defined at that point because it cannot be changed later.
-40
Optional. For CMP entity beans, the ejbdeploy tool looks in the JAR or EAR file for an existing schema and map to use when it generates deployment code. If the tool does not find an existing schema and map, it creates a schema and map based on improved top-down mapping rules. If you want to use the same top-down mapping rules for CMP entity beans that are used in the ejbdeploy tool provided with WAS, Version 4.0, then specify the -40 option. If you do not specify the -40 option, the ejbdeploy tool uses a new form of top-down mapping. (In the top-down mapping approach, you already have existing enterprise beans and their design determines the database design. You generate a schema and map and the generated schema contains one table for each entity bean with container-managed persistence. In these tables, each column corresponds to a CMP field of the enterprise bean, and the generated mapping maps the field to the column.)Note: This parameter is only used when creating a database definition in the top-down mode of operation. The database information is then saved in the schema document in the JAR or EAR file, meaning that the options do not need to be respecified. It also means that when a JAR or EAR is generated by WebSphere Studio, the correct database must be defined at that point because it cannot be changed later.
-trace
Optional. If you specify this parameter, the ejbdeploy tool outputs trace information as it runs.-sqlj
This optional parameter is not supported by WAS on OS/400(R). OS/400 users should use JDBC instead of SQLJ. For more information on the iSeries implementation for SQLJ, see the Access databases using IBM Developer Kit for Java DB2 SQLJ support topic in IBM Developer Kit for Java.