5 Replies Latest reply on Aug 17, 2011 3:13 AM by lingpiao.kong

    Does the HDScanner support the filter?

    lingpiao.kong

      Our AS 5.1 is required to disable the hotdeployment of JARs,EARs,WARs but except xx-ds.xml,

      and I find a filter list in $JBOSS_HOME/server/default/conf/bootstrap/profile.xml and add the some suffixes as following:

      <bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">

        <!-- Files starting with theses strings are ignored -->

        <property name="prefixes">#,%,\,,.,_$</property>

        <!-- Files ending with theses strings are ignored -->

        <property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh,.ear,.EAR,.jar,.JAR</property>

        <!-- Files matching with theses strings are ignored -->

        <property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>

        </bean>

       

      unfortunately, the blacklist is NOT only for the HDScanner but also for the main deployer, so the EARs can NOT be deployed even at the JBOSS start stage.

       

      Does the HDScanner support a black list or it can be implemented via the other ways?

       

      Any suggestion will be appreciated!

        • 1. Re: Does the HDScanner support the filter?
          alesj

          Perhaps add a new service to deployers/ boot phase, which is not controlled via HDScanner,

          which would then pick up your deployments and feed them directly to MainDeployer.

          • 2. Re: Does the HDScanner support the filter?
            lingpiao.kong

            Ales Justin,

             

            Thanks for your reply. Could you please give more detail about it?

             

             

            BTW.

             

            I tried to add a deployer instance in profile.xml as following:

            <bean name="newProfileServiceDeployer" class="org.jboss.system.server.profileservice.repository.MainDeployerAdapter">

                      <property name="mainDeployer"><inject bean="StructuralDeployers" /></property>

                      <property name="attachmentStore"><inject bean="AttachmentStore" /></property>

            </bean>


            and tried to assign it to the HDScanner:

               <!-- Hotdeployment of applications -->

                <bean name="HDScanner" class="org.jboss.system.server.profileservice.hotdeploy.HDScanner">

                    <property name="deployer"><inject bean="newProfileServiceDeployer"/></property>

                    <property name="profileService"><inject bean="ProfileService"/></property>

                    <property name="scanPeriod">5000</property>

                    <property name="scanThreadName">HDScanner</property>

                </bean>

             

            I wanted to make the HDScanner just deploy the xml files via the StructuralDeployers, but it did NOT work.

             


            • 3. Re: Does the HDScanner support the filter?
              alesj

              What about if you modify the HDScanner to only do the full pass once,

              and then the filter would kick in; this way you could still deploy your .ear,

              whereas further hot-deploy would only pick-up -ds.xml changes.

              • 4. Re: Does the HDScanner support the filter?
                lingpiao.kong

                Do you mean hacking the HDScanner?

                I thought to do this, but I didn't try it.

                I can try to do this,  could you please give more hints about how to hack the HDScanner?!

                • 5. Re: Does the HDScanner support the filter?
                  lingpiao.kong

                  I found another way to hot deploy a xx-ds.xml without the HDScanner:

                  using the following script to call the JMX 'service=MainDeployer'  of JBOSS:

                   

                  D:\java\jboss-5.1.0.GA\bin\twiddle.bat -q -s localhost invoke "jboss.system:service=MainDeployer" deploy "file:///D:\java\jboss-5.1.0.GA\server\default\deploy\mine-ds.xml"

                   

                  But it is not good enough because of the deployed datasource NOT listed in 'Local Tx Datasources'(JBOSS Administration Console/Resources/Datasources/Local Tx Datasources).

                   

                  If it is deployed by HDScanner, the DS can be listed. Don't know why.