deploy

Description

Deploys a J2EE EAR file, J2EE WAR file, J2EE JAR file, or Jaguar JAR file to the server.

Syntax

Local mode support: Yes.

Command line:

deploy 
[ connect-args | local-args ]
[-type filetype] 
[-stubsandskels true|false]
[-jagjartype jartype]
[-install true|false] 
[-strategy strategy] 
[-verbose true|false]
[-interoperablenaming true|false]
[-setjarfilepackagenaming=”true|false”]
filename

Ant build file:

<jag_deploy
[ type="filetype" ]
[ stubsandskels="true|false" ]
[ jagjartype="jartype" ]
[ install="true|false" ]
[ strategy="strategy" ]
[ verbose="true|false" ]
[ interoperablenaming=”true|false” ]
[setjarfilepackagenaming=”true|false”]
file="filename” />

Option

Description

Default

Required

connect-args | local-args

Arguments to specify a connection to the server or to run in local mode. See “Local versus connected mode”.

-

Yes

type

The type of file deployed:

  • ear

  • war

  • ejbjar

  • jagjar

  • rar

ear

No

stubsandskels

Indicates whether stubs and skeletons should be generated for EJB files. This flag is applicable only to EAR and EJB files.

true

No

jagjartype

When type is jagjar, specifies the contents of the Jaguar JAR file. Options are:

  • Application

  • Connector

  • EntityCollection

  • Package

  • WebApplication

Application for type jagjar; otherwise, none

Only for type jagjar

install

Indicates whether installed entities should be automatically deployed in servers.

true

No

strategy

Indicates the deployment strategy. Options are:

You can specify incremental when the methods, fields, interfaces, or superclass of a class have changed. Specify full when other details have changed or IDL has been deleted.

incremental

No

interoperablenaming

Enables interoperable naming. This option is available only when you are running JDK 1.3—see “Interoperable naming”.

true

No

setjarfilepackagenaming

For EAR or EJB-JAR files, specifies how newly created packages are named, as follows:

  • true indicates that entities use the name of the archive file that they are imported from.

  • false indicates that entities use the display-name element in the deployment descriptor.

false

No

verbose

Indicates that output during deployment is verbose.

false

No

filename

The name of the deployed file.

-

Yes

Returns

Return value

Indicates

0

The command ran successfully; the result is true/success.

1

The command ran successfully; the result is false/failure.

2

The command did not run successfully; an exception was thrown.

Examples

Example 1

This command runs in local mode and deploys the EJB-JAR file named myejb.jar into the server named FooServer:

jagtool -local -server FooServer deploy -type ejbjar myejb.jar

Example 2

This example deploys the J2EE EAR file eastore.ear to the server:

Example 3

This example deploys the JAR file AuthServiceDemo.jar to the server:

See also

export, gen_stubsandskels, install, Chapter 9, “Importing and Exporting Application Components”