[jboss-cvs] JBossAS SVN: r78701 - in projects/demos/microcontainer/trunk/jmx/src/main: java/org/jboss/demos/deployers and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Sep 19 06:14:22 EDT 2008


Author: alesj
Date: 2008-09-19 06:14:22 -0400 (Fri, 19 Sep 2008)
New Revision: 78701

Added:
   projects/demos/microcontainer/trunk/jmx/src/main/java/org/jboss/demos/deployers/
   projects/demos/microcontainer/trunk/jmx/src/main/java/org/jboss/demos/deployers/legacy/
   projects/demos/microcontainer/trunk/jmx/src/main/java/org/jboss/demos/deployers/legacy/DirectoryStructure.java
Modified:
   projects/demos/microcontainer/trunk/jmx/src/main/resources/META-INF/system-jmx-beans.xml
Log:
Testing ground for JBAS-5900.

Added: projects/demos/microcontainer/trunk/jmx/src/main/java/org/jboss/demos/deployers/legacy/DirectoryStructure.java
===================================================================
--- projects/demos/microcontainer/trunk/jmx/src/main/java/org/jboss/demos/deployers/legacy/DirectoryStructure.java	                        (rev 0)
+++ projects/demos/microcontainer/trunk/jmx/src/main/java/org/jboss/demos/deployers/legacy/DirectoryStructure.java	2008-09-19 10:14:22 UTC (rev 78701)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.demos.deployers.legacy;
+
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Legacy directory structure.
+ * See JBAS-5900 for more details.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Deprecated
+public class DirectoryStructure extends AbstractVFSStructureDeployer
+{
+   public DirectoryStructure()
+   {
+      setRelativeOrder(Integer.MAX_VALUE);
+   }
+
+   public boolean determineStructure(StructureContext context) throws DeploymentException
+   {
+      try
+      {
+         // jar structure should already handle top level dirs
+         if (context.isTopLevel() == false)
+         {
+            VirtualFile file = context.getFile();
+            // only simple directories, non-leaves with META-INF are handled by jar structure
+            if (isLeaf(file) == false)
+            {
+               addAllChildren(context);
+               return true;
+            }
+         }
+         return false;
+      }
+      catch (Exception e)
+      {
+         throw DeploymentException.rethrowAsDeploymentException("Error determining structure.", e);
+      }
+   }
+}

Modified: projects/demos/microcontainer/trunk/jmx/src/main/resources/META-INF/system-jmx-beans.xml
===================================================================
--- projects/demos/microcontainer/trunk/jmx/src/main/resources/META-INF/system-jmx-beans.xml	2008-09-19 07:28:16 UTC (rev 78700)
+++ projects/demos/microcontainer/trunk/jmx/src/main/resources/META-INF/system-jmx-beans.xml	2008-09-19 10:14:22 UTC (rev 78701)
@@ -17,4 +17,7 @@
   </bean>
   <bean name="HackClassLoaderMetaDataDeployer" class="org.jboss.system.deployers.HackClassloaderMetaDataDeployer"/>  
 
+  <!-- Legacy sar behavior -->
+  <!--<bean name="DirectoryStructure" class="org.jboss.demos.deployers.legacy.DirectoryStructure"/>-->
+
 </deployment>




More information about the jboss-cvs-commits mailing list