[jboss-cvs] JBossAS SVN: r71615 - in projects/ejb3/tags: jboss-ejb3-interceptors-0.12.0 and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 2 09:56:09 EDT 2008


Author: wolfc
Date: 2008-04-02 09:56:08 -0400 (Wed, 02 Apr 2008)
New Revision: 71615

Added:
   projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/
   projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/pom.xml
   projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java
Removed:
   projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/pom.xml
   projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java
Log:
[maven-release-plugin]  copy for tag jboss-ejb3-interceptors-0.12.0

Copied: projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0 (from rev 71581, projects/ejb3/trunk/interceptors)

Deleted: projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/pom.xml
===================================================================
--- projects/ejb3/trunk/interceptors/pom.xml	2008-04-02 05:47:13 UTC (rev 71581)
+++ projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/pom.xml	2008-04-02 13:56:08 UTC (rev 71615)
@@ -1,83 +0,0 @@
-<!-- 
-  vi:ts=2:sw=2:expandtab 
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.ejb3</groupId>
-    <artifactId>jboss-ejb3-build</artifactId>
-    <version>0.13.0-SNAPSHOT</version>
-    <relativePath>../build/pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jboss-ejb3-interceptors</artifactId>
-  <version>0.12.0-SNAPSHOT</version>
-  <packaging>jar</packaging>
-  <name>JBoss EJB 3.0 Interceptors</name>
-  <url>http://www.jboss.org</url>
-  <description>
-    The JBoss EJB 3 Interceptors component implements all functionality
-    specified in Chapter 12 (Interceptors) of the EJB 3 specification.
-  </description>
-  
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <!-- Because we fiddle with the class loader in BasicTestSuite.
-               Note that the other tests also change context class loader, but this is
-               to make surefire work at all. -->
-          <forkMode>pertest</forkMode>
-          <!--
-          <argLine>-enableassertions</argLine>
-          -->
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <dependencies>
-    <!-- Internal -->
-    <dependency>
-      <groupId>org.jboss.ejb3</groupId>
-      <artifactId>jboss-ejb3-metadata</artifactId>
-    </dependency>
-
-    <!-- External -->
-    <dependency>
-      <groupId>jboss</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>jboss</groupId>
-      <artifactId>jboss-common-logging-log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-metadata</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.aop</groupId>
-      <artifactId>jboss-aop</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.javaee</groupId>
-      <artifactId>jboss-ejb-api</artifactId>
-    </dependency>
-    
-    <!-- broken transitive dependencies of AOP -->
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-container</artifactId>
-      <version>2.0.0.Beta8</version> <!-- FIXME: move to build -->
-    </dependency>
-  </dependencies>
-</project>

Copied: projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/pom.xml (from rev 71614, projects/ejb3/trunk/interceptors/pom.xml)
===================================================================
--- projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/pom.xml	                        (rev 0)
+++ projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/pom.xml	2008-04-02 13:56:08 UTC (rev 71615)
@@ -0,0 +1,89 @@
+<!-- 
+  vi:ts=2:sw=2:expandtab 
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.ejb3</groupId>
+    <artifactId>jboss-ejb3-build</artifactId>
+    <version>0.13.0</version>
+    <relativePath>../build/pom.xml</relativePath>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-ejb3-interceptors</artifactId>
+  <version>0.12.0</version>
+  <packaging>jar</packaging>
+  <name>JBoss EJB 3.0 Interceptors</name>
+  <url>http://www.jboss.org</url>
+  <description>
+    The JBoss EJB 3 Interceptors component implements all functionality
+    specified in Chapter 12 (Interceptors) of the EJB 3 specification.
+  </description>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <!-- Because we fiddle with the class loader in BasicTestSuite.
+               Note that the other tests also change context class loader, but this is
+               to make surefire work at all. -->
+          <forkMode>pertest</forkMode>
+          <!--
+          <argLine>-enableassertions</argLine>
+          -->
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <!-- Internal -->
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-metadata</artifactId>
+      <version>0.12.0</version>
+    </dependency>
+
+    <!-- External -->
+    <dependency>
+      <groupId>jboss</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>jboss</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-metadata</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.aop</groupId>
+      <artifactId>jboss-aop</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-ejb-api</artifactId>
+    </dependency>
+    
+    <!-- broken transitive dependencies of AOP -->
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-container</artifactId>
+      <version>2.0.0.Beta8</version> <!-- FIXME: move to build -->
+    </dependency>
+  </dependencies>
+
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0</developerConnection>
+    <url>http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0</url>
+  </scm>
+</project>

Deleted: projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java
===================================================================
--- projects/ejb3/trunk/interceptors/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java	2008-04-02 05:47:13 UTC (rev 71581)
+++ projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java	2008-04-02 13:56:08 UTC (rev 71615)
@@ -1,137 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, 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.ejb3.test.interceptors.basic.unit;
-
-import java.net.URL;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.AspectXmlLoader;
-import org.jboss.aop.Domain;
-import org.jboss.aop.DomainDefinition;
-import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
-import org.jboss.ejb3.interceptors.aop.DomainClassLoader;
-import org.jboss.ejb3.interceptors.lang.ScopedClassLoader;
-import org.jboss.logging.Logger;
-
-/**
- * Bootstrap the interceptor container.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class BasicTestSuite extends TestSuite
-{
-   private static final Logger log = Logger.getLogger(BasicTestSuite.class);
-   
-   private ClassLoader classLoader;
-   
-   public BasicTestSuite() throws Exception
-   {
-      // Neat trick to find the deployment URL
-      URL deploymentURL = getClass().getClassLoader().getResource(".");
-      log.info(deploymentURL);
-      ScopedClassLoader deploymentClassLoader = new ScopedClassLoader(new URL[] { deploymentURL });
-      
-      // Bootstrap AOP
-      URL url = Thread.currentThread().getContextClassLoader().getResource("basic/jboss-aop.xml");
-      log.info("deploying AOP from " + url);
-      AspectXmlLoader.deployXML(url);
-
-      // Bootstrap the basic container
-      String containerName = "InterceptorContainer";
-      
-      DomainDefinition domainDefinition = AspectManager.instance().getContainer(containerName);
-      if(domainDefinition == null)
-         throw new IllegalArgumentException("Domain definition for container '" + containerName + "' can not be found");
-      
-      final Domain domain = (Domain) domainDefinition.getManager();
-      
-      this.classLoader = new DomainClassLoader(Thread.currentThread().getContextClassLoader(), deploymentClassLoader, domain);
-      Thread.currentThread().setContextClassLoader(classLoader);
-      
-      // The moment an instrumented class comes up it does AspectManager.instance(classLoader), which
-      // should return the classLoader created above. So we tie in a class loader scoping policy.
-      // Note that this won't work in AS.
-      AOPClassLoaderScopingPolicy classLoaderScopingPolicy = new AOPClassLoaderScopingPolicy() {
-         public Domain getDomain(ClassLoader classLoader, AspectManager parent)
-         {
-            //log.debug("getDomain");
-            if(classLoader instanceof DomainClassLoader)
-               return ((DomainClassLoader) classLoader).getDomain();
-            return null;
-         }
-
-         public Domain getTopLevelDomain(AspectManager parent)
-         {
-            throw new RuntimeException("NYI");
-         }
-
-         public boolean isScoped(ClassLoader classLoader)
-         {
-            throw new RuntimeException("NYI");
-         }
-      };
-      AspectManager.setClassLoaderScopingPolicy(classLoaderScopingPolicy);
-      
-      // We're done
-   }
-   
-   public static Test suite() throws Exception
-   {
-      BasicTestSuite suite = new BasicTestSuite();
-      suite.addTestSuite("org.jboss.ejb3.test.interceptors.basic.unit.BasicTestRunner");
-      return suite;
-   }
-   
-   @Override
-   @SuppressWarnings("unchecked")
-   public void addTestSuite(Class testClass)
-   {
-      // trick or treat
-      try
-      {
-         addTestSuite(testClass.getName());
-      }
-      catch(final ClassNotFoundException e)
-      {
-         Test test = new TestCase("error") {
-            @Override
-            protected void runTest() throws Throwable
-            {
-               fail("Failed to load class" + e.getMessage());
-            }
-         };
-         super.addTest(test);
-      }
-   }
-
-   @SuppressWarnings("unchecked")
-   public void addTestSuite(String testClassName) throws ClassNotFoundException
-   {
-      // trick or treat
-      super.addTestSuite((Class<? extends TestCase>) classLoader.loadClass(testClassName));
-   }
-}

Copied: projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java (from rev 71587, projects/ejb3/trunk/interceptors/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java)
===================================================================
--- projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java	                        (rev 0)
+++ projects/ejb3/tags/jboss-ejb3-interceptors-0.12.0/src/test/java/org/jboss/ejb3/test/interceptors/basic/unit/BasicTestSuite.java	2008-04-02 13:56:08 UTC (rev 71615)
@@ -0,0 +1,141 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, 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.ejb3.test.interceptors.basic.unit;
+
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.AspectXmlLoader;
+import org.jboss.aop.Domain;
+import org.jboss.aop.DomainDefinition;
+import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
+import org.jboss.ejb3.interceptors.aop.DomainClassLoader;
+import org.jboss.ejb3.interceptors.lang.ScopedClassLoader;
+import org.jboss.logging.Logger;
+
+/**
+ * Bootstrap the interceptor container.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision$
+ */
+public class BasicTestSuite extends TestSuite
+{
+   private static final Logger log = Logger.getLogger(BasicTestSuite.class);
+   
+   private ClassLoader classLoader;
+   
+   public BasicTestSuite() throws Exception
+   {
+      // Neat trick to find the deployment URL
+      // We can't use '.' as resource, because on some machines the classpath order is different,
+      // so we might get target/classes instead of target/test-classes.
+      String resourceName = "log4j.xml";
+      String spec = getClass().getClassLoader().getResource(resourceName).toString();
+      URL deploymentURL = new URL(spec.substring(0, spec.length() - resourceName.length()));
+      log.info(deploymentURL);
+      ScopedClassLoader deploymentClassLoader = new ScopedClassLoader(new URL[] { deploymentURL });
+
+      // Bootstrap AOP
+      URL url = Thread.currentThread().getContextClassLoader().getResource("basic/jboss-aop.xml");
+      log.info("deploying AOP from " + url);
+      AspectXmlLoader.deployXML(url);
+
+      // Bootstrap the basic container
+      String containerName = "InterceptorContainer";
+      
+      DomainDefinition domainDefinition = AspectManager.instance().getContainer(containerName);
+      if(domainDefinition == null)
+         throw new IllegalArgumentException("Domain definition for container '" + containerName + "' can not be found");
+      
+      final Domain domain = (Domain) domainDefinition.getManager();
+      
+      this.classLoader = new DomainClassLoader(Thread.currentThread().getContextClassLoader(), deploymentClassLoader, domain);
+      Thread.currentThread().setContextClassLoader(classLoader);
+      
+      // The moment an instrumented class comes up it does AspectManager.instance(classLoader), which
+      // should return the classLoader created above. So we tie in a class loader scoping policy.
+      // Note that this won't work in AS.
+      AOPClassLoaderScopingPolicy classLoaderScopingPolicy = new AOPClassLoaderScopingPolicy() {
+         public Domain getDomain(ClassLoader classLoader, AspectManager parent)
+         {
+            //log.debug("getDomain");
+            if(classLoader instanceof DomainClassLoader)
+               return ((DomainClassLoader) classLoader).getDomain();
+            return null;
+         }
+
+         public Domain getTopLevelDomain(AspectManager parent)
+         {
+            throw new RuntimeException("NYI");
+         }
+
+         public boolean isScoped(ClassLoader classLoader)
+         {
+            throw new RuntimeException("NYI");
+         }
+      };
+      AspectManager.setClassLoaderScopingPolicy(classLoaderScopingPolicy);
+      
+      // We're done
+   }
+   
+   public static Test suite() throws Exception
+   {
+      BasicTestSuite suite = new BasicTestSuite();
+      suite.addTestSuite("org.jboss.ejb3.test.interceptors.basic.unit.BasicTestRunner");
+      return suite;
+   }
+   
+   @Override
+   @SuppressWarnings("unchecked")
+   public void addTestSuite(Class testClass)
+   {
+      // trick or treat
+      try
+      {
+         addTestSuite(testClass.getName());
+      }
+      catch(final ClassNotFoundException e)
+      {
+         Test test = new TestCase("error") {
+            @Override
+            protected void runTest() throws Throwable
+            {
+               fail("Failed to load class" + e.getMessage());
+            }
+         };
+         super.addTest(test);
+      }
+   }
+
+   @SuppressWarnings("unchecked")
+   public void addTestSuite(String testClassName) throws ClassNotFoundException
+   {
+      // trick or treat
+      super.addTestSuite((Class<? extends TestCase>) classLoader.loadClass(testClassName));
+   }
+}




More information about the jboss-cvs-commits mailing list