[jboss-cvs] JBossAS SVN: r70245 - in projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3: deployers and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 29 00:33:21 EST 2008


Author: scott.stark at jboss.org
Date: 2008-02-29 00:33:21 -0500 (Fri, 29 Feb 2008)
New Revision: 70245

Removed:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/clientmodule/
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
Log:
Remove the clientmodule code and jboss5 deployment unit implementation

Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java	2008-02-29 05:10:45 UTC (rev 70244)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java	2008-02-29 05:33:21 UTC (rev 70245)
@@ -1,100 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, Red Hat Middleware LLC., 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.ejb3.deployers;
-
-import java.util.Collection;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.ejb3.DeploymentScope;
-import org.jboss.ejb3.Ejb3Deployment;
-
-/**
- * Abstraction for an EAR/WAR or anything that scopes EJB deployments
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision: 55144 $
- */
-public class JBoss5DeploymentScope implements DeploymentScope
-{
-   private ConcurrentHashMap<String, Ejb3Deployment> deployments;
-   private String shortName;
-   private String baseName;
-
-   public JBoss5DeploymentScope(VFSDeploymentUnit parent)
-   {
-      this.shortName = parent.getSimpleName();
-      this.baseName = shortName;
-      
-      int idx = shortName.lastIndexOf('.');
-      if( idx > 0 )
-         baseName = shortName.substring(0, idx);
-      
-      deployments = (ConcurrentHashMap<String, Ejb3Deployment>)parent.getAttachment("EJB_DEPLOYMENTS");
-      if (deployments == null)
-      {
-         deployments = new ConcurrentHashMap<String, Ejb3Deployment>();
-         parent.addAttachment("EJB_DEPLOYMENTS", deployments);
-      }
-   }
-
-   public Collection<Ejb3Deployment> getEjbDeployments()
-   {
-      return deployments.values();
-   }
-
-   public void register(Ejb3Deployment deployment)
-   {
-      deployments.put(deployment.getDeploymentUnit().getShortName(), deployment);
-   }
-
-   public void unregister(Ejb3Deployment deployment)
-   {
-      deployments.remove(deployment.getDeploymentUnit().getShortName());
-   }
-
-   public Ejb3Deployment findRelativeDeployment(String relativeName)
-   {
-      if (relativeName.startsWith("../"))
-      {
-         relativeName = relativeName.substring(3);
-      }
-      return deployments.get(relativeName);
-   }
-
-   public String getName()
-   {
-      return shortName;
-   }
-   
-   public String getShortName()
-   {
-      return shortName;
-   }
-
-   public String getBaseName()
-   {
-      return baseName;
-   }
-
-}

Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java	2008-02-29 05:10:45 UTC (rev 70244)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java	2008-02-29 05:33:21 UTC (rev 70245)
@@ -1,210 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, Red Hat Middleware LLC., 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.ejb3.deployers;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
-import org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 43304 $
- */
-public class JBoss5DeploymentUnit implements org.jboss.ejb3.DeploymentUnit
-{
-   private VFSDeploymentUnit unit;
-   private ClassLoader classLoader;
-   private InterceptorInfoRepository interceptorInfoRepository;
-   private Map defaultPersistenceProperties;
-
-   public JBoss5DeploymentUnit(VFSDeploymentUnit unit)
-   {
-      this(unit, unit.getClassLoader());
-   }
-   
-   public JBoss5DeploymentUnit(VFSDeploymentUnit unit, ClassLoader classLoader)
-   {
-      assert unit != null : "unit is null";
-      assert classLoader != null : "classLoader is null";
-      
-      this.unit = unit;
-      this.classLoader = classLoader;
-      this.interceptorInfoRepository = new InterceptorInfoRepository(classLoader);
-   }
-
-   public VirtualFile getRootFile()
-   {
-      return unit.getFile("");
-   }
-   
-   public URL getRelativeURL(String jar)
-   {
-      try
-      {
-         return new URL(jar);
-      }
-      catch (MalformedURLException e)
-      {
-         try
-         {
-            if (getUrl() == null)
-               throw new RuntimeException("relative <jar-file> not allowed when standalone deployment unit is used");
-            return new URL(getUrl(), jar);
-         }
-         catch (Exception e1)
-         {
-            throw new RuntimeException("could not find relative path: " + jar, e1);
-         }
-      }
-   }
-
-   URL extractDescriptorUrl(String resource)
-   {
-      try
-      {
-         VirtualFile vf = unit.getMetaDataFile(resource);
-         if (vf == null) return null;
-         return vf.toURL();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public URL getPersistenceXml()
-   {
-      return extractDescriptorUrl("persistence.xml");
-   }
-
-   public URL getEjbJarXml()
-   {
-      return extractDescriptorUrl("ejb-jar.xml");
-   }
-
-   public URL getJbossXml()
-   {
-      return extractDescriptorUrl("jboss.xml");
-   }
-
-   public VirtualFile getMetaDataFile(String name)
-   {
-      return unit.getMetaDataFile(name);
-   }
-   
-   public List<Class> getClasses()
-   {
-      return null;
-   }
-
-   public ClassLoader getClassLoader()
-   {
-      return classLoader;
-   }
-
-   public ClassLoader getResourceLoader()
-   {
-      return getClassLoader();
-   }
-
-   public String getShortName()
-   {
-      return unit.getFile("").getName();
-   }
-
-   public URL getUrl()
-   {
-      try
-      {
-         return unit.getFile("").toURL();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public String getDefaultEntityManagerName()
-   {
-      String url = getUrl().toString();
-      String name = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.'));
-      return name;
-   }
-
-   public Map getDefaultPersistenceProperties()
-   {
-      return defaultPersistenceProperties;
-   }
-
-   public void setDefaultPersistenceProperties(Map defaultPersistenceProperties)
-   {
-      this.defaultPersistenceProperties = defaultPersistenceProperties;
-   }
-
-   public Hashtable getJndiProperties()
-   {
-      return null;
-   }
-
-   public InterceptorInfoRepository getInterceptorInfoRepository()
-   {
-      return interceptorInfoRepository;
-   }
-
-   public List<VirtualFile> getResources(VirtualFileFilter filter)
-   {
-      VisitorAttributes va = new VisitorAttributes();
-      va.setLeavesOnly(true);
-      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
-      va.setRecurseFilter(noJars);
-      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
-
-      try
-      {
-         VirtualFile root = getRootFile();
-         if( root.isLeaf() == false )
-            root.visit(visitor);
-      }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
-      
-      List<VirtualFile> resources = visitor.getMatched();
-      
-      return resources;
-   }
-}




More information about the jboss-cvs-commits mailing list