All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.glassfish.deployment.admin.deploy.1 Maven / Gradle / Ivy

There is a newer version: 10.0-b28
Show newest version

asadmin Utility Subcommands                             deploy(1)

NAME
     deploy - deploys the specified component

SYNOPSIS
     deploy [--help] [--force={false|true}] [--virtualservers virtual-servers]
     [--contextroot context-root] [--precompilejsp={false|true}] [--verify={false|true}]
     [--name component-name] [--upload={true|false}]
     [--retrieve local-dirpath] [--dbvendorname dbvendorname]
     [--createtables={true|false} | --dropandcreatetables={true|false}]
     [--uniquetablenames={true|false}] [--deploymentplan deployment-plan]
     [--enabled={true|false}] [--generatermistubs={false|true}]
     [--availabilityenabled={false|true}] [--libraries jar-file[,jar-file]*]
     [--target target] [--type pkg-type]
     [--properties(name=value)[:name=value]*] filepath

DESCRIPTION
     The deploy subcommand deploys applications  to  the  server.
     Applications  can  be  enterprise applications, web applica-
     tions,  Enterprise  JavaBeans   (EJB)   modules,   connector
     modules, and application client modules. If the component is
     already deployed or already exists,  it  is  forcibly  rede-
     ployed  if  the  --force  option  is set to true (default is
     false).

     This subcommand is supported in remote mode only.

OPTIONS
     --help
     -?

         Displays the help text for the subcommand.

     --force
         If set to true, redeploys  the  component  even  if  the
         specified component has already been deployed or already
         exists. Default is false.

     --virtualservers

         One  or  more  virtual  server  IDs.  Multiple  IDs  are
         separated by commas.

     --contextroot
         Valid only if the archive is a web module. It is ignored
         for  other  archive  types; defaults to filename without
         extension.

Java EE 6            Last change: 8 Oct 2009                    1

asadmin Utility Subcommands                             deploy(1)

     --precompilejsp

         By default this option does not  allow  the  JSP  to  be
         precompiled  during  deployment.  Instead, JSPs are com-
         piled during runtime. Default is false.

     --verify
         If set to true and the required  verifier  packages  are
         installed  from the Update Center, the syntax and seman-
         tics of the deployment descriptor is  verified.  Default
         is false.

     --name

         Name of the deployable component.

     --upload
         Uploads  the  deployable  file  to  the   administration
         server.  The deployable file must be accessible from the
         client. If the file is accessible  to  both  server  and
         client,  set  the  --upload  option to false. Default is
         true.

     --retrieve

         Retrieves the client  stub  JAR  file  from  the  server
         machine to the local directory.

     --dbvendorname
         Specifies the name of  the  database  vendor  for  which
         tables are created. Supported values include db2, mssql,
         oracle,  derby,  javadb,  postgresql,   pointbase,   and
         sybase, case-insensitive. If not specified, the value of
         the database-vendor-name attribute in sun-ejb-jar.xml is
         used.  If no value is specified, a connection is made to
         the resource specified by the  jndi-name  subelement  of
         the  cmp-resource  element  in the sun-ejb-jar.xml file,
         and the database vendor name is read. If the  connection
         cannot  be  established,  or  if the value is not recog-
         nized, SQL-92 compliance is presumed.

     --createtables

         Creates tables at  deployment  of  an  application  with
         unmapped  CMP  beans.  Default  is the create-tables-at-
         deploy entry in the cmp-resource  element  of  the  sun-
         ejb-jar.xml file.

Java EE 6            Last change: 8 Oct 2009                    2

asadmin Utility Subcommands                             deploy(1)

     --dropandcreatetables

         If set to true, when the component  is  redeployed,  the
         tables  created  by  the previous deployment are dropped
         before creating  the  new  tables.  Applies  to  already
         deployed  applications  with  unmapped  CMP  beans. Pre-
         existing tables will  not  be  dropped  on  the  initial
         deployment  of  an application or a deployment that fol-
         lows an explicit undeploy. If not set,  the  tables  are
         dropped  if  the  drop-tables-at-undeploy  entry  in the
         cmp-resource element of the sun-ejb-jar.xml file is  set
         to  true.  The  new  tables  are  created if the create-
         tables-at-deploy entry in the  cmp-resource  element  of
         the sun-ejb-jar.xml file is set to true.

     --uniquetablenames
         Guarantees unique table names  for  all  the  beans  and
         results in a hash code added to the table names. This is
         useful if you have an  application  with  case-sensitive
         bean  names.  Applies  to applications with unmapped CMP
         beans.

     --deploymentplan

         Deploys the deployment plan, which is a  JAR  containing
         Sun-specific  descriptors.  This  should be passed along
         when deploying a pure EAR file. A pure EAR  file  is  an
         EAR without Sun-specific descriptors.

     --enabled
         Allows users to access the application. If set to false,
         users  will  not  be  able  to  access  the application.
         Default is true.

     --generatermistubs

         If set to true, static RMI-IIOP stubs are generated  and
         put  into the client.jar. If set to false, the stubs are
         not generated. Default is false.

     --availabilityenabled
         Do not specify this option. This option is retained  for
         compatibility  with  other releases. If you specify this
         option, a syntax error does not occur. Instead, the sub-
         command  runs  successfully  and  the option is silently
         ignored.

Java EE 6            Last change: 8 Oct 2009                    3

asadmin Utility Subcommands                             deploy(1)

     --libraries

         A comma-separated list of library JAR files. Specify the
         library  JAR  files by their relative or absolute paths.
         Specify   relative   paths   relative    to    instance-
         root/lib/applibs.  The  libraries  are made available to
         the application in the order specified.

     --target
         Do not specify this option. This option is retained  for
         compatibility  with  other releases. If you specify this
         option, a syntax error does not occur. Instead, the sub-
         command  runs  successfully  and  the option is silently
         ignored.

     --type

         The packaging archive type  of  the  component  that  is
         being deployed. Possible values are as follows:

         osgi
             The component is packaged as an OSGi  Alliance  bun-
             dle.

         The --type option is optional. If the component is pack-
         aged as a regular archive, omit this option.

     --properties or --property

         Optional keyword-value  pairs  that  specify  additional
         properties  for the deployment. The available properties
         are determined by the implementation  of  the  component
         that  is  being deployed or redeployed. The --properties
         option and the --property option are equivalent. You can
         use either option regardless of the number of properties
         that you specify. You can specify the following  proper-
         ties for a deployment:

         jar-signing-alias
             Specifies the alias  for  the  security  certificate
             with which the application client container JAR file
             is signed. Java Web Start will  not  run  code  that
             requires elevated permissions unless it resides in a
             JAR file signed with a certificate that  the  user's
             system  trusts.  For  your  convenience,  Enterprise
             Server signs the JAR file  automatically  using  the
             certificate  with  this alias from the domain's key-
             store. Java Web Start then asks the user whether  to
             trust  the  code  and displays the Enterprise Server

Java EE 6            Last change: 8 Oct 2009                    4

asadmin Utility Subcommands                             deploy(1)

             certificate information.  To sign this JAR file with
             a  different certificate, add the certificate to the
             domain keystore, then use this property.  For  exam-
             ple,  you  can  use  a  certificate  from  a trusted
             authority, which avoids the Java Web  Start  prompt,
             or  from your own company, which users know they can
             trust. Default is s1as,  the  alias  for  the  self-
             signed certificate created for every domain.

         java-web-start-enabled

             Specifies whether Java Web Start access is permitted
             for an application client module. Default is true.

         jruby-home
             Specifies the directory where JRuby itself (not  the
             Enterprise  Server  JRuby  container)  is installed.
             Default is as-install/jruby.

         jruby-runtime

             Specifies the initial number of  JRuby  runtimes  to
             start.  Must  be  at  greater  than  zero,  at least
             jruby.runtime.min, and  jruby.runtime.max  or  less.
             Overrides  the  jruby-runtime  attribute  of  jruby-
             runtime-pool. Default is 1.

         jruby-runtime-min
             Specifies the minimum number of  JRuby  runtimes  in
             the  pool.  Must be greater than zero, jruby.runtime
             or less, and jruby.runtime.max  or  less.  Overrides
             the  jruby-runtime-min  attribute  of jruby-runtime-
             pool. Default is 1.

         jruby-runtime-max

             Specifies the maximum number of  JRuby  runtimes  in
             the  pool.  Must  be  greater  than  zero,  at least
             jruby.runtime.min, and at least jruby.runtime. Over-
             rides  the  jruby-runtime-max  attribute  of  jruby-
             runtime-pool. Default is 1.

         jruby-rackEnv
             Specifies the environment in which a JRuby  applica-
             tion  such as Rails or Merb runs. Allowed values are
             development,  production,  or   test.   Default   is

Java EE 6            Last change: 8 Oct 2009                    5

asadmin Utility Subcommands                             deploy(1)

             development.

         jruby-applicationType

             Specifies the name of a supported framework  or  the
             path  to a script that initializes the user's frame-
             work.  Allowed  values  corresponding  to  supported
             frameworks are Rails, Merb, or Sinatra. Setting this
             property  bypasses  the  normal,   and   potentially
             lengthy,  auto-detection  process and forces deploy-
             ment on the specified  framework.  If  the  deployed
             application  is not written for the specified frame-
             work, errors result.  Default  is  computed  through
             auto-detection.

         jruby-MTSafe
             If true, specifies that a  framework  being  started
             using   jruby.applicationType   is  thread-safe  and
             therefore does not need a pool created for it.  This
             property   affects  applications  started  using  an
             auto-detected  user-provided  startup   script.   If
             jruby.applicationType is set and jruby.MTsafe is not
             set or is set to false, the application starts  with
             a  pool  of application instances, and each instance
             of the application is accessed by one  thread  at  a
             time.  This  property  only affects frameworks being
             launched where the thread safety cannot be automati-
             cally  determined. Setting jruby.MTsafe to true does
             not cause an auto-detected Rails  2.1.x  application
             to  be  launched  in thread-safe mode, nor can it be
             used to force a thread-safe framework  to  start  in
             pooled  mode.  Default  is  computed  through  auto-
             detection.

         compatibility

             Specifies the Enterprise Server release  with  which
             to be backward compatible in terms of JAR visibility
             requirements  for  applications.  The  only  allowed
             value  is v2, which refers to GlassFish version 2 or
             Enterprise Server version 9.1 or 9.1.1.  The Java EE
             6  platform  specification imposes stricter require-
             ments than Java EE 5 did on which JAR files  can  be
             visible  to  various  modules within an EAR file. In
             particular, application clients must not have access
             to  EJB JAR files or other JAR files in the EAR file
             unless references use the standard Java  SE  mechan-
             isms  (extensions,  for  example)  or  the  Java  EE
             library-directory mechanism. Setting  this  property
             to v2 removes these Java EE 6 restrictions.

Java EE 6            Last change: 8 Oct 2009                    6

asadmin Utility Subcommands                             deploy(1)

         keepSessions={false|true}

             If the --force option is set to true, this  property
             can  by  used  to specify whether active sessions of
             the  application  that  is  being   redeployed   are
             preserved and then restored when the redeployment is
             complete. Applies to HTTP sessions  in  a  web  con-
             tainer. Default is false.

             false
                 Active  sessions  of  the  application  are  not
                 preserved and restored (default).

             true

                 Active sessions of the application are preserved
                 and restored.

                 If any active session of the  application  fails
                 to  be  preserved  or restored, none of the ses-
                 sions will be available when the redeployment is
                 complete.  However,  the  redeployment continues
                 and a warning is logged.

                 To preserve active sessions,  Enterprise  Server
                 serializes   the  sessions  and  saves  them  in
                 memory.  To  restore  the  sessions,  the  class
                 loader   of  the  newly  redeployed  application
                 deserializes any sessions that  were  previously
                 saved.

             Other available properties  are  determined  by  the
             implementation  of the component that is being rede-
             ployed.

OPERANDS
     filepath
         if the --upload option is set to true, this is the  path
         to the deployable file on the local client machine. Oth-
         erwise, this is the absolute path to  the  file  on  the
         server machine.

EXAMPLES
     Example 1 Deploying an Enterprise Application

     This example deploys the enterprise application packaged  in
     the Cart.ear file.

Java EE 6            Last change: 8 Oct 2009                    7

asadmin Utility Subcommands                             deploy(1)

       asadmin> deploy Cart.ear
       Command deploy executed successfully

     Example 2 Deploying a Web Application With the Default  Con-
     text Root

     This example deploys the web application  in  the  hello.war
     file.

       asadmin> deploy hello.war
       Command deploy executed successfully

     Example 3  Forcibly  Deploying  a  Web  Application  With  a
     Specific Context Root

     This example  forcibly deploys the web  application  in  the
     hello.war  file. The context root of the deployed web appli-
     cation is greetings. If the  application  has  already  been
     deployed, it is redeployed.

       asadmin> deploy  --force=true --contextroot greetings hello.war
       Command deploy executed successfully

     Example 4 Deploying an Enterprise Bean

     This example deploys a component based on the EJBTM specifi-
     cation  (enterprise  bean) with CMP and creates the database
     tables used by the bean.

       asadmin> deploy --createtables=true EmployeeEJB.jar
       Command deploy executed successfully

     Example 5 Deploying a Connector Module

     This example deploys a connector module that is packaged  in
     an RAR file.

Java EE 6            Last change: 8 Oct 2009                    8

asadmin Utility Subcommands                             deploy(1)

       asadmin> deploy jdbcra.rar
       Command deploy executed successfully

EXIT STATUS
     0                           subcommand executed successfully

     1                           error in executing  the  subcom-
                                 mand

SEE ALSO
     redeploy(1), list-components(1), undeploy(1)

     asadmin(1M)

     Sun  GlassFish  Enterprise  Server  v3  Preview  Application
     Deployment Guide

Java EE 6            Last change: 8 Oct 2009                    9





© 2015 - 2025 Weber Informatics LLC | Privacy Policy