[jboss-cvs] JBossAS SVN: r109818 - in projects/jboss-jca/trunk: adapters and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Dec 10 06:07:54 EST 2010
Author: maeste
Date: 2010-12-10 06:07:54 -0500 (Fri, 10 Dec 2010)
New Revision: 109818
Added:
projects/jboss-jca/trunk/.classpath
projects/jboss-jca/trunk/.project
projects/jboss-jca/trunk/adapters/.classpath
projects/jboss-jca/trunk/adapters/.project
projects/jboss-jca/trunk/adapters/junitvmwatcher5441745195052676038.properties
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/AbstractDeployerTest.java
projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/
projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/
projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ContainerConfiguration
projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeployableContainer
projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher
Log:
adding missing file
Added: projects/jboss-jca/trunk/.classpath
===================================================================
--- projects/jboss-jca/trunk/.classpath (rev 0)
+++ projects/jboss-jca/trunk/.classpath 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="standalone/eclipse-target/classes"/>
+</classpath>
Added: projects/jboss-jca/trunk/.project
===================================================================
--- projects/jboss-jca/trunk/.project (rev 0)
+++ projects/jboss-jca/trunk/.project 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ironjacamar-parent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-jca/trunk/adapters/.classpath
===================================================================
--- projects/jboss-jca/trunk/adapters/.classpath (rev 0)
+++ projects/jboss-jca/trunk/adapters/.classpath 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/common/jboss-logging.jar"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/common/jboss-common-core.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ironjacamar-api"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ironjacamar-common"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/sjc/fungal.jar"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/common/jboss-transaction-api.jar"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/common/jboss-integration.jar"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/common/jbossjts-integration.jar"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/common/jbossjts.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ironjacamar-core"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/test/h2.jar"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/test/junit.jar"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/test/mockito-all.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ironjacamar-embedded"/>
+ <classpathentry kind="lib" path="/ironjacamar-parent/lib/embedded/shrinkwrap-api.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: projects/jboss-jca/trunk/adapters/.project
===================================================================
--- projects/jboss-jca/trunk/adapters/.project (rev 0)
+++ projects/jboss-jca/trunk/adapters/.project 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ironjacamar-adapters</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-jca/trunk/adapters/junitvmwatcher5441745195052676038.properties
===================================================================
--- projects/jboss-jca/trunk/adapters/junitvmwatcher5441745195052676038.properties (rev 0)
+++ projects/jboss-jca/trunk/adapters/junitvmwatcher5441745195052676038.properties 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1 @@
+testConnection
Added: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/AbstractDeployerTest.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/AbstractDeployerTest.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/AbstractDeployerTest.java 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1,126 @@
+/*
+ * 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.jca.test.deployers.spec;
+
+import org.jboss.jca.test.deployers.spec.rars.TestConnection;
+import org.jboss.jca.test.deployers.spec.rars.TestConnectionInterface;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.UUID;
+
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+
+public abstract class AbstractDeployerTest
+{
+
+ /**
+ * Build a shrinkwrap rar adding all necessary classes
+ *
+ * @param archiveName the archhive name
+ * @param packageName the package name
+ * @return the shrinkwrapped rar
+ * @throws Exception in case of error creating the archive
+ */
+ protected static ResourceAdapterArchive buidShrinkwrapRa(String archiveName, String packageName) throws Exception
+ {
+ ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, archiveName);
+
+ JavaArchive ja = ShrinkWrap.create(JavaArchive.class, UUID.randomUUID().toString() + ".jar");
+ ja.addClasses(TestConnection.class, TestConnectionInterface.class);
+ ja.addClasses(getClasses(packageName));
+
+ raa.addLibrary(ja);
+ return raa;
+ }
+
+ /**
+ * Scans all classes accessible from the context class loader which belong to the given package and subpackages.
+ *
+ * @param packageName The base package
+ * @return The classes
+ * @throws ClassNotFoundException
+ * @throws IOException
+ */
+ private static Class[] getClasses(String packageName) throws ClassNotFoundException, IOException
+ {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ assert classLoader != null;
+ String path = packageName.replace('.', '/');
+ Enumeration<URL> resources = classLoader.getResources(path);
+ List<File> dirs = new ArrayList<File>();
+ while (resources.hasMoreElements())
+ {
+ URL resource = resources.nextElement();
+ dirs.add(new File(resource.getFile()));
+ }
+ ArrayList<Class> classes = new ArrayList<Class>();
+ for (File directory : dirs)
+ {
+ classes.addAll(findClasses(directory, packageName));
+ }
+ return classes.toArray(new Class[classes.size()]);
+ }
+
+ /**
+ * Recursive method used to find all classes in a given directory and subdirs.
+ *
+ * @param directory The base directory
+ * @param packageName The package name for classes found inside the base directory
+ * @return The classes
+ * @throws ClassNotFoundException
+ */
+ private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException
+ {
+ List<Class> classes = new ArrayList<Class>();
+ if (!directory.exists())
+ {
+ return classes;
+ }
+ File[] files = directory.listFiles();
+ for (File file : files)
+ {
+ if (file.isDirectory())
+ {
+ assert !file.getName().contains(".");
+ classes.addAll(findClasses(file, packageName + "." + file.getName()));
+ }
+ else if (file.getName().endsWith(".class"))
+ {
+ classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));
+ }
+ }
+ return classes;
+ }
+
+ public AbstractDeployerTest()
+ {
+ super();
+ }
+
+}
\ No newline at end of file
Added: projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ContainerConfiguration
===================================================================
--- projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ContainerConfiguration (rev 0)
+++ projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ContainerConfiguration 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1 @@
+org.jboss.jca.embedded.arquillian.EmbeddedJCAContainerConfiguration
Added: projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeployableContainer
===================================================================
--- projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeployableContainer (rev 0)
+++ projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeployableContainer 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1 @@
+org.jboss.jca.embedded.arquillian.EmbeddedJCAContainer
\ No newline at end of file
Added: projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher
===================================================================
--- projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher (rev 0)
+++ projects/jboss-jca/trunk/embedded/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher 2010-12-10 11:07:54 UTC (rev 109818)
@@ -0,0 +1 @@
+org.jboss.jca.embedded.arquillian.EmbeddedJCATestEnricher
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list