[jboss-cvs] JBossAS SVN: r92539 - in branches/JBPAPP_5_0: server/src/etc/conf/default/bootstrap and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 18 15:10:19 EDT 2009
Author: jaikiran
Date: 2009-08-18 15:10:18 -0400 (Tue, 18 Aug 2009)
New Revision: 92539
Modified:
branches/JBPAPP_5_0/server/src/etc/conf/all/bootstrap/profile.xml
branches/JBPAPP_5_0/server/src/etc/conf/default/bootstrap/profile.xml
branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profile/basic/AbstractPatternVirtualFileFilter.java
Log:
JBPAPP-2519 Server will no longer do aggressive redeployments. Instead it will watch only application.xml, web.xml, ejb-jar.xml and jboss-service.xml files, like AS-4.x, for redeployments
Modified: branches/JBPAPP_5_0/server/src/etc/conf/all/bootstrap/profile.xml
===================================================================
--- branches/JBPAPP_5_0/server/src/etc/conf/all/bootstrap/profile.xml 2009-08-18 19:06:35 UTC (rev 92538)
+++ branches/JBPAPP_5_0/server/src/etc/conf/all/bootstrap/profile.xml 2009-08-18 19:10:18 UTC (rev 92539)
@@ -82,13 +82,33 @@
<destroy method="flush"/>
</bean>
+ <!-- A filter which controls the files that will be watched for changes for hot deployment
+ By default a org.jboss.system.server.profile.basic.PatternIncludeVirtualFileFilter is
+ configured to allow flexible control over the files that can be watched for hot deployments.
+ This PatternIncludeVirtualFileFilter accepts a regular expression and matches it against
+ the file name(s) in the metadata locations (WEB-INF or META-INF) to decide whether the
+ change to such file(s) should trigger a redeployment of the application
+ -->
+ <bean name="ModificationCheckerFilter" class="org.jboss.system.server.profile.basic.PatternIncludeVirtualFileFilter">
+ <constructor>
+ <!-- Remember, the parameter is a regex so use the correct syntax
+ as below. Here we specify that we are interested in watching changes to
+ either application.xml, web.xml, ejb-jar.xml or jboss-service.xml (which are all
+ considered top level deployment descriptors) -->
+ <parameter class="java.lang.String">^application.xml$|^web.xml$|^ejb-jar.xml$|^jboss-service.xml$</parameter>
+ </constructor>
+ </bean>
<!-- This just checks metadata locations -->
<bean name="MetaDataStructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
<constructor>
<parameter><inject bean="MainDeployer" /></parameter>
</constructor>
<property name="cache"><inject bean="StructureModCache" /></property>
- <property name="filter"><bean class="org.jboss.system.server.profile.basic.XmlIncludeVirtualFileFilter" /></property>
+ <!-- Note: The "cacheFilter" and the "filter" should both use the same filter instances
+ to prevent a bug in the deployers. This will be fixed in later releases of AS-5
+ -->
+ <property name="cacheFilter"><inject bean="ModificationCheckerFilter"/></property>
+ <property name="filter"><inject bean="ModificationCheckerFilter"/></property>
</bean>
<!-- Synchs modifed files -->
Modified: branches/JBPAPP_5_0/server/src/etc/conf/default/bootstrap/profile.xml
===================================================================
--- branches/JBPAPP_5_0/server/src/etc/conf/default/bootstrap/profile.xml 2009-08-18 19:06:35 UTC (rev 92538)
+++ branches/JBPAPP_5_0/server/src/etc/conf/default/bootstrap/profile.xml 2009-08-18 19:10:18 UTC (rev 92539)
@@ -73,13 +73,34 @@
<destroy method="flush"/>
</bean>
+ <!-- A filter which controls the files that will be watched for changes for hot deployment
+ By default a org.jboss.system.server.profile.basic.PatternIncludeVirtualFileFilter is
+ configured to allow flexible control over the files that can be watched for hot deployments.
+ This PatternIncludeVirtualFileFilter accepts a regular expression and matches it against
+ the file name(s) in the metadata locations (WEB-INF or META-INF) to decide whether the
+ change to such file(s) should trigger a redeployment of the application
+ -->
+ <bean name="ModificationCheckerFilter" class="org.jboss.system.server.profile.basic.PatternIncludeVirtualFileFilter">
+ <constructor>
+ <!-- Remember, the parameter is a regex so use the correct syntax
+ as below. Here we specify that we are interested in watching changes to
+ either application.xml, web.xml, ejb-jar.xml or jboss-service.xml (which are all
+ considered top level deployment descriptors) -->
+ <parameter class="java.lang.String">^application.xml$|^web.xml$|^ejb-jar.xml$|^jboss-service.xml$</parameter>
+ </constructor>
+ </bean>
<!-- This just checks metadata locations -->
<bean name="MetaDataStructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
<constructor>
<parameter><inject bean="MainDeployer" /></parameter>
</constructor>
+
<property name="cache"><inject bean="StructureModCache" /></property>
- <property name="filter"><bean class="org.jboss.system.server.profile.basic.XmlIncludeVirtualFileFilter" /></property>
+ <!-- Note: The "cacheFilter" and the "filter" should both use the same filter instances
+ to prevent a bug in the deployers. This will be fixed in later releases of AS-5
+ -->
+ <property name="cacheFilter"><inject bean="ModificationCheckerFilter"/></property>
+ <property name="filter"><inject bean="ModificationCheckerFilter"/></property>
</bean>
<!-- Synchs modifed files -->
Modified: branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profile/basic/AbstractPatternVirtualFileFilter.java
===================================================================
--- branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profile/basic/AbstractPatternVirtualFileFilter.java 2009-08-18 19:06:35 UTC (rev 92538)
+++ branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profile/basic/AbstractPatternVirtualFileFilter.java 2009-08-18 19:10:18 UTC (rev 92539)
@@ -23,6 +23,8 @@
import java.util.regex.Pattern;
+import org.jboss.deployers.vfs.spi.structure.modified.AbstractPathNameFilter;
+import org.jboss.deployers.vfs.spi.structure.modified.StructureCacheFilter;
import org.jboss.virtual.VirtualFile;
import org.jboss.virtual.VirtualFileFilter;
@@ -31,7 +33,7 @@
*
* @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
*/
-public abstract class AbstractPatternVirtualFileFilter implements VirtualFileFilter
+public abstract class AbstractPatternVirtualFileFilter extends AbstractPathNameFilter implements VirtualFileFilter
{
private Pattern pattern;
@@ -51,4 +53,19 @@
* @return
*/
protected abstract boolean doMatch();
+
+ /**
+ * @see StructureCacheFilter#accepts(String)
+ */
+ public boolean accepts(String path)
+ {
+ if (path == null)
+ {
+ return false;
+ }
+ // pattern match the path against our configured
+ // regext pattern
+ return pattern.matcher(path).find() == doMatch();
+ }
+
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list