4 Replies Latest reply on Mar 4, 2009 3:29 PM by robert lazarski

    disable hot deploy

    robert lazarski Newbie

      Hi all,

      We have a plain old WAR file that does _not_ use seam. Its an exploded WAR actually, that we deploy just fine in our /programs/deploy dir via file server/default/conf/bootstrap/profile-repository.xml
      and:

      <bean name="SerializableDeploymentRepositoryFactory" class="org.jboss.system.server.profileservice.repository.SerializableDeploymentRepositoryFactory">
       <property name="storeRoot">${jboss.server.base.dir}</property>
       <property name="attachmentsRoot">${jboss.server.data.dir}/attachments</property>
       <property name="applicationURIs">
       <array elementClass="java.net.URI">
       <value>${jboss.server.home.url}deploy</value>
       <value>file:///programs/deploy</value>
       </array>
       </property>
       <property name="serializer"><inject bean="AttachmentsSerializer"/></property>
       <property name="deploymentFilter"><inject bean="DeploymentFilter" /></property>
       <property name="hotDeploymentFilter">
       <bean class="org.jboss.system.server.profile.basic.XmlIncludeVirtualFileFilter"/>
       </property>
       <property name="mainDeployer"><inject bean="MainDeployer"/></property>
       <depends>ProfileServicePersistenceDeployer</depends>
      
      </bean>


      How can we turn off hot deployment for anything deployed under our /programs/deploy dir ? Or even all of JBoss 5 if we need to? My boss is editing files there and its creating havock ;-) .

      Thanks in advance,
      Robert

        • 1. Re: disable hot deploy
          Emanuel Muckenhuber Master

          You can remove the deploy/hdscanner-jboss-beans.xml - this will disable hot-deployment scanning. Although this will disable hd-scanning in general.

          • 2. Re: disable hot deploy
            jaikiran pai Master

             

            "emuckenhuber" wrote:
            You can remove the deploy/hdscanner-jboss-beans.xml - this will disable hot-deployment scanning. Although this will disable hd-scanning in general.


            I just looked at the org.jboss.system.server.profileservice.hotdeploy.HDScanner and i see that there's a setScanEnabled:

            public synchronized void setScanEnabled(boolean scanEnabled)
             {
             if( scanEnabled == true && activeScan == null )
             {
             activeScan = this.scanExecutor.scheduleWithFixedDelay(this, 0,
             scanPeriod, TimeUnit.MILLISECONDS);
             }
             else if( scanEnabled == false && activeScan != null )
             {
             activeScan.cancel(true);
             activeScan = null;
             }
             }
            


            So instead of deleting a file (the hdscanner-jboss-beans.xml) from the AS installation, i think setting this property to false on the HDScanner MC bean (deploy/hdscanner-jboss-beans.xml) might do the trick:
            <bean name="HDScanner"
             class="org.jboss.system.server.profileservice.hotdeploy.HDScanner">
             <property name="mainDeployer"><inject bean="MainDeployer"/></property>
             <property name="controller"><inject bean="jboss.kernel:service=KernelController"/></property>
             <property name="profileService"><inject bean="ProfileService"/></property>
             <property name="scanPeriod">5000</property>
             <property name="scanThreadName">HDScanner</property>
             <property name="scanEnabled">false</property>
             </bean>


            • 3. Re: disable hot deploy
              Emanuel Muckenhuber Master

              Well setScanEnabled is more to cancel active scans and suspend HDScanner during runtime - so this won't have an effect on startup.
              If you don't want to remove the hdscanner-jboss-beans.xml you could add:

               <start ignored="true"/>
              


              • 4. Re: disable hot deploy
                robert lazarski Newbie

                Removing deploy/hdscanner-jboss-beans.xml worked fine for me, thanks!