geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > Deploying and undeploying applications
Date Mon, 24 Jan 2011 06:59:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Deploying+and+undeploying+applications">Deploying
and undeploying applications</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~maojia508">maojia</a>
    </h4>
        <br/>
                         <h4>Changes (29)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h1. Via Geronimo Administration
Console{anchor:GACdeploy} <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">To
install a new application by using the Geronimo Administration Console, the *Install New Applications*
portlet is available by selecting *Deployer* on the *Console Navigation* menu on the left
hand side. This portlet also allows you to start automatically the application right after
it is deployed. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">To
install a new application by using the Geronimo Administration Console, select *Deployer*
on the *Console Navigation* menu on the left side to launch the *Install Applications* portlet.
You can choose to start the application automatically right after it is deployed by selecting
the *start application after installation* check box. This check box is selected by default.
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>!installnewapps.gif! <br>
<br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">For
this example we will be using the simple JSP HelloWorld sample created in the [Quick start
- Apache Geronimo for the impatient] section. In that section however we used the *--inPlace*
deployment option, in other words we did not need to package the application into a *WAR*
file. To create the WAR file type the following command from the *&lt;app_home&gt;*
directory <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">For
this example, we use the simple JSP HelloWorld sample that was created in the [Quick start
- Apache Geronimo for the impatient] section. In that section, however, we used the *--inPlace*
deployment option and did not need to package the application into a *WAR* file. To create
the WAR file type, run the following command from the *&lt;app_home&gt;* directory:
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>*{{jar -cvf HelloWorld.war}}*
* <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">This
WAR already has included in the package the deployment plans. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">This
WAR has already included the deployment plans in the package. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Back
in the Geronimo Administration Console, from the *Install New Applications* portlet click
on *Browse* to specify the path to the {{HelloWorld.war}} in the *Archive:* section. Make
sure the *Start app after install* checkbox is selected (by default is checked) and then click
on *Install*. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Back
in the Geronimo Administration Console, from the *Install New Applications* portlet, click
*Browse* to specify the path to {{HelloWorld.war}} in the *Archive:* section. Make sure that
the *Start application after installation* check box is selected and then click *Install*.
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>You should see the &quot;
{{The application was successfully deployed.}} &quot; and &quot; {{The application
was successfully started.}} &quot; confirmation messages on the top of the portlet. <br>
<br></td></tr>
            <tr><td class="diff-changed-lines" >Another way to verify that the
application <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">has
been</span> <span class="diff-added-words"style="background-color: #dfd;">is</span>
successfully installed and started is by checking the *Installed Web Applications* <span
class="diff-changed-words">portlet<span class="diff-added-chars"style="background-color:
#dfd;">,</span></span> which is available by selecting *Web App WARs* on the
*Console Navigation* menu on the left <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">hand</span>
side. You should see the application listed as *hello* and with the status *running*. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Since</span>
<span class="diff-added-words"style="background-color: #dfd;">Because</span> the
application we installed is {{HelloWold.*WAR*}}, we use this *Installed Web Applications*
<span class="diff-changed-words">portlet<span class="diff-added-chars"style="background-color:
#dfd;"> to verify the installation</span>.</span> When you install an EAR,
you would check the status <span class="diff-added-words"style="background-color: #dfd;">by</span>
using the *Installed Application EARs* portlet available by selecting *Application EARs* on
the *Console Navigation* menu on the left <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">hand</span>
side. The installation procedure is the same for both WAR and EAR applications. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">To
remove the applications through the Geronimo Administration Console you would use these two
portlets, either the *Installed Web Applications* or the *Installed Application EARs* portlets
depending on the application to uninstall. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">To
remove the applications by using the Geronimo Administration Console, use either the *Installed
Web Applications* portlet or the *Installed Application EARs* portlets depending on the application
to uninstall. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>!adminapps.gif! <br>
<br></td></tr>
            <tr><td class="diff-changed-lines" >For our example, access the *Installed
Web Applications* portlet and click <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">on</span>
*Uninstall* for the <span class="diff-added-words"style="background-color: #dfd;">application
that has the</span> *Component Name* <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">listing</span>
*{{sample.applications/HelloWorldApp/1.0/war}}*. This will stop the application <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">first</span>
and then uninstall it.  The confirmation message &quot; {{Uninstalled application}} &quot;
should be listed at the bottom of the portlet. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >These are the basic steps for
installing and uninstalling applications <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">via</span>
<span class="diff-added-words"style="background-color: #dfd;">by using</span>
the Geronimo Administration <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Console,
the</span> <span class="diff-added-words"style="background-color: #dfd;">Console.
The</span> following two sections will focus on the command line options. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h1. Via hot deployment{anchor:Hotdeploy}
<br> <br></td></tr>
            <tr><td class="diff-changed-lines" >Apache Geronimo has support for
_Hot Deployment_, which means that you can copy an application JAR file into the {{&lt;geronimo_home&gt;/deploy}}
directory and the application will be deployed automatically. This <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">will</span>
also <span class="diff-changed-words">work<span class="diff-added-chars"style="background-color:
#dfd;">s</span></span> for uninstalling or refreshing applications previously
deployed <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">via</span>
<span class="diff-added-words"style="background-color: #dfd;">by using</span>
this method. Alternatively, you <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">may</span>
<span class="diff-added-words"style="background-color: #dfd;">can</span> also
copy the _directory_ (unpacked) for the application module instead of copying a single JAR
file. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Note
that with this deployment method you have to include the deployment plan in the application
package, this method does not support external deployment plans. Also note that applications
deployed via the [Deployer tool|deploy] or the Geronimo Administration Console will not be
listed in the {{&lt;geronimo_home&gt;/deploy}} directory. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Note
that with this deployment method, you have to include the deployment plan in the application
package because this method does not support external deployment plans. Also note that applications
deployed by using the [Deployer tool|deploy] or the Geronimo Administration Console are not
listed in the {{&lt;geronimo_home&gt;/deploy}} directory. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >When you copy an application <span
class="diff-changed-words">in<span class="diff-added-chars"style="background-color:
#dfd;">to</span></span> the {{deploy}} directory, for example HelloWorld.war,
you will see a confirmation message in the <span class="diff-changed-words">{{geronimo.log}}<span
class="diff-added-chars"style="background-color: #dfd;">,</span></span> which
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">locates</span>
<span class="diff-added-words"style="background-color: #dfd;">is located</span>
in the {{&lt;geronimo_home&gt;/var/log}} directory. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{code} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >To remove the application, <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">just</span>
delete the WAR or EAR file from the {{deploy}} directory. When the application has been <span
class="diff-changed-words">removed<span class="diff-added-chars"style="background-color:
#dfd;">,</span></span> you should see a confirmation message in the <span
class="diff-changed-words">{{geronimo.log}}<span class="diff-added-chars"style="background-color:
#dfd;">,</span></span> which <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">locates</span>
<span class="diff-added-words"style="background-color: #dfd;">is located</span>
in the {{&lt;geronimo_home&gt;/var/log}} directory. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{code} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h1. Via Deployer tool{anchor:deployertool}
<br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">The
deployer tool will allow you, among other things, install and uninstall applications via a
command line. In this section we will focus on just these two tasks for the sample application,
the remaining functionality is fully covered in the [Deployer tool|deploy] section. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">You
can use the deployer tool to install and uninstall applications by running a command line.
In this section, we focuses on just these two tasks for the sample application. The remaining
functionality is fully covered in the [Deployer tool|deploy] section. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >To deploy the HelloWorld.war sample
application <span class="diff-added-words"style="background-color: #dfd;">by</span>
using the Deployer <span class="diff-changed-words">tool<span class="diff-added-chars"style="background-color:
#dfd;">,</span></span> open a command line window and type the following command
from the {{&lt;geronimo_home&gt;\bin}} directory: <br></td></tr>
            <tr><td class="diff-unchanged" > <br>*{{deploy --user system
--password manager deploy &lt;app_home&gt;\HelloWorld.war}}* <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">If
your application does not include the Geronimo specific deployment plan in the {{WEB-INF}}
directory you can still, just like with the Geronimo Administration Console, specify it externally.
You just need to add to the previous command the path and file name of the deployment plan.
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">If
your application does not include the Geronimo specific deployment plan in the {{WEB-INF}}
directory, you can still, just like with the Geronimo Administration Console, specify it externally.
You just need to add the path and file name of the deployment plan to the previous command.
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>*{{deploy --user system
--password manager deploy &lt;app_home&gt;\HelloWorld.war &lt;deployment_plan_home&gt;\plan.xml}}*
<br> <br></td></tr>
            <tr><td class="diff-changed-lines" >Note that when specifying the
deployment plan <span class="diff-changed-words">externally<span class="diff-added-chars"style="background-color:
#dfd;">,</span></span> you can use any file name to identify that <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">plan,
there is no</span> <span class="diff-added-words"style="background-color: #dfd;">plan.
You do not</span> need to use the {{geronimo-XYZ.xml}} form. In our <span class="diff-changed-words">example<span
class="diff-added-chars"style="background-color: #dfd;">,</span></span> we
do not need to specify any additional deployment plans <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">as</span>
<span class="diff-added-words"style="background-color: #dfd;">because</span> we
have the Geronimo specific ones already included in the package. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Once
deployed you should see a confirmation message similar to this one with moduleID {{sample.applications/HelloWorldApp/1.0/war}}
assigned to this application within your deployment plan: <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">After
you deploy the application, you should see a confirmation message similar to the following
one with the moduleID {{sample.applications/HelloWorldApp/1.0/war}}, which is assigned to
this application within your deployment plan: <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{color:white}{noformat:borderStyle=solid|
bgColor=#000000} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{noformat}{color} <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">The
confirmation message is displayed in the command window, which is different from the case
when you deploy by using the Geronimo Administration Console. <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">As
a difference</span> <span class="diff-added-words"style="background-color: #dfd;">Different</span>
from the deployment <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">via</span>
<span class="diff-added-words"style="background-color: #dfd;">that uses</span>
the Geronimo Administration Console, using the command line tool you receive instant information
in the command line for confirmation. Alternatively, if you have not yet packaged your application
you could use the *--inPlace* option for deploying your application directly from the directory
you are actually developing the application. This option is used to deploy this sample application
in the [Quick start - Apache Geronimo for the impatient] section. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>In this case you would
use this command from the {{&lt;geronimo_home&gt;\bin}} directory: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
width='33%' class='ScrollbarPrevName'>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC30/Deploying+and+administering+applications"><img border='0'
align='middle' src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Deploying+and+administering+applications">Deploying
and administering applications</a></td><td width='33%' class='ScrollbarNextName'>&nbsp;<a
href="/confluence/display/GMOxDOC30/Starting+and+stopping+applications">Starting and stopping
applications</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC30/Starting+and+stopping+applications"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>There are several alternatives available for Deploying and undeploying applications:</p>
<div>
<ul>
    <li><a href='#Deployingandundeployingapplications-ViaGeronimoAdministrationConsole'>Via
Geronimo Administration Console </a></li>
    <li><a href='#Deployingandundeployingapplications-Viahotdeployment'>Via hot
deployment </a></li>
    <li><a href='#Deployingandundeployingapplications-ViaDeployertool'>Via Deployer
tool </a></li>
    <li><a href='#Deployingandundeployingapplications-Viagogocommand'>Via gogo
command </a></li>
    <li><a href='#Deployingandundeployingapplications-ViaGEP'>Via GEP </a></li>
    <li><a href='#Deployingandundeployingapplications-ViaClustering'>Via Clustering
</a></li>
</ul></div>


<p>When you package your application, you might include the deployment plan within the
package or not. At deployment time, Geronimo looks for the deployment plan (for example, <tt>geronimo-web.xml</tt>
and deployment descriptor (for example,<tt>web.xml</tt>) in the <tt>WEB-INF</tt>
directory within your packaged application. If Geronimo cannot find those information, it
attempts to deploy the application using defaults. If using defaults fails, you will have
to either provide a deployment plan repackaged in the application or provide an external deployment
plan. In the following sections, we will discuss further these alternatives.</p>

<h1><a name="Deployingandundeployingapplications-ViaGeronimoAdministrationConsole"></a>Via
Geronimo Administration Console<a name="Deployingandundeployingapplications-GACdeploy"></a></h1>
<p>To install a new application by using the Geronimo Administration Console, select
<b>Deployer</b> on the <b>Console Navigation</b> menu on the left
side to launch the <b>Install Applications</b> portlet. You can choose to start
the application automatically right after it is deployed by selecting the <b>start application
after installation</b> check box. This check box is selected by default.</p>

<p><span class="image-wrap" style=""><img src="/confluence/download/attachments/20645345/installnewapps.gif?version=1&amp;modificationDate=1203094987000"
style="border: 0px solid black" /></span></p>

<p>For this example, we use the simple JSP HelloWorld sample that was created in the
<a href="/confluence/display/GMOxDOC30/Quick+start+-+Apache+Geronimo+for+the+impatient"
title="Quick start - Apache Geronimo for the impatient">Quick start &#45; Apache Geronimo
for the impatient</a> section. In that section, however, we used the <b>--inPlace</b>
deployment option and did not need to package the application into a <b>WAR</b>
file. To create the WAR file type, run the following command from the <b>&lt;app_home&gt;</b>
directory:</p>

<p><b><tt>jar -cvf HelloWorld.war</tt></b> *</p>

<p>This WAR has already included the deployment plans in the package.</p>

<p>Back in the Geronimo Administration Console, from the <b>Install New Applications</b>
portlet, click <b>Browse</b> to specify the path to <tt>HelloWorld.war</tt>
in the <b>Archive:</b> section. Make sure that the <b>Start application
after installation</b> check box is selected and then click <b>Install</b>.</p>

<p>You should see the " <tt>The application was successfully deployed.</tt>
" and " <tt>The application was successfully started.</tt> " confirmation messages
on the top of the portlet.</p>

<p>Another way to verify that the application is successfully installed and started
is by checking the <b>Installed Web Applications</b> portlet, which is available
by selecting <b>Web App WARs</b> on the <b>Console Navigation</b>
menu on the left side. You should see the application listed as <b>hello</b> and
with the status <b>running</b>.</p>

<p>Because the application we installed is <tt>HelloWold.<b>WAR</b></tt>,
we use this <b>Installed Web Applications</b> portlet to verify the installation.
When you install an EAR, you would check the status by using the <b>Installed Application
EARs</b> portlet available by selecting <b>Application EARs</b> on the <b>Console
Navigation</b> menu on the left side. The installation procedure is the same for both
WAR and EAR applications.</p>

<p>To remove the applications by using the Geronimo Administration Console, use either
the <b>Installed Web Applications</b> portlet or the <b>Installed Application
EARs</b> portlets depending on the application to uninstall.</p>

<p><span class="image-wrap" style=""><img src="/confluence/download/attachments/20645345/adminapps.gif?version=1&amp;modificationDate=1203094908000"
style="border: 0px solid black" /></span></p>

<p>For our example, access the <b>Installed Web Applications</b> portlet
and click <b>Uninstall</b> for the application that has the <b>Component
Name</b> <b><tt>sample.applications/HelloWorldApp/1.0/war</tt></b>.
This will stop the application and then uninstall it.  The confirmation message " <tt>Uninstalled
application</tt> " should be listed at the bottom of the portlet.</p>

<p>These are the basic steps for installing and uninstalling applications by using the
Geronimo Administration Console. The following two sections will focus on the command line
options.</p>

<h1><a name="Deployingandundeployingapplications-Viahotdeployment"></a>Via
hot deployment<a name="Deployingandundeployingapplications-Hotdeploy"></a></h1>

<p>Apache Geronimo has support for <em>Hot Deployment</em>, which means
that you can copy an application JAR file into the <tt>&lt;geronimo_home&gt;/deploy</tt>
directory and the application will be deployed automatically. This also works for uninstalling
or refreshing applications previously deployed by using this method. Alternatively, you can
also copy the <em>directory</em> (unpacked) for the application module instead
of copying a single JAR file.</p>

<p>Note that with this deployment method, you have to include the deployment plan in
the application package because this method does not support external deployment plans. Also
note that applications deployed by using the <a href="/confluence/display/GMOxDOC30/deploy"
title="deploy">Deployer tool</a> or the Geronimo Administration Console are not listed
in the <tt>&lt;geronimo_home&gt;/deploy</tt> directory.</p>

<p>When you copy an application into the <tt>deploy</tt> directory, for
example HelloWorld.war, you will see a confirmation message in the <tt>geronimo.log</tt>,
which is located in the <tt>&lt;geronimo_home&gt;/var/log</tt> directory.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
11:45:23,500 INFO  [DirectoryHotDeployer] Deploying HelloWorld.war
11:45:23,953 INFO  [DirectoryHotDeployer] Deployed sample.applications/HelloWorldApp/1.0/war
@ /hello
</pre>
</div></div>

<p>To remove the application, delete the WAR or EAR file from the <tt>deploy</tt>
directory. When the application has been removed, you should see a confirmation message in
the <tt>geronimo.log</tt>, which is located in the <tt>&lt;geronimo_home&gt;/var/log</tt>
directory.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
11:46:17,953 INFO  [DirectoryHotDeployer] Undeploying HelloWorld.war
11:46:18,281 INFO  [DirectoryMonitor] Hot deployer notified that an artifact was removed:
sample.applications/HelloWorldApp/1.0/war
11:46:18,281 INFO  [DirectoryHotDeployer]     Undeployed sample.applications/HelloWorldApp/1.0/war
</pre>
</div></div>

<h1><a name="Deployingandundeployingapplications-ViaDeployertool"></a>Via
Deployer tool<a name="Deployingandundeployingapplications-deployertool"></a></h1>

<p>You can use the deployer tool to install and uninstall applications by running a
command line. In this section, we focuses on just these two tasks for the sample application.
The remaining functionality is fully covered in the <a href="/confluence/display/GMOxDOC30/deploy"
title="deploy">Deployer tool</a> section.</p>

<p>To deploy the HelloWorld.war sample application by using the Deployer tool, open
a command line window and type the following command from the <tt>&lt;geronimo_home&gt;\bin</tt>
directory:</p>

<p><b><tt>deploy --user system --password manager deploy &lt;app_home&gt;\HelloWorld.war</tt></b></p>

<p>If your application does not include the Geronimo specific deployment plan in the
<tt>WEB-INF</tt> directory, you can still, just like with the Geronimo Administration
Console, specify it externally. You just need to add the path and file name of the deployment
plan to the previous command.</p>

<p><b><tt>deploy --user system --password manager deploy &lt;app_home&gt;\HelloWorld.war
&lt;deployment_plan_home&gt;\plan.xml</tt></b></p>

<p>Note that when specifying the deployment plan externally, you can use any file name
to identify that plan. You do not need to use the <tt>geronimo-XYZ.xml</tt> form.
In our example, we do not need to specify any additional deployment plans because we have
the Geronimo specific ones already included in the package.</p>

<p>After you deploy the application, you should see a confirmation message similar to
the following one with the moduleID <tt>sample.applications/HelloWorldApp/1.0/war</tt>,
which is assigned to this application within your deployment plan:</p>

<p><font color="white"><div class="preformatted panel" style="background-color:
#000000;border-style: solid;border-width: 1px;"><div class="preformattedContent panelContent"
style="background-color: #000000;">
<pre>D:\geronimo-tomcat7-javaee6-3.0\bin&gt;deploy --user system --password manager
deploy \HelloWorld_1.0\HelloWorld.war
Using GERONIMO_BASE:   D:\geronimo-tomcat7-javaee6-3.0
Using GERONIMO_HOME:   D:\geronimo-tomcat7-javaee6-3.0
Using GERONIMO_TMPDIR: D:\geronimo-tomcat7-javaee6-3.0\var\temp
Using JRE_HOME:        C:\Java\jdk1.6.0_21\\jre
    Deployed sample.applications/HelloWorldApp/1.0/war @ /hello
</pre>
</div></div></font></p>

<p>The confirmation message is displayed in the command window, which is different from
the case when you deploy by using the Geronimo Administration Console.<br/>
Different from the deployment that uses the Geronimo Administration Console, using the command
line tool you receive instant information in the command line for confirmation. Alternatively,
if you have not yet packaged your application you could use the <b>--inPlace</b>
option for deploying your application directly from the directory you are actually developing
the application. This option is used to deploy this sample application in the <a href="/confluence/display/GMOxDOC30/Quick+start+-+Apache+Geronimo+for+the+impatient"
title="Quick start - Apache Geronimo for the impatient">Quick start &#45; Apache Geronimo
for the impatient</a> section.</p>

<p>In this case you would use this command from the <tt>&lt;geronimo_home&gt;\bin</tt>
directory:</p>

<p><b><tt>deploy --user system --password manager deploy --inPlace &lt;app_home&gt;</tt></b></p>

<p>To uninstall an application, run the following command from the <tt>&lt;geronimo_home&gt;\bin</tt>
directory using the moduleID specified in the deployment plan.</p>

<p><b><tt>deploy --user system --password manager undeploy sample.applications/HelloWorldApp/1.0/war</tt></b></p>

<p>This command will first stop the running application and then uninstall it. You should
see a confirmation message similar to this:</p>

<p><font color="white"><div class="preformatted panel" style="background-color:
#000000;border-style: solid;border-width: 1px;"><div class="preformattedContent panelContent"
style="background-color: #000000;">
<pre>D:\geronimo-tomcat7-javaee6-3.0\bin&gt;deploy --user system --password manager
undeploy sample.applications/HelloWorldApp/1.0/war
Using GERONIMO_BASE:   D:\geronimo-tomcat7-javaee6-3.0
Using GERONIMO_HOME:   D:\geronimo-tomcat7-javaee6-3.0
Using GERONIMO_TMPDIR: D:\geronimo-tomcat7-javaee6-3.0\var\temp
Using JRE_HOME:        C:\Java\jdk1.6.0_21\\jre
    Module sample.applications/HelloWorldApp/1.0/war unloaded.
    Module sample.applications/HelloWorldApp/1.0/war uninstalled.

    Undeployed sample.applications/HelloWorldApp/1.0/war
</pre>
</div></div></font></p>

<p>These are other options and commands available for this deployer tool, please visit
the <a href="/confluence/display/GMOxDOC30/Tools+and+commands" title="Tools and commands">Tools
and commands</a> section for additional details.</p>

<h1><a name="Deployingandundeployingapplications-Viagogocommand"></a>Via
gogo command<a name="Deployingandundeployingapplications-gogodeploy"></a></h1>

<p>You can also deploy or undeploy applications in Karaf shell. See <a href="/confluence/display/GMOxDOC30/gogo+commands+for+Geronimo"
title="gogo commands for Geronimo">gogo commands for Geronimo</a> for detailed information
about deploying and undeploying gogo commands.</p>

<h1><a name="Deployingandundeployingapplications-ViaGEP"></a>Via GEP<a
name="Deployingandundeployingapplications-GEPdeploy"></a></h1>

<p>You can also deploy or undeploy application in Eclipse if you have <a href="/confluence/display/GMOxDOC30/Installing+Geronimo+Eclipse+Plugin"
title="Installing Geronimo Eclipse Plugin">Geronimo Eclipse Plugin (GEP)</a> installed.
See <a href="/confluence/display/GMOxDOC30/Deploying+and+debugging+applications+using+GEP"
title="Deploying and debugging applications using GEP">Deploying and debugging applications
using GEP</a> for details about deploying and undeploying applications with GEP.</p>

<h1><a name="Deployingandundeployingapplications-ViaClustering"></a>Via
Clustering<a name="Deployingandundeployingapplications-WADIdeploy"></a></h1>

<p>WADI can now be used to support the replication of HTTP Session state among multiple
Geronimo servers. In previous releases of Geronimo, WADI could only be used along with the
Jetty configuration of Geronimo. WADI can now be used with Tomcat configurations of Geronimo.
In addition to the new session replication support, applications can now be deployed to administratively-defined
groups of Geronimo servers. This makes it easier to manage a single application across a number
of Geronimo servers. More information and details about clustered deployment can be found
at <a href="/confluence/display/GMOxDOC30/Farming+using+Deployment" title="Farming using
Deployment">Farming using Deployment</a>.</p>


    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Deploying+and+undeploying+applications">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645345&revisedVersion=6&originalVersion=5">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Deploying+and+undeploying+applications?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message