Index: server/src/etc/conf/default/bootstrap-beans.xml
===================================================================
--- server/src/etc/conf/default/bootstrap-beans.xml (revision 70412)
+++ server/src/etc/conf/default/bootstrap-beans.xml (working copy)
@@ -358,5 +358,7 @@
5000
HDScanner
+
+
Index: system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
===================================================================
--- system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java (revision 70412)
+++ system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java (working copy)
@@ -38,6 +38,8 @@
import org.jboss.profileservice.spi.ModificationInfo;
import org.jboss.profileservice.spi.Profile;
import org.jboss.profileservice.spi.ProfileService;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
/**
* A DeploymentScanner built on the ProfileService and MainDeployer. This
@@ -76,6 +78,9 @@
private long scanPeriod = 5000;
/** The number of scans that have been done */
private int scanCount;
+
+ /** Filter for scanned directories */
+ private VirtualFileFilter filter;
// Constructor ---------------------------------------------------
@@ -135,6 +140,27 @@
{
this.scanThreadName = scanThreadName;
}
+
+ /**
+ * Set the filter instance
+ *
+ * @param filter ther filter
+ */
+ public void setFilterInstance(VirtualFileFilter filter)
+ {
+ this.filter = filter;
+ }
+
+ /**
+ * Get the filter instance
+ *
+ * @return the filter
+ */
+ public VirtualFileFilter getFilterInstance()
+ {
+ return filter;
+ }
+
/* (non-Javadoc)
* @see org.jboss.deployment.scanner.VFSDeploymentScanner#getScanPeriod()
@@ -260,6 +286,16 @@
Collection modified = activeProfile.getModifiedDeployments();
for(ModificationInfo info : modified)
{
+ // Fix for JBAS-5209. Make sure that filtered files are NOT picked
+ // up for deployment by the hot deployment scanner
+ VirtualFile virtualFile = info.getDeployment().getRoot();
+ if (this.filter != null && !this.filter.accepts(virtualFile)) {
+ if (trace) {
+ log.trace(info.getDeployment().getName() + " is filtered, hence not deploying");
+ }
+ continue;
+ }
+
VFSDeployment ctx = info.getDeployment();
switch( info.getStatus() )
{