[jboss-cvs] JBossAS SVN: r89441 - in projects/spring-int/trunk: vfs/src/main/java/org/jboss/spring/vfs and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 26 10:56:39 EDT 2009


Author: marius.bogoevici
Date: 2009-05-26 10:56:39 -0400 (Tue, 26 May 2009)
New Revision: 89441

Added:
   projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/
   projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/VFSClassPathXmlApplicationContext.java
   projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/VFSXmlWebApplicationContext.java
Removed:
   projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSClassPathXmlApplicationContext.java
   projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSXmlWebApplicationContext.java
Modified:
   projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/NamedXmlApplicationContext.java
Log:
Separate concerns in modules: moving VFS ApplicationContexts into jboss-spring-int-vfs.

Modified: projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/NamedXmlApplicationContext.java
===================================================================
--- projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/NamedXmlApplicationContext.java	2009-05-26 14:35:29 UTC (rev 89440)
+++ projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/NamedXmlApplicationContext.java	2009-05-26 14:56:39 UTC (rev 89441)
@@ -23,14 +23,13 @@
 
 import java.io.IOException;
 
+import org.jboss.spring.vfs.context.VFSClassPathXmlApplicationContext;
+
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 import org.springframework.beans.factory.xml.ResourceEntityResolver;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.ResourcePatternResolver;
-import org.jboss.spring.vfs.VFSResourcePatternResolver;
 
 /**
  * @author <a href="mailto:ales.justin at genera-lynx.com">Ales Justin</a>

Deleted: projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSClassPathXmlApplicationContext.java
===================================================================
--- projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSClassPathXmlApplicationContext.java	2009-05-26 14:35:29 UTC (rev 89440)
+++ projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSClassPathXmlApplicationContext.java	2009-05-26 14:56:39 UTC (rev 89441)
@@ -1,101 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.spring.factory;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.context.ApplicationContext;
-import org.springframework.beans.BeansException;
-import org.springframework.core.io.support.ResourcePatternResolver;
-import org.springframework.core.io.Resource;
-import org.jboss.spring.vfs.VFSResourcePatternResolver;
-import org.jboss.spring.vfs.VFSResourceLoader;
-
-/**
- * {@link org.springframework.context.support.ClassPathXmlApplicationContext} variant
- * adding support for classpath scanning in JBoss AS 5, using the VFS file system.
- *
- * @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
- */
-public class VFSClassPathXmlApplicationContext extends ClassPathXmlApplicationContext
-{
-   public VFSClassPathXmlApplicationContext()
-   {
-      super();
-   }
-
-   public VFSClassPathXmlApplicationContext(ApplicationContext parent)
-   {
-      super(parent);
-   }
-
-   public VFSClassPathXmlApplicationContext(String configLocation) throws BeansException
-   {
-      super(configLocation);
-   }
-
-   public VFSClassPathXmlApplicationContext(String[] configLocations) throws BeansException
-   {
-      super(configLocations);
-   }
-
-   public VFSClassPathXmlApplicationContext(String[] configLocations, ApplicationContext parent) throws BeansException
-   {
-      super(configLocations, parent);
-   }
-
-   public VFSClassPathXmlApplicationContext(String[] configLocations, boolean refresh) throws BeansException
-   {
-      super(configLocations, refresh);
-   }
-
-   public VFSClassPathXmlApplicationContext(String[] configLocations, boolean refresh, ApplicationContext parent) throws BeansException
-   {
-      super(configLocations, refresh, parent);
-   }
-
-   public VFSClassPathXmlApplicationContext(String path, Class clazz) throws BeansException
-   {
-      super(path, clazz);
-   }
-
-   public VFSClassPathXmlApplicationContext(String[] paths, Class clazz) throws BeansException
-   {
-      super(paths, clazz);
-   }
-
-   public VFSClassPathXmlApplicationContext(String[] paths, Class clazz, ApplicationContext parent) throws BeansException
-   {
-      super(paths, clazz, parent);
-   }
-
-   protected ResourcePatternResolver getResourcePatternResolver()
-   {
-      return new VFSResourcePatternResolver(new VFSResourceLoader(getClassLoader()));
-   }
-
-   @Override
-   public Resource getResource(String location)
-   {
-      return getResourcePatternResolver().getResource(location);
-   }
-}
-

Deleted: projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSXmlWebApplicationContext.java
===================================================================
--- projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSXmlWebApplicationContext.java	2009-05-26 14:35:29 UTC (rev 89440)
+++ projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSXmlWebApplicationContext.java	2009-05-26 14:56:39 UTC (rev 89441)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.spring.factory;
-
-import org.jboss.spring.vfs.VFSResourceLoader;
-import org.jboss.spring.vfs.VFSServletContextResourcePatternResolver;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.ResourcePatternResolver;
-import org.springframework.web.context.support.XmlWebApplicationContext;
-
-
-/**
- * XmlWebApplicationContext variant adding support for classpath
- * scanning in JBoss AS 5, using the VFS file system.
- *
- * @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
- */
-public class VFSXmlWebApplicationContext extends XmlWebApplicationContext
-{
-   @Override
-   protected ResourcePatternResolver getResourcePatternResolver()
-   {
-      return new VFSServletContextResourcePatternResolver(
-              new WebApplicationContextAwareVFSResourceLoader(getClassLoader()));
-   }
-
-   /**
-    * Customization of {@link VFSResourceLoader} that delegates to the owner class
-    * (i.e. XmlWebApplicationContext) for retrieving resources by path, allowing
-    * for ServletContextResources to be returned in this case.
-    */
-   private class WebApplicationContextAwareVFSResourceLoader extends VFSResourceLoader
-   {
-
-      WebApplicationContextAwareVFSResourceLoader(ClassLoader classLoader) {
-         super(classLoader);
-      }
-
-       @Override
-      protected Resource getResourceByPath(String path)
-      {
-         return VFSXmlWebApplicationContext.this.getResourceByPath(path);
-      }
-   }
-
-    @Override
-    public Resource getResource(String location)
-    {
-        return getResourcePatternResolver().getResource(location);
-    }
-}
-

Copied: projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/VFSClassPathXmlApplicationContext.java (from rev 89346, projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSClassPathXmlApplicationContext.java)
===================================================================
--- projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/VFSClassPathXmlApplicationContext.java	                        (rev 0)
+++ projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/VFSClassPathXmlApplicationContext.java	2009-05-26 14:56:39 UTC (rev 89441)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.spring.vfs.context;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.context.ApplicationContext;
+import org.springframework.beans.BeansException;
+import org.springframework.core.io.support.ResourcePatternResolver;
+import org.springframework.core.io.Resource;
+import org.jboss.spring.vfs.VFSResourcePatternResolver;
+import org.jboss.spring.vfs.VFSResourceLoader;
+
+/**
+ * {@link org.springframework.context.support.ClassPathXmlApplicationContext} variant
+ * adding support for classpath scanning in JBoss AS 5, using the VFS file system.
+ *
+ * @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
+ */
+public class VFSClassPathXmlApplicationContext extends ClassPathXmlApplicationContext
+{
+   public VFSClassPathXmlApplicationContext()
+   {
+      super();
+   }
+
+   public VFSClassPathXmlApplicationContext(ApplicationContext parent)
+   {
+      super(parent);
+   }
+
+   public VFSClassPathXmlApplicationContext(String configLocation) throws BeansException
+   {
+      super(configLocation);
+   }
+
+   public VFSClassPathXmlApplicationContext(String[] configLocations) throws BeansException
+   {
+      super(configLocations);
+   }
+
+   public VFSClassPathXmlApplicationContext(String[] configLocations, ApplicationContext parent) throws BeansException
+   {
+      super(configLocations, parent);
+   }
+
+   public VFSClassPathXmlApplicationContext(String[] configLocations, boolean refresh) throws BeansException
+   {
+      super(configLocations, refresh);
+   }
+
+   public VFSClassPathXmlApplicationContext(String[] configLocations, boolean refresh, ApplicationContext parent) throws BeansException
+   {
+      super(configLocations, refresh, parent);
+   }
+
+   public VFSClassPathXmlApplicationContext(String path, Class clazz) throws BeansException
+   {
+      super(path, clazz);
+   }
+
+   public VFSClassPathXmlApplicationContext(String[] paths, Class clazz) throws BeansException
+   {
+      super(paths, clazz);
+   }
+
+   public VFSClassPathXmlApplicationContext(String[] paths, Class clazz, ApplicationContext parent) throws BeansException
+   {
+      super(paths, clazz, parent);
+   }
+
+   protected ResourcePatternResolver getResourcePatternResolver()
+   {
+      return new VFSResourcePatternResolver(new VFSResourceLoader(getClassLoader()));
+   }
+
+   @Override
+   public Resource getResource(String location)
+   {
+      return getResourcePatternResolver().getResource(location);
+   }
+}
+

Copied: projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/VFSXmlWebApplicationContext.java (from rev 89346, projects/spring-int/trunk/deployers/src/main/java/org/jboss/spring/factory/VFSXmlWebApplicationContext.java)
===================================================================
--- projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/VFSXmlWebApplicationContext.java	                        (rev 0)
+++ projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/context/VFSXmlWebApplicationContext.java	2009-05-26 14:56:39 UTC (rev 89441)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.spring.vfs.context;
+
+import org.jboss.spring.vfs.VFSResourceLoader;
+import org.jboss.spring.vfs.VFSServletContextResourcePatternResolver;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.support.ResourcePatternResolver;
+import org.springframework.web.context.support.XmlWebApplicationContext;
+
+
+/**
+ * XmlWebApplicationContext variant adding support for classpath
+ * scanning in JBoss AS 5, using the VFS file system.
+ *
+ * @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
+ */
+public class VFSXmlWebApplicationContext extends XmlWebApplicationContext
+{
+   @Override
+   protected ResourcePatternResolver getResourcePatternResolver()
+   {
+      return new VFSServletContextResourcePatternResolver(
+              new WebApplicationContextAwareVFSResourceLoader(getClassLoader()));
+   }
+
+   /**
+    * Customization of {@link VFSResourceLoader} that delegates to the owner class
+    * (i.e. XmlWebApplicationContext) for retrieving resources by path, allowing
+    * for ServletContextResources to be returned in this case.
+    */
+   private class WebApplicationContextAwareVFSResourceLoader extends VFSResourceLoader
+   {
+
+      WebApplicationContextAwareVFSResourceLoader(ClassLoader classLoader) {
+         super(classLoader);
+      }
+
+       @Override
+      protected Resource getResourceByPath(String path)
+      {
+         return VFSXmlWebApplicationContext.this.getResourceByPath(path);
+      }
+   }
+
+    @Override
+    public Resource getResource(String location)
+    {
+        return getResourcePatternResolver().getResource(location);
+    }
+}
+




More information about the jboss-cvs-commits mailing list