[jboss-cvs] JBossAS SVN: r81725 - in trunk: system/src/main/org/jboss/system/server/profile/basic and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 27 07:37:17 EST 2008
Author: emuckenhuber
Date: 2008-11-27 07:37:17 -0500 (Thu, 27 Nov 2008)
New Revision: 81725
Modified:
trunk/server/src/etc/conf/default/bootstrap/profile.xml
trunk/system/src/main/org/jboss/system/server/profile/basic/ProfileImpl.java
trunk/system/src/main/org/jboss/system/server/profileservice/basic/MetaDataAwareProfileService.java
trunk/system/src/main/org/jboss/system/server/profileservice/basic/ProfileServiceImpl.java
Log:
[JBAS-6147] ignore excluded files from the deploymentFilter in the basic profile too.
Modified: trunk/server/src/etc/conf/default/bootstrap/profile.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap/profile.xml 2008-11-27 12:35:53 UTC (rev 81724)
+++ trunk/server/src/etc/conf/default/bootstrap/profile.xml 2008-11-27 12:37:17 UTC (rev 81725)
@@ -21,6 +21,7 @@
</constructor>
<property name="profileRoot">${jboss.server.home.dir}</property>
<property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ <property name="deploymentFilter"><inject bean="DeploymentFilter" /></property>
<property name="filter">
<bean class="org.jboss.system.server.profile.basic.XmlIncludeVirtualFileFilter"/>
</property>
Modified: trunk/system/src/main/org/jboss/system/server/profile/basic/ProfileImpl.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/basic/ProfileImpl.java 2008-11-27 12:35:53 UTC (rev 81724)
+++ trunk/system/src/main/org/jboss/system/server/profile/basic/ProfileImpl.java 2008-11-27 12:37:17 UTC (rev 81725)
@@ -45,6 +45,7 @@
import org.jboss.util.JBossObject;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
/**
* A basic profile implementation that uses in memory store for the applications.
@@ -71,6 +72,8 @@
private volatile boolean hotdeployEnabled;
/** The last time the profile was modified */
private long lastModified;
+ /** The deployment filter */
+ private VirtualFileFilter deploymentFilter;
public ProfileImpl(String profileRoot, ProfileKey key)
{
@@ -99,6 +102,16 @@
{
return this.lastModified;
}
+
+ public VirtualFileFilter getDeploymentFilter()
+ {
+ return deploymentFilter;
+ }
+
+ public void setDeploymentFilter(VirtualFileFilter deploymentFilter)
+ {
+ this.deploymentFilter = deploymentFilter;
+ }
/**
* Get the names of the applications in the profile
@@ -489,6 +502,13 @@
for (VirtualFile component : components)
{
+ // Excluding files from scanning
+ if(! this.deploymentFilter.accepts(component))
+ {
+ log.trace("ignoring "+ component);
+ continue;
+ }
+
String key = component.toURI().toString();
if( applications.containsKey(key) == true )
continue;
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/basic/MetaDataAwareProfileService.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/basic/MetaDataAwareProfileService.java 2008-11-27 12:35:53 UTC (rev 81724)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/basic/MetaDataAwareProfileService.java 2008-11-27 12:37:17 UTC (rev 81725)
@@ -53,6 +53,7 @@
MetaDataAwareProfile profile = new MetaDataAwareProfile(getProfileRoot(), key);
profile.setMainDeployer(mainDeployer);
+ profile.setDeploymentFilter(deploymentFilter);
profile.setFilter(filter);
return profile;
}
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/basic/ProfileServiceImpl.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/basic/ProfileServiceImpl.java 2008-11-27 12:35:53 UTC (rev 81724)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/basic/ProfileServiceImpl.java 2008-11-27 12:37:17 UTC (rev 81725)
@@ -32,6 +32,7 @@
import org.jboss.profileservice.spi.ProfileKey;
import org.jboss.profileservice.spi.ProfileService;
import org.jboss.system.server.profile.basic.ProfileImpl;
+import org.jboss.virtual.VirtualFileFilter;
/**
@@ -49,6 +50,8 @@
private Profile defaultImpl;
private ManagementView mgtView;
private DeploymentManager deployMgr;
+ /** The deployment filter */
+ protected VirtualFileFilter deploymentFilter;
public ProfileServiceImpl(String name) throws IOException
{
@@ -79,6 +82,16 @@
defaultImpl = createProfile(key);
}
+ public VirtualFileFilter getDeploymentFilter()
+ {
+ return deploymentFilter;
+ }
+
+ public void setDeploymentFilter(VirtualFileFilter deploymentFilter)
+ {
+ this.deploymentFilter = deploymentFilter;
+ }
+
/**
* Create default profile.
*
@@ -87,7 +100,9 @@
*/
protected Profile createProfile(ProfileKey key)
{
- return new ProfileImpl(profileRoot, key);
+ ProfileImpl profile = new ProfileImpl(profileRoot, key);
+ profile.setDeploymentFilter(deploymentFilter);
+ return profile;
}
// ProfileService implementation --------------------
More information about the jboss-cvs-commits
mailing list