<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Folks, <br>
      <br>
      I rebased the <a
        href="https://github.com/tdiesler/jboss-as/tree/as2777">as2777</a>
      branch on the current <a
        href="https://github.com/tdiesler/jboss-as/tree/as3694">as3694</a>
      approach.<br>
      <br>
      This integrates with the CLI and you can do<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;deployment name="simple.war"
      runtime-name="simple.war"&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;content
      sha1="be6f7ba1ceaa2028c86d080648e1467904999f8e"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;properties&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="start.policy"
      value="deferred"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/properties&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/deployment&gt;<br>
      <br>
      [tdiesler@tdvaio jboss-as-7.2.0.Alpha1-SNAPSHOT]$ bin/jboss-cli.sh
      --connect<br>
      [standalone@localhost:9999 /] start simple.war<br>
      [standalone@localhost:9999 /] stop simple.war<br>
      <br>
      on the server you should see<br>
      <br>
      08:56:30,002 INFO&nbsp; [org.jboss.web] (MSC service thread 1-2)
      JBAS018210: Register web context: /simple<br>
      08:57:16,533 INFO&nbsp; [org.jboss.web] (MSC service thread 1-3)
      JBAS018224: Unregister web context: /simple<br>
      <br>
      The current implementation sets the initial mode of the
      CONFIGURE_MODULE to NEVER for start.policy=deferred<br>
      The start/stop operations toggle the mode of the INSTALL phase
      service between ACTIVE/NEVER.<br>
      <br>
      The CLEANUP phase is currently a problem on repeated start. You'll
      see<br>
    </tt>
    <blockquote><tt>Caused by: java.lang.NullPointerException</tt> <br>
      <tt>atorg.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.deploy(AbstractMergingProcessor.java:61)</tt><br>
      <tt>&nbsp;&nbsp;&nbsp; at
        org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:124)
        [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2</tt><br>
    </blockquote>
    <tt>because the EEModuleDescription is no longer attached. <br>
      <br>
      Stopping a deployment would not need to take the Module and
      associated ClassLoader down. So any datastructures needed to
      configure the Module can safely be cleaned up IMHO. I presume the
      DUPs can reasonably be fixed by moving them to the appropriate
      phases (see below) and by making sure they still have the data
      structures attached to do yo-yo on the activate phases.<br>
      <br>
      Using <a href="https://issues.jboss.org/browse/AS7-3585">this
        terminology</a></tt><br>
    <blockquote>
      <pre class="code-java">STRUCTURE         =&gt;   STRUCTURE

PARSE             =&gt;   PRE_INSTALL
REGISTER          =&gt;   INSTALL
                  =&gt;   POST_INSTALL

DEPENDENCIES      =&gt;   PRE_RESOLVE
CONFIGURE_MODULE  =&gt;   RESOLVE
FIRST_MODULE_USE  =&gt;   POST_RESOLVE

POST_MODULE       =&gt;   PRE_ACTIVATE
INSTALL           =&gt;   ACTIVATE
                  =&gt;   POST_ACTIVATE

CLEANUP           =&gt;   CLEANUP
</pre>
    </blockquote>
    <tt>We could stop at PRE_RESOLVE. Subsequent start would go up to
      and including CLEANUP. Subsequent stop would go back including
      PRE_ACTIVATE. Subsequent start as before.<br>
    </tt>
    <pre class="code-java">cheers
--thomas
</pre>
    <tt><br>
    </tt>
    <pre class="moz-signature" cols="72">-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx 
</pre>
  </body>
</html>