[jboss-cvs] JBossAS SVN: r83811 - in trunk: ejb3/src/main/org/jboss/ejb3/deployers and 10 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 3 08:56:23 EST 2009
Author: alesj
Date: 2009-02-03 08:56:23 -0500 (Tue, 03 Feb 2009)
New Revision: 83811
Modified:
trunk/component-matrix/pom.xml
trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java
trunk/server/src/etc/conf/default/bootstrap/deployers.xml
trunk/server/src/etc/conf/default/bootstrap/vfs.xml
trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
trunk/server/src/main/org/jboss/web/deployers/WARStructure.java
trunk/spring-int/src/main/org/jboss/spring/io/VFSResourceLoader.java
trunk/spring-int/src/main/org/jboss/spring/io/VFSResourcePatternResolver.java
trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
trunk/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java
trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java
trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
trunk/varia/src/resources/seam/seam-deployers-jboss-beans.xml
Log:
Temp usage of MC snapshots.
Simple VFS, Deployers fixes.
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/component-matrix/pom.xml 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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>
<version.webbeans.integration>5.2.0.ALPHA3</version.webbeans.integration>
</properties>
Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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: trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java
===================================================================
--- trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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: trunk/server/src/etc/conf/default/bootstrap/deployers.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap/deployers.xml 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/server/src/etc/conf/default/bootstrap/deployers.xml 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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: trunk/server/src/etc/conf/default/bootstrap/vfs.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap/vfs.xml 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/server/src/etc/conf/default/bootstrap/vfs.xml 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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: trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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: trunk/server/src/main/org/jboss/web/deployers/WARStructure.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/WARStructure.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/server/src/main/org/jboss/web/deployers/WARStructure.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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$
*/
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: trunk/spring-int/src/main/org/jboss/spring/io/VFSResourceLoader.java
===================================================================
--- trunk/spring-int/src/main/org/jboss/spring/io/VFSResourceLoader.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/spring-int/src/main/org/jboss/spring/io/VFSResourceLoader.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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)
Modified: trunk/spring-int/src/main/org/jboss/spring/io/VFSResourcePatternResolver.java
===================================================================
--- trunk/spring-int/src/main/org/jboss/spring/io/VFSResourcePatternResolver.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/spring-int/src/main/org/jboss/spring/io/VFSResourcePatternResolver.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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)
Modified: trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -137,7 +137,7 @@
{
ServerConfig config = ServerConfigLocator.locate();
URL codeBaseURL = new URL(config.getServerHomeURL(), codebase);
- codebaseFile = VFS.getCachedFile(codeBaseURL);
+ codebaseFile = VFS.getRoot(codeBaseURL);
}
if (codebaseFile == null)
@@ -154,19 +154,15 @@
List<VirtualFile> archiveFiles = codebaseFile.getChildren(filter);
classpath.addAll(archiveFiles);
}
-
}
- 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);
- String modified = null;
+ String modified;
int startPasswdStringIndex = sb.indexOf(">", index);
if (startPasswdStringIndex != -1)
{
Modified: trunk/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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$
*/
public class ServiceDeployer extends AbstractSimpleRealDeployer<ServiceMetaData>
Modified: trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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);
Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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: trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
===================================================================
--- trunk/tomcat/src/resources/war-deployers-jboss-beans.xml 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/tomcat/src/resources/war-deployers-jboss-beans.xml 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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: trunk/varia/src/resources/seam/seam-deployers-jboss-beans.xml
===================================================================
--- trunk/varia/src/resources/seam/seam-deployers-jboss-beans.xml 2009-02-03 13:48:46 UTC (rev 83810)
+++ trunk/varia/src/resources/seam/seam-deployers-jboss-beans.xml 2009-02-03 13:56:23 UTC (rev 83811)
@@ -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