IBM


14.2.1 Using EJBDeploy command-line tool

You can generate the EJB deployment code using the EJBDeploy command-line tool. The syntax of the EJBDeploy command is shown in Example 14-4.

Example 14-4 EJBDeploy syntax

EJBDeploy (v6.1, o0619.34)

Syntax: EJBDeploy inputEar workingDirectory outputEar [options]
Options:
  -cp "jar1;jar2"   List of jar filenames required on classpath
  -codegen          Only generate the deployment code, do not run RMIC or Javac
  -bindear:options  Bind references within the EAR
  -dbschema schema  The name of the schema to create
  -dbvendor DBTYPE  Set the database vendor type, to one of:
         DB2UDB_V81 DB2UDB_V82
         DB2UDBOS390_V7  DB2UDBOS390_V8 DB2UDBOS390_NEWFN_V8
         DB2UDBISERIES_V53  DB2UDBISERIES_V54
         DERBY_V10
         INFORMIX_V93      INFORMIX_V94      INFORMIX_V100
         MSSQLSERVER_2000  MSSQLSERVER_2005
         ORACLE_V9I        ORACLE_V10G
         SYBASE_V1250      SYBASE_V15
         SQL92 (*)         SQL99 (*)    *Deprecated
  -debug            Compile the code with java debug information
  -keep             Do not delete the contents of the working directory
  -ignoreErrors     Do not halt for compilation or validation errors
  -quiet            Only display errors, suppress informational messages
  -nowarn           Disable warning and informational messages
  -noinform         Disable informational messages
  -rmic "options"   Set additional options to use for RMIC
  -trace            Trace progress of the deploy tool
  -sqlj             Use SQLJ instead of JDBC
  -OCCColumn        Add a column for collision detection for WebSphere 6.0             or later release
  -outer            Use OUTER semantics for path expressions in EQL queries             for J2EE 1.3 applications   -complianceLevel  JDK level for compiler compliance

For a complete description of the EJBDeploy command and its parameters, see the Information Center. Search for ejbdeploy.

Example 14-5 shows a sample EJBDeploy run using the Plants by WebSphere EAR file.

Example 14-5 EJBDeploy sample run

C:\WebSphere\AppServer\bin>ejbdeploy c:\PlantsByWebSphereEnhanced.ear c:\temp c:\PlantsByWebSphereEnhanced_Deployed.ear -dbvendor DB2UDB_V82
Start workbench.
framework search path: c:\WebSphere\AppServer\deploytool\itp\plugins
Creating the project.
Deploying jar PlantsByWebSphereEJB
Validating
Generating deployment code
Generating DDL
Generating DDL
...
...
Invoking RMIC.
Writing output file
Shutting down workbench.
EJBDeploy complete.
0 Errors, 62 Warnings, 0 Informational Messages

Not shown in the listing above are the warnings that the validators spot. These warnings are things like if a local variable has been declared but is not used or if a Serializable class does not specify a static final long serialVersionUID. These warnings are not critical.

Tip: WAS also provides a set of Ant tasks that use to automate the packaging and deployment of your applications. One of those tasks allows you to call EJBDeploy. Search for Ant tasks in the Information Center for more details.


Redbooks ibm.com/redbooks

Next