deploy

Description

Deploys a J2EE archive to the server.

Syntax

deploy 
[-jdk15]
[-package package-name] 
[-eas5naming true-false] 
[-jspc true-false] 
[-disableValidation true-false] 
[-overwrite true-false] 
[-server host:port] 
[-copyWithConfig destDir ] 
[-noidl]
modules 
[-jacc]

Option

Description

-jdk15

If specified, EAServer compiles generated Java source files with the JDK 1.5 compiler. Otherwise, JDK 1.4 is used.

-server host:port

Remotely deploys the archive to the server running on the specified host and listening on the specified HTTP port. If you do not specify a server, the archive deploys locally to the same installation from where you run the deploy command.

You must have an active wlogin session with the server, using an account that has Administrator role privileges on that server.

NoteInstead of using the host:port syntax, you can pass the server name, if it is defined in the local repository.

-package package-name

When deploying a single archive, this option overrides the default package name, which is the base name of the archive file (unless you specify -eas5naming true, in which case the default is the base name of the archive’s deployment descriptor file).

-package:pkg-name new-name

When deploying an EAR or multiple archives of any format, this option overrides the default package name for the specified archive. For example, if an EAR file contains an EJB-JAR file foo.jar, -package:foo bar specifies that the EJBs in foo.jar must be deployed in the package bar rather than using the default package name of foo.

-eas5naming true-false

Causes deploy to select default package names from the base name of the deployment descriptor file within the archive. The default is false, which means package names default to the base name of the archive.

-jspc true-false

When deploying a Web application, whether to compile the JSPs it contains. The default is true.

-overwrite true-false

Whether to overwrite existing entities with the same name as those in the archive. In the as-installed configuration, the default is true. You can change the default as described in “Configuring deployment defaults”.

-copyWithConfig destDir

If specified, a copy of the archive file is created in the EAServer installation in the specified destination directory. The copy is identical to the source, except that an EAServer configuration file is added to the META-INF directory. The destination directory must exist and be a full path or a path relative to the current directory.

-contextPath path

When deploying a WAR file, the context path for the deployed Web application. If not specified, the default is the base name of the WAR file converted to all lowercase letters.

-jsr154filter true-false

When deploying a Web application, whether to enable the JSR 154 support filter in the Web application. The JSR 154 filter provides a more strict interpretation of the Servlet 2.4 specification. Specifically:

  • Support for request attribute listeners. These are not allowed unless the JSR 154 filter is enabled.

  • Support for dispatching of chained requests with “wrap under” rather than “wrap over” semantics, as described in the Jetty documentation. If the JSR 154 filter is disabled, chained requests use “wrap over” semantics.

The default is false.

-parentCl classloader-name

Overrides the default parent class loader. The default depends on what you are deploying:

  • For EJB components and Web applications deployed in an EAR file, the default parent class loader is the class loader of the parent application.

  • For Web applications deployed in a standalone WAR file, the default parent is lib.default-ext.

  • For EJB components deployed in a standalone EJB-JAR file, the default parent is the default class loader.

-disableValidation true-false

Specifies whether to validate J2EE deployment descriptors. In the as-installed configuration, the default of false enables validation as required by the J2EE specification. You can change the default as described in “Configuring deployment defaults”.

-keepModuleOnFailure true-false

Specifies whether to remove or keep partially deployed files when deployment fails. In the as-installed configuration, the default is false, which causes partially deployed files to be removed if the deployment fails. You can change the default as described in “Configuring deployment defaults”.

-noidl

If specified, disables generation of CORBA IDL when deploying EJB-JAR files or EAR files that contain EJB-JAR files. CORBA IDL is required to invoke EJB components from CORBA or PowerBuilder clients. Deployment may be slightly faster if IDL generation is disabled.

You disable IDL generation for all deployments by running the command:

configure idl-generator-off

To enable IDL generation, run the following command. You can still disable IDL generation by specifying the -noidl command-line option:

configure idl-generator-on

modules

The path and name to one or more J2EE archive files. You can specify multiple archives, separated by commas. The following extensions and formats are allowed:

  • ear – other archive formats bundled inside an enterprise EAR file. Deploys as an application.

  • jar – an EJB-JAR or J2EE application client archive.

  • rar – a J2EE connector or resource adaptor archive.

  • war – a Web application archive.

-jacc

If specified, EAServer configures the deployed module to use a custom JACC (Java Authorization Contract for Containers) implementation to enforce authorization constraints, rather than the default role-based access control mechanism.

In addition to the above options, the following table describes deployment options used to deploy an EJB as a Web service. See Chapter 4, “Web Services Administration” for more information.

Option

Description

-contextPath path

Specifies the context path for Web application deployment. The default is the name of the WAR file. If the -package option is specified, then the package is the context path.

-ws

Exposes any stateless session beans with a remote interface as a Web service.

-ws:ejbName

Exposes the stateless session bean ejbName as a Web service.

-ws:jarFileInEar:ejbName

Exposes the stateless session bean ejbName in jarFile in an application as a Web service.

-wscontextpath

Specifies the context path for an EJB Web service.

-wscontextpath:jarFileInEar:contextpath

Specifies the context path for an EJB Web service in an application EAR.

-wsstyle <style>

Specifies the style (DOCUMENT, RPC or WRAPPED) of the binding in the generated WSDL file when you expose an EJB as a Web service.

-wsstyle:jarFileInEar:style

Specifies the style (DOCUMENT, RPC or WRAPPED) of the binding in the generated WSDL file when you expose an EJB as a Web service in an application EAR.

-wsuse <use>

Specifies the use (LITERAL or ENCODED) of items in the binding for the generated WSDL file when you expose an EJB as a Web service.

-wsuse:jarFileInEar:use

Specifies the use (LITERAL or ENCODED) of items in the binding for the generated WSDL when you expose an EJB as a Web service in an application EAR file.

-wswebappname <webappname>

Overrides the default Web application name generated from an EJB Web service.

-wswebappname:jarFileInEar:webappname

Overrides the default Web application name generated from an EJB Web Service in an application EAR file.

Configuring deployment defaults The configuration file deploytool-options.xml in the EAServer config subdirectory configures defaults for some deployment settings, such as the default values for the -overwrite, -disableValidation, and -keepModuleOnFailure options. To change the defaults, edit the configuration file and apply the settings with the Management Console or the following configure command:

configure deploytool-options

See also

export-config, undeploy