I'm not sure specifying the global sorter for a whole scanner is the way we
want to go... on the other hand extensibility is nice... Do we want to
encourage people to have lots of scanners?

At the risk of making things more complicated than necessary, yet striving
for simplicity, how about

  <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
         name="jboss.deployment:type=DeploymentScanner,flavor=URL">


    <attribute name="ScanPeriod">5000</attribute>


    <attribute name="URLs">
       <dir name="./deploy/core" order="type"/> 
       <dir name="./deploy/app" order="lexical"/>
       <url name=".deploy/other/jar1.jar"/>
       <url name=".deploy/other/sar2.sar"/>
       <url name=".deploy/other/war3.war"/>
    </attribute>



    <!-- Uncomment (and comment/remove version below) to enable usage of
the DeploymentCache
    <depends 
optional-attribute-name="Deployer">jboss.deployment:type=DeploymentCache</depends>
    -->
    <depends 
optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends>


  </mbean>

<mbean code="..." name="jboss.deployment:type=DeploymentSorter,order=type"/>
<mbean code="..." name="jboss.deployment:type=DeploymentSorter,order=lexical/>

The deployment scanner looks up the requested ordering using the naming
pattern on the DeploymentSorter mbeans.

I'm not sure if we really need explicit dependencies listed in the
DeploymentScanner.

Striving towards simplicity (believe it or not;-)

david jencks


On 2002.04.21 16:37:46 -0400 Larry Sanderson wrote:
> > As larry said (do you have rw yet?)
> 
> Yup.  I've already checked in at least one bug :-)
> 
> > let's not shove it down people's throat
> > and let's document all of this.  Case closed. Implementation needed :)
> 
> Simple, and not too hacked implementation:
> 
> Add MBean attribute to URLDeploymentScanner: URLComparator
> make default comparator point to: org.jboss.deployment.DeploymentSorter
> (make this a comparator that does the correct ordering)
> in scanDirectory, change: list = sorter.sortURLs(list);
>  to: if (urlComparator != null) Collections.sort(list, urlComparator);
> 
> This allows users unhappy with the ordering scheme to replace it with
> their
> own Comparator  (or simply drop it to remove all ordering).  If this
> sounds
> OK, I am mucking about in that code anyway.  Would you like me to make
> these
> changes?
> 
> -Larry
> 
> 
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to