[jboss-cvs] JBossAS SVN: r83819 - in branches/Branch_5_0: ejb3/src/main/org/jboss/ejb3/deployers and 12 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 3 12:01:06 EST 2009
Author: alesj
Date: 2009-02-03 12:01:06 -0500 (Tue, 03 Feb 2009)
New Revision: 83819
Modified:
branches/Branch_5_0/component-matrix/pom.xml
branches/Branch_5_0/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
branches/Branch_5_0/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java
branches/Branch_5_0/server/src/etc/conf/default/bootstrap/deployers.xml
branches/Branch_5_0/server/src/etc/conf/default/bootstrap/vfs.xml
branches/Branch_5_0/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
branches/Branch_5_0/server/src/main/org/jboss/web/deployers/WARStructure.java
branches/Branch_5_0/spring-int/src/main/org/jboss/spring/io/VFSResourceLoader.java
branches/Branch_5_0/spring-int/src/main/org/jboss/spring/io/VFSResourcePatternResolver.java
branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java
branches/Branch_5_0/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
branches/Branch_5_0/system/src/main/org/jboss/system/server/profileservice/VFSScanner.java
branches/Branch_5_0/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
branches/Branch_5_0/tomcat/src/main/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java
branches/Branch_5_0/tomcat/src/resources/war-deployers-jboss-beans.xml
branches/Branch_5_0/varia/src/resources/seam/seam-deployers-jboss-beans.xml
Log:
Merge changes.
TODO - on VFS Seam Booking app illegal URL.
Modified: branches/Branch_5_0/component-matrix/pom.xml
===================================================================
--- branches/Branch_5_0/component-matrix/pom.xml 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/component-matrix/pom.xml 2009-02-03 17:01:06 UTC (rev 83819)
@@ -59,12 +59,12 @@
<version.org.jboss.ejb3.security.client>1.0.0</version.org.jboss.ejb3.security.client>
<version.org.jboss.jpa>1.0.0-Beta6</version.org.jboss.jpa>
<version.org.jboss.reflect>2.0.2.GA</version.org.jboss.reflect>
- <version.org.jboss.vfs>2.0.0.GA</version.org.jboss.vfs>
+ <version.org.jboss.vfs>2.2.0-SNAPSHOT</version.org.jboss.vfs>
<version.org.jboss.mdr>2.0.1.GA</version.org.jboss.mdr>
<version.org.jboss.man>2.0.0.GA</version.org.jboss.man>
- <version.org.jboss.microcontainer>2.0.2.GA</version.org.jboss.microcontainer>
- <version.org.jboss.cl>2.0.1.GA</version.org.jboss.cl>
- <version.org.jboss.deployers>2.0.3.GA</version.org.jboss.deployers>
+ <version.org.jboss.microcontainer>2.2.0-SNAPSHOT</version.org.jboss.microcontainer>
+ <version.org.jboss.cl>2.0.2.GA</version.org.jboss.cl>
+ <version.org.jboss.deployers>2.2.0-SNAPSHOT</version.org.jboss.deployers>
<version.org.jboss.cache.core>3.0.2.GA</version.org.jboss.cache.core>
<version.org.jboss.cache.pojo>3.0.0.GA</version.org.jboss.cache.pojo>
<version.org.jboss.cluster.client>1.1.1.GA</version.org.jboss.cluster.client>
@@ -85,7 +85,7 @@
<version.streambuffer>2.1.1</version.streambuffer>
<version.sun.jaxb>2.1.9</version.sun.jaxb>
<version.xdoclet>1.2.3</version.xdoclet>
- <version.seam.integration>5.0.0.GA</version.seam.integration>
+ <version.seam.integration>5.2.0-SNAPSHOT</version.seam.integration>
</properties>
<!-- Build Configuration -->
Modified: branches/Branch_5_0/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
===================================================================
--- branches/Branch_5_0/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -205,16 +205,16 @@
public List<VirtualFile> getResources(VirtualFileFilter filter)
{
+ List<VirtualFile> classPath = unit.getClassPath();
+ if(classPath == null || classPath.isEmpty())
+ return Collections.emptyList();
+
VisitorAttributes va = new VisitorAttributes();
va.setLeavesOnly(true);
SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
va.setRecurseFilter(noJars);
FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
- List<VirtualFile> classPath = unit.getClassPath();
- if(classPath == null)
- return Collections.emptyList();
-
for(VirtualFile root : classPath)
{
try
@@ -228,8 +228,6 @@
}
}
- List<VirtualFile> resources = visitor.getMatched();
-
- return resources;
+ return visitor.getMatched();
}
}
Modified: branches/Branch_5_0/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java
===================================================================
--- branches/Branch_5_0/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -280,7 +280,7 @@
if (harUrl == null)
throw new IllegalArgumentException("Must set one of the resources, root or harUrl: " + this);
- root = VFS.getCachedFile(harUrl);
+ root = VFS.getRoot(harUrl);
}
HibernateMappingVisitor visitor = new HibernateMappingVisitor();
Modified: branches/Branch_5_0/server/src/etc/conf/default/bootstrap/deployers.xml
===================================================================
--- branches/Branch_5_0/server/src/etc/conf/default/bootstrap/deployers.xml 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/server/src/etc/conf/default/bootstrap/deployers.xml 2009-02-03 17:01:06 UTC (rev 83819)
@@ -57,11 +57,19 @@
-->
<bean name="ManagedDeploymentCreator" class="org.jboss.deployers.plugins.managed.TypedManagedDeploymentCreator" />
+ <!-- ModificationType structure processor -->
+ <bean name="ModificationTypeStructureProcessor" class="org.jboss.deployers.vfs.plugins.structure.modify.ModificationTypeStructureProcessor">
+ <incallback method="addMatcher"/>
+ <uncallback method="removeMatcher"/>
+ </bean>
+
<!-- The holder for deployers that determine structure -->
<bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
<property name="structureBuilder">
<!-- The consolidator of the structure information -->
- <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+ <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder">
+ <property name="structureProcessor"><inject bean="ModificationTypeStructureProcessor"/></property>
+ </bean>
</property>
<!-- Accept any implementor of structure deployer -->
<incallback method="addDeployer"/>
Modified: branches/Branch_5_0/server/src/etc/conf/default/bootstrap/vfs.xml
===================================================================
--- branches/Branch_5_0/server/src/etc/conf/default/bootstrap/vfs.xml 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/server/src/etc/conf/default/bootstrap/vfs.xml 2009-02-03 17:01:06 UTC (rev 83819)
@@ -6,20 +6,11 @@
<bean name="VFSCache">
<constructor factoryClass="org.jboss.virtual.spi.cache.VFSCacheFactory" factoryMethod="getInstance">
- <!-- Use the IterableTimedVFSCache implementation -->
- <parameter>org.jboss.virtual.plugins.cache.IterableTimedVFSCache</parameter>
+ <!-- Use the CombinedVFSCache implementation -->
+ <parameter>org.jboss.virtual.plugins.cache.CombinedVFSCache</parameter>
</constructor>
<start ignored="true"/>
- </bean>
-
- <bean name="VfsNamesExceptionHandler" class="org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler">
- <constructor>
- <parameter class="java.lang.String">sqljdbc.jar</parameter>
- </constructor>
- </bean>
-
- <bean name="JBossVFSInitializer" class="org.jboss.virtual.plugins.cache.PreInitializeVFSContexts">
- <property name="initializedVFSContexts" class="java.util.Map">
+ <property name="permanentRoots">
<map keyClass="java.net.URL" valueClass="org.jboss.virtual.spi.ExceptionHandler">
<entry>
<key>${jboss.lib.url}</key>
@@ -33,9 +24,21 @@
<key>${jboss.server.lib.url}</key>
<value><inject bean="VfsNamesExceptionHandler"/></value>
</entry>
+ <entry>
+ <key>${jboss.server.home.url}deploy</key>
+ <value><inject bean="VfsNamesExceptionHandler"/></value>
+ </entry>
</map>
</property>
- <property name="holdReference">true</property>
+ <property name="realCache">
+ <bean class="org.jboss.virtual.plugins.cache.IterableTimedVFSCache"/>
+ </property>
</bean>
+ <bean name="VfsNamesExceptionHandler" class="org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler">
+ <constructor>
+ <parameter class="java.lang.String">sqljdbc.jar</parameter>
+ </constructor>
+ </bean>
+
</deployment>
Modified: branches/Branch_5_0/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
===================================================================
--- branches/Branch_5_0/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -39,7 +39,7 @@
*
* @author Scott.Stark at jboss.org
* @author adrian at jboss.org
- * @version $Revision:$
+ * @version $Revision$
*/
@SuppressWarnings("deprecation")
public class JBossEjbParsingDeployer extends SchemaResolverDeployer<JBossMetaData>
@@ -132,7 +132,7 @@
standardJBossXmlPath = new URL(configUrl, "standardjboss.xml");
}
- VirtualFile stdJBoss = VFS.getCachedFile(standardJBossXmlPath);
+ VirtualFile stdJBoss = VFS.getRoot(standardJBossXmlPath);
if (stdJBoss == null && ignoreMissingStandardJBossXml == false)
{
throw new DeploymentException("standardjboss.xml not found in config dir: " + standardJBossXmlPath);
Modified: branches/Branch_5_0/server/src/main/org/jboss/web/deployers/WARStructure.java
===================================================================
--- branches/Branch_5_0/server/src/main/org/jboss/web/deployers/WARStructure.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/server/src/main/org/jboss/web/deployers/WARStructure.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -38,6 +38,7 @@
* WARStructure.
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
* @version $Revision: 1.1 $
*/
public class WARStructure extends AbstractVFSStructureDeployer
@@ -51,6 +52,9 @@
/** The web-inf/lib/[some-archive]/META-INF filter */
private VirtualFileFilter webInfLibMetaDataFilter;
+ /** Whether to include web-inf in the classpath */
+ private boolean includeWebInfInClasspath;
+
/**
* Sets the default relative order 1000.
*
@@ -103,6 +107,16 @@
this.webInfLibMetaDataFilter = webInfLibMetaDataFilter;
}
+ /**
+ * Should we include web-inf in classpath.
+ *
+ * @param includeWebInfInClasspath the include web-inf flag
+ */
+ public void setIncludeWebInfInClasspath(boolean includeWebInfInClasspath)
+ {
+ this.includeWebInfInClasspath = includeWebInfInClasspath;
+ }
+
public boolean determineStructure(StructureContext structureContext) throws DeploymentException
{
ContextInfo context = null;
@@ -111,6 +125,9 @@
{
boolean trace = log.isTraceEnabled();
+ // the WEB-INF
+ VirtualFile webinf = null;
+
if (isLeaf(file) == false)
{
// We require either a WEB-INF or the name ends in .war
@@ -118,8 +135,8 @@
{
try
{
- VirtualFile child = file.getChild("WEB-INF");
- if (child != null)
+ webinf = file.getChild("WEB-INF");
+ if (webinf != null)
{
if (trace)
log.trace("... ok - directory has a WEB-INF subdirectory");
@@ -206,6 +223,12 @@
log.trace("No WEB-INF/lib for: " + file.getPathName());
}
+ // do we include WEB-INF in classpath
+ if (includeWebInfInClasspath && webinf != null)
+ {
+ addClassPath(structureContext, webinf, true, false, context);
+ }
+
// There are no subdeployments for wars
return true;
}
Modified: branches/Branch_5_0/spring-int/src/main/org/jboss/spring/io/VFSResourceLoader.java
===================================================================
--- branches/Branch_5_0/spring-int/src/main/org/jboss/spring/io/VFSResourceLoader.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/spring-int/src/main/org/jboss/spring/io/VFSResourceLoader.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -59,7 +59,7 @@
{
// Try to parse the location as a URL...
URL url = new URL(location);
- VirtualFile file = VFS.getCachedFile(url);
+ VirtualFile file = VFS.getRoot(url);
return new VFSResource(file);
}
catch (Exception ex)
@@ -69,4 +69,4 @@
}
}
}
-}
\ No newline at end of file
+}
Modified: branches/Branch_5_0/spring-int/src/main/org/jboss/spring/io/VFSResourcePatternResolver.java
===================================================================
--- branches/Branch_5_0/spring-int/src/main/org/jboss/spring/io/VFSResourcePatternResolver.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/spring-int/src/main/org/jboss/spring/io/VFSResourcePatternResolver.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -82,7 +82,7 @@
protected List<Resource> getVFSResources(URL rootURL, String subPattern) throws IOException
{
log.debug("Scanning url: " + rootURL + ", sub-pattern: " + subPattern);
- VirtualFile root = VFS.getCachedFile(rootURL);
+ VirtualFile root = VFS.getRoot(rootURL);
PatternVirtualFileVisitor visitor = new PatternVirtualFileVisitor(subPattern);
root.visit(visitor);
if (log.isTraceEnabled())
@@ -94,7 +94,7 @@
{
try
{
- VirtualFile file = VFS.getCachedFile(url);
+ VirtualFile file = VFS.getRoot(url);
return new VFSResource(file);
}
catch (IOException e)
@@ -153,4 +153,4 @@
return buffer.toString();
}
}
-}
\ No newline at end of file
+}
Modified: branches/Branch_5_0/system/src/main/org/jboss/system/server/profileservice/VFSScanner.java
===================================================================
--- branches/Branch_5_0/system/src/main/org/jboss/system/server/profileservice/VFSScanner.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/system/src/main/org/jboss/system/server/profileservice/VFSScanner.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -47,7 +47,7 @@
/**
* A DeploymentScanner build on top of the VFS and ProfileService. This is a
* first pass to flesh out the APIs/concepts.
- *
+ *
* @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
* @author Scott.Stark at jboss.org
* @author adrian at jboss.org
@@ -63,28 +63,28 @@
/** The URIfied ServerHomeURL */
private URI serverHomeURI;
-
+
/** The list of URIs to scan */
private List<URI> uriList = new CopyOnWriteArrayList<URI>();
-
+
/** The list of VirtualFiles to scan */
private List<VirtualFile> vdfList = new CopyOnWriteArrayList<VirtualFile>();
-
+
/** Allow a filter for scanned directories */
- private VirtualFileFilter filter;
+ private VirtualFileFilter filter;
/** Whether to search for files inside directories whose names containing no dots */
private boolean doRecursiveSearch = true;
-
+
/** A map of deployed virtual files to their names */
private Map<VirtualFile, String> deployedSet = new ConcurrentHashMap<VirtualFile, String>();
/** The deployment factory */
private VFSDeploymentFactory deploymentFactory = VFSDeploymentFactory.getInstance();
-
+
/**
* Get the profileKey.
- *
+ *
* @return the profileKey.
*/
public ProfileKey getProfileKey()
@@ -94,7 +94,7 @@
/**
* Set the profileKey.
- *
+ *
* @param profileKey the profileKey.
*/
public void setProfileKey(ProfileKey profileKey)
@@ -104,7 +104,7 @@
/**
* Get the profileService.
- *
+ *
* @return the profileService.
*/
public ProfileService getProfileService()
@@ -114,7 +114,7 @@
/**
* Set the profileService.
- *
+ *
* @param profileService the profileService.
*/
public void setProfileService(ProfileService profileService)
@@ -124,7 +124,7 @@
/**
* Set the uris
- *
+ *
* @param listspec the uris
* @throws URISyntaxException
* @throws IOException
@@ -136,14 +136,14 @@
throw new NullPointerException("listspec argument cannot be null");
}
List<URI> list = new LinkedList<URI>();
-
+
StringTokenizer stok = new StringTokenizer(listspec, ",");
while (stok.hasMoreTokens())
{
String urispec = stok.nextToken().trim();
-
+
log.debug("Adding URI from spec: " + urispec);
-
+
URI uri = makeURI(urispec);
log.debug("URI: " + uri);
@@ -155,7 +155,7 @@
/**
* Set the uri list
- *
+ *
* @param list the list
* @throws IOException
*/
@@ -165,10 +165,10 @@
{
throw new NullPointerException("list argument cannot be null");
}
-
+
// start out with a fresh list
uriList.clear();
-
+
for(int n = 0; n < list.size(); n ++)
{
URI uri = list.get(n);
@@ -183,7 +183,7 @@
/**
* Get the uri list
- *
+ *
* @return the list
*/
public List<URI> getURIList()
@@ -193,7 +193,7 @@
/**
* Set whether to do recursive search
- *
+ *
* @param recurse true when recurisve
*/
public void setRecursiveSearch(boolean recurse)
@@ -203,7 +203,7 @@
/**
* Get the recursive search
- *
+ *
* @return true when recursive
*/
public boolean getRecursiveSearch()
@@ -213,7 +213,7 @@
/**
* Set the filter
- *
+ *
* @param classname the filter class name
* @throws ClassNotFoundException when the class is not found
* @throws IllegalAccessException when the class's default constructor is not public
@@ -230,7 +230,7 @@
/**
* Get the filer
- *
+ *
* @return the filter
*/
public String getFilter()
@@ -244,7 +244,7 @@
/**
* Set the filter instance
- *
+ *
* @param filter ther filter
*/
public void setFilterInstance(VirtualFileFilter filter)
@@ -254,7 +254,7 @@
/**
* Get the filter instance
- *
+ *
* @return the filter
*/
public VirtualFileFilter getFilterInstance()
@@ -264,7 +264,7 @@
/**
* Add a uri
- *
+ *
* @param uri the uri
* @throws IOException for an error accessing the uri
*/
@@ -279,12 +279,12 @@
log.debug("Added URI: " + uri);
VirtualFile vf = getVFforURI(uri);
vdfList.add(vf);
- }
+ }
}
/**
* Remove a uri
- *
+ *
* @param uri the uri
* @throws IOException for an error accessing the uri
*/
@@ -298,7 +298,7 @@
VirtualFile vf = getVFforURI(uri);
vdfList.remove(vf);
boolean success = uriList.remove(uri);
-
+
if (success)
{
log.debug("Removed URI: " + uri);
@@ -307,7 +307,7 @@
/**
* Whether it has the uri
- *
+ *
* @param uri the uri
* @return when the uri is configured
*/
@@ -322,7 +322,7 @@
/**
* Start the scan
- *
+ *
* @throws Exception for any error
*/
public void start() throws Exception
@@ -345,7 +345,7 @@
/**
* Scan
- *
+ *
* @throws Exception for any error
*/
public synchronized void scan() throws Exception
@@ -354,9 +354,9 @@
{
throw new IllegalStateException("not initialized");
}
-
+
boolean trace = log.isTraceEnabled();
-
+
// Scan for deployments
if (trace)
{
@@ -382,7 +382,7 @@
}
}
}
-
+
if (trace)
{
log.trace("toDeployList");
@@ -408,7 +408,7 @@
// ********
// Undeploy
// ********
-
+
for (Iterator i = toRemoveList.iterator(); i.hasNext();)
{
VirtualFile deployedComponent = (VirtualFile)i.next();
@@ -422,23 +422,23 @@
for (Iterator i = toDeployList.iterator(); i.hasNext();)
{
VirtualFile component = (VirtualFile)i.next();
-
+
// if component is not deployed already, deploy it
if (!deployedSet.containsKey(component))
{
deploy(component);
}
- // component must have been deployed by now, so remove it from list
+ // component must have been deployed by now, so remove it from list
i.remove();
-
+
}
-
+
}
/**
* Make a uri
- *
+ *
* @param urispec the uri spec
* @return the uri
* @throws URISyntaxException for an error parsing he uri
@@ -449,14 +449,14 @@
urispec = StringPropertyReplacer.replaceProperties(urispec);
return serverHomeURI.resolve(urispec);
}
-
+
/**
* A helper to find all deployments under a directory component
* and add them to the supplied list.
- *
+ *
* We may recurse.
- *
- * @param list the list of virtual files
+ *
+ * @param list the list of virtual files
* @param root the root file
* @throws IOException for any error
*/
@@ -464,7 +464,7 @@
throws IOException
{
List<VirtualFile> components = root.getChildren();
-
+
for (VirtualFile component : components)
{
// Filter the component regardless of its type
@@ -489,7 +489,7 @@
/**
* A helper to deploy the given component using the deployer.
- *
+ *
* @param component the virtual file
*/
private void deploy(final VirtualFile component)
@@ -520,10 +520,10 @@
deployedSet.put(component, deployment.getName());
}
}
-
+
/**
* A helper to undeploy the given component using the deployer.
- *
+ *
* @param component the component
*/
private void undeploy(final VirtualFile component)
@@ -534,7 +534,7 @@
{
log.trace("Undeploying: " + component);
}
- String name = deployedSet.remove(component);
+ String name = deployedSet.remove(component);
Profile profile = profileService.getProfile(profileKey);
remove(profile, name);
}
@@ -542,30 +542,30 @@
{
log.error("Failed to undeploy: " + component, e);
}
- }
-
+ }
+
/**
* Remove the component
- *
+ *
* @param profile the profile
* @param file the virtual file
* @return the deployment context or null if not added, e.g. it already exists
* @throws Exception for any error
*/
protected abstract VFSDeployment add(Profile profile, VirtualFile file) throws Exception;
-
+
/**
* Remove the component
- *
+ *
* @param profile the profile
* @param name the name
* @throws Exception for any error
*/
protected abstract void remove(Profile profile, String name) throws Exception;
-
+
/**
* Create a deployment
- *
+ *
* @param file the root file
* @return the deployment
*/
@@ -585,6 +585,6 @@
*/
private VirtualFile getVFforURI(URI uri) throws IOException
{
- return VFS.getCachedFile(uri);
+ return VFS.getRoot(uri);
}
}
Modified: branches/Branch_5_0/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
===================================================================
--- branches/Branch_5_0/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -66,13 +66,13 @@
/**
* An implementation of DeploymentRepository that relies on java
* serialization to store contents on the file system.
- *
+ *
* + root/{name}/bootstrap - the bootstrap beans
* + root/{name}/deployers - profile deployers
* + root/{name}/deploy - installed deployments
* + root/{name}/apps - post install deployments
* + root/{name}/attachments - pre-processed attachments + admin edits to deployments
- *
+ *
* @author Scott.Stark at jboss.org
* @version $Revision$
*/
@@ -111,7 +111,7 @@
private ReentrantReadWriteLock contentLock = new ReentrantReadWriteLock(true);
/** Should an attempt to overwrite existing content fail in {@link #addDeploymentContent(String, ZipInputStream, DeploymentPhase)}*/
private boolean failIfAlreadyExists = false;
-
+
/** Allowed deployments filter */
private VirtualFileFilter deploymentFilter;
/** The metadata include filter */
@@ -164,22 +164,22 @@
{
adminEditsRoot = new File(root);
}
-
+
public VirtualFileFilter getDeploymentFilter()
{
return deploymentFilter;
}
-
+
public void setDeploymentFilter(VirtualFileFilter deploymentFilter)
{
this.deploymentFilter = deploymentFilter;
}
-
+
public VirtualFileFilter getHotDeploymentFilter()
{
return hotDeploymentFilter;
}
-
+
public void setHotDeploymentFilter(VirtualFileFilter hotDeploymentFilter)
{
this.hotDeploymentFilter = hotDeploymentFilter;
@@ -246,11 +246,11 @@
names.addAll(this.applicationCtxs.keySet());
break;
}
- return names;
+ return names;
}
/**
- *
+ *
*/
public String addDeploymentContent(String name, InputStream contentIS, DeploymentPhase phase)
throws IOException
@@ -269,7 +269,7 @@
throw new FileNotFoundException("Failed to obtain content dir for phase: "+phase);
File contentFile = new File(contentRoot, name);
// TODO do we need to create the parent directory if the name is myDeployments/myRealDeployment.jar ?
-
+
if(failIfAlreadyExists && contentFile.exists())
throw new SyncFailedException("Deployment content already exists: "+contentFile.getAbsolutePath());
FileOutputStream fos = new FileOutputStream(contentFile);
@@ -313,8 +313,8 @@
}
/**
- * @throws URISyntaxException
- *
+ * @throws URISyntaxException
+ *
*/
public VirtualFile getDeploymentContent(String name, DeploymentPhase phase)
throws IOException, URISyntaxException
@@ -366,7 +366,7 @@
public int lockDeploymentContent(String vfsPath, DeploymentPhase phase)
{
if( log.isTraceEnabled() )
- log.trace("lockDeploymentContent, "+vfsPath);
+ log.trace("lockDeploymentContent, "+vfsPath);
int flags = setDeploymentContentFlags(vfsPath, phase, DeploymentContentFlags.LOCKED);
return flags;
}
@@ -374,7 +374,7 @@
public int unlockDeploymentContent(String vfsPath, DeploymentPhase phase)
{
if( log.isTraceEnabled() )
- log.trace("unlockDeploymentContent, "+vfsPath);
+ log.trace("unlockDeploymentContent, "+vfsPath);
int flags = clearDeploymentContentFlags(vfsPath, phase, DeploymentContentFlags.LOCKED);
return flags;
}
@@ -418,13 +418,13 @@
{
contentLock.writeLock().lock();
if( log.isTraceEnabled() )
- log.trace("acquireDeploymentContentLock, have write lock");
+ log.trace("acquireDeploymentContentLock, have write lock");
}
public void releaseDeploymentContentLock()
{
contentLock.writeLock().unlock();
if( log.isTraceEnabled() )
- log.trace("releaseDeploymentContentLock, gave up write lock");
+ log.trace("releaseDeploymentContentLock, gave up write lock");
}
public void addDeployment(String vfsPath, VFSDeployment d, DeploymentPhase phase)
@@ -554,7 +554,7 @@
log.trace(name + " was removed");
}
// Check for modification
- else if( hasBeenModified(root) ||
+ else if( hasBeenModified(root) ||
hasDeploymentContentFlags(root.getPathName(), DeploymentPhase.APPLICATION, DeploymentContentFlags.MODIFIED) )
{
long rootLastModified = root.getLastModified();
@@ -600,7 +600,7 @@
lastModified = System.currentTimeMillis();
return modified;
}
-
+
/**
* Check if the deployment has been modified.
*
@@ -630,10 +630,10 @@
return false;
}
-
+
/**
* Check for modifications.
- *
+ *
* @param deploymentContext
* @return
* @throws IOException
@@ -680,8 +680,8 @@
}
return hasBeenModfied;
}
-
+
public Collection<VFSDeployment> getDeployments(DeploymentPhase phase)
throws Exception
{
@@ -721,7 +721,7 @@
lastModified = System.currentTimeMillis();
return ctx;
}
-
+
public String toString()
{
StringBuilder tmp = new StringBuilder(super.toString());
@@ -735,7 +735,7 @@
/**
* Create a profile deployment repository
- *
+ *
* @throws IOException
*/
public void create() throws Exception
@@ -772,7 +772,7 @@
/**
* Load the profile deployments
- *
+ *
* @throws IOException
* @throws NoSuchProfileException
*/
@@ -816,7 +816,7 @@
else
{
// hack to load conf/jboss-service.xml until its removed
- loadBootstraps(null);
+ loadBootstraps(null);
}
VFS deployersVFS = VFS.getVFS(deployersDir.toURI());
loadDeployers(deployersVFS.getRoot());
@@ -849,7 +849,7 @@
* @return virtual file representing app uri
* @throws IOException for any error
*/
- protected VirtualFile getCachedApplicationVF(URI uri) throws IOException
+ protected VirtualFile getCachedApplicationVF(URI uri) throws IOException
{
String uriString = uri.toString();
VirtualFile dir;
@@ -858,7 +858,7 @@
dir = applicationVFCache.get(uriString);
if (dir == null)
{
- dir = VFS.getCachedFile(uri);
+ dir = VFS.getRoot(uri);
applicationVFCache.put(uriString, dir);
}
}
@@ -1059,7 +1059,7 @@
/**
* Load the bootstrap descriptors under bootstrapDir:
- *
+ *
* @param bootstrapDir
* @throws IOException
*/
@@ -1072,7 +1072,7 @@
for(VirtualFile vf : children)
{
VFSDeployment vfCtx = loadDeploymentData(vf, DeploymentPhase.BOOTSTRAP);
- bootstrapCtxs.put(vfCtx.getName(), vfCtx);
+ bootstrapCtxs.put(vfCtx.getName(), vfCtx);
}
}
else
@@ -1085,13 +1085,13 @@
if(jbossServiceVF == null)
throw new FileNotFoundException("Failed to find jboss-service.xml under conf");
VFSDeployment vfCtx = loadDeploymentData(jbossServiceVF, DeploymentPhase.BOOTSTRAP);
- bootstrapCtxs.put(vfCtx.getName(), vfCtx);
+ bootstrapCtxs.put(vfCtx.getName(), vfCtx);
}
}
/**
* Load all the deployments under the deployersDir.
- *
+ *
* @param deployersDir
* @throws IOException
*/
@@ -1102,13 +1102,13 @@
for(VirtualFile vf : children)
{
VFSDeployment vfCtx = loadDeploymentData(vf, DeploymentPhase.DEPLOYER);
- deployerCtxs.put(vfCtx.getName(), vfCtx);
+ deployerCtxs.put(vfCtx.getName(), vfCtx);
}
}
/**
* Load all the applications under the applicationDir.
- *
+ *
* @param applicationDir
* @throws IOException
*/
@@ -1126,7 +1126,7 @@
/**
* Added deployments for DeploymentPhase.APPLICATION.
- *
+ *
* @param list
* @param root
* @throws Exception
@@ -1144,7 +1144,7 @@
log.trace("ignoring "+ component);
continue;
}
-
+
String key = component.toURI().toString();
if (applicationCtxs.containsKey(key) == true)
continue;
@@ -1167,7 +1167,7 @@
/**
* Update a deployment.
- *
+ *
* @param d the deployment
* @param phase the deployment phase
* @param comp the managed component
@@ -1188,7 +1188,7 @@
log.error("no metadata attached.");
}
}
-
+
protected VFSDeployment loadDeploymentData(VirtualFile file, DeploymentPhase phase)
{
try
Modified: branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
===================================================================
--- branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -43,13 +43,13 @@
/**
* SARDeployer.<p>
- *
+ *
* This deployer is responsible for looking for -service.xml
* and creating the metadata object.<p>
- *
+ *
* The {@link ServiceClassLoaderDeployer} and {@link ServiceDeployer} does the
* real work of deployment.
- *
+ *
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @author Scott.Stark at jboss.org
* @version $Revision$
@@ -58,7 +58,7 @@
{
/**
* Create a new SARDeployer.
- *
+ *
* @throws IllegalArgumentException for a null kernel
*/
public SARDeployer()
@@ -85,7 +85,7 @@
List<ServiceDeploymentClassPath> classPaths = parsed.getClassPaths();
if (classPaths != null)
processXMLClasspath(unit, classPaths);
-
+
List<ServiceMetaData> services = parsed.getServices();
if (services == null)
{
@@ -98,7 +98,7 @@
if (log.isDebugEnabled())
{
String docStr = DOMWriter.printNode(config, true);
- int index = docStr.toLowerCase().indexOf("password");
+ int index = docStr.toLowerCase().indexOf("password");
if (index != -1)
{
docStr = maskPasswords(docStr, index);
@@ -109,14 +109,14 @@
services = SMDparser.parse();
parsed.setServices(services);
}
-
-
+
+
return parsed;
}
/**
* Process the xml classpath
- *
+ *
* @param unit the unit
* @param classpaths the classpaths
* @throws Exception for any error
@@ -136,7 +136,7 @@
{
ServerConfig config = ServerConfigLocator.locate();
URL codeBaseURL = new URL(config.getServerHomeURL(), codebase);
- codebaseFile = VFS.getVirtualFile(codeBaseURL, "");
+ codebaseFile = VFS.getRoot(codeBaseURL);
}
if (codebaseFile == null)
@@ -156,12 +156,9 @@
}
- List<VirtualFile> origClassPath = unit.getClassPath();
- if (origClassPath != null)
- classpath.addAll(origClassPath);
- unit.setClassPath(classpath);
+ unit.prependClassPath(classpath);
}
-
+
private String maskPasswords(String original, int index)
{
StringBuilder sb = new StringBuilder(original);
Modified: branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java
===================================================================
--- branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -40,6 +40,7 @@
* type {@link ServiceDeployment}.
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
* @version $Revision: 1.1 $
*/
public class ServiceDeployer extends AbstractSimpleRealDeployer<ServiceMetaData>
Modified: branches/Branch_5_0/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
===================================================================
--- branches/Branch_5_0/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -67,7 +67,7 @@
* This is used to support the SARDeployer and mbean integration.
*
* @author Scott.Stark at jboss.org
- * @version $Revision:$
+ * @version $Revision$
*/
public class JMXKernel extends JBossObject
implements JMXKernelMBean, NotificationEmitter
@@ -513,7 +513,7 @@
for (int i = 0; i < list.size(); ++i)
{
URL url = list.get(i);
- files[i] = VFS.getCachedFile(url);
+ files[i] = VFS.getRoot(url);
}
VFSClassLoaderPolicy policy = new VFSClassLoaderPolicy(files);
@@ -566,3 +566,4 @@
}
}
+
Modified: branches/Branch_5_0/tomcat/src/main/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java
===================================================================
--- branches/Branch_5_0/tomcat/src/main/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/tomcat/src/main/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java 2009-02-03 17:01:06 UTC (rev 83819)
@@ -22,8 +22,6 @@
package org.jboss.web.tomcat.service.deployers;
import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.List;
import java.util.Properties;
import java.util.Set;
@@ -46,16 +44,13 @@
*
* @author Scott.Stark at jboss.org
* @author adrian at jboss.org
- * @version $Revision:$
+ * @version $Revision$
*/
public class WarClassLoaderDeployer extends AbstractSimpleVFSRealDeployer<JBossWebMetaData>
{
/** The parent class loader first model flag */
private boolean java2ClassLoadingCompliance = false;
- /** Whether to include web-inf in the classpath */
- private boolean includeWebInfInClasspath;
-
/** Package names that should be ignored for class loading */
private String filteredPackages;
@@ -89,34 +84,20 @@
this.filteredPackages = pkgs;
}
+ @Deprecated
public boolean isIncludeWebInfInClasspath()
{
- return includeWebInfInClasspath;
+ throw new IllegalArgumentException("Not supported anymore, see WARStructure.");
}
+ @Deprecated
public void setIncludeWebInfInClasspath(boolean includeWebInfInClasspath)
{
- this.includeWebInfInClasspath = includeWebInfInClasspath;
+ log.warn("Not supported anymore, use WARStructure::setIncludeWebInfInClasspath(boolean).");
}
@Override
public void deploy(VFSDeploymentUnit unit, JBossWebMetaData metaData) throws DeploymentException
{
- // FIXME This should be in the WAR structure deployer
- if (includeWebInfInClasspath)
- {
- VirtualFile webInf = getWebInf(unit);
- if (webInf != null)
- {
- ArrayList<VirtualFile> classPath = new ArrayList<VirtualFile>();
- List<VirtualFile> unitClassPath = unit.getClassPath();
- if (unitClassPath != null)
- classPath.addAll(unitClassPath);
- if (classPath.contains(webInf) == false)
- classPath.add(webInf);
- unit.setClassPath(classPath);
- }
- }
-
// Ignore if it already has classloading
if (unit.isAttachmentPresent(ClassLoadingMetaData.class))
return;
@@ -198,23 +179,7 @@
unit.addAttachment(ClassLoadingMetaData.class, classLoadingMetaData);
}
- @Override
- public void undeploy(VFSDeploymentUnit unit, JBossWebMetaData metaData)
- {
-
- // FIXME This should be in the WAR structure deployer
- if (includeWebInfInClasspath)
- {
- VirtualFile webInf = getWebInf(unit);
- if (webInf != null)
- {
- List<VirtualFile> classPath = unit.getClassPath();
- if (classPath != null)
- classPath.remove(webInf);
- }
- }
- }
-
+ @Deprecated
protected VirtualFile getWebInf(VFSDeploymentUnit unit)
{
return unit.getFile("WEB-INF");
Modified: branches/Branch_5_0/tomcat/src/resources/war-deployers-jboss-beans.xml
===================================================================
--- branches/Branch_5_0/tomcat/src/resources/war-deployers-jboss-beans.xml 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/tomcat/src/resources/war-deployers-jboss-beans.xml 2009-02-03 17:01:06 UTC (rev 83819)
@@ -2,7 +2,7 @@
<!--
Web application deployers
-$Id:$
+$Id$
-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
@@ -14,6 +14,7 @@
<constructor><parameter class="java.lang.String">.jar</parameter></constructor>
</bean>
</property>
+ <property name="includeWebInfInClasspath">true</property>
<property name="contextInfoOrder">1000</property>
</bean>
@@ -31,10 +32,7 @@
<!-- Allow for war local class loaders: in testing -->
<bean name="WarClassLoaderDeployer" class="org.jboss.web.tomcat.service.deployers.WarClassLoaderDeployer">
<property name="relativeOrder">-1</property>
-
- <property name="includeWebInfInClasspath">true</property>
- <property name="filteredPackages">javax.servlet,org.apache.commons.logging</property>
-
+ <property name="filteredPackages">javax.servlet,org.apache.commons.logging</property>
</bean>
<!--
Modified: branches/Branch_5_0/varia/src/resources/seam/seam-deployers-jboss-beans.xml
===================================================================
--- branches/Branch_5_0/varia/src/resources/seam/seam-deployers-jboss-beans.xml 2009-02-03 16:58:20 UTC (rev 83818)
+++ branches/Branch_5_0/varia/src/resources/seam/seam-deployers-jboss-beans.xml 2009-02-03 17:01:06 UTC (rev 83819)
@@ -8,4 +8,7 @@
<!-- Seam deployer -->
<bean name="SeamDeployer" class="org.jboss.seam.integration.microcontainer.deployers.SeamWebUrlIntegrationDeployer"/>
+ <!-- Seam modification type matcher -->
+ <bean name="SeamMTMatcher" class="org.jboss.seam.integration.microcontainer.deployers.SeamModificationTypeMatcher"/>
+
</deployment>
More information about the jboss-cvs-commits
mailing list