tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject svn commit: r1184809 - in /openejb/trunk/arquillian-tomee/arquillian-tomee-remote: ./ src/main/java/org/apache/openejb/arquillian/remote/ src/main/resources/META-INF/services/ src/test/java/org/apache/openejb/arquillian/ src/test/resources/
Date Sun, 16 Oct 2011 12:22:13 GMT
Author: jgallimore
Date: Sun Oct 16 12:22:13 2011
New Revision: 1184809

URL: http://svn.apache.org/viewvc?rev=1184809&view=rev
Log:
Copied updates over from embedded adapter

Added:
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEEnricher.java
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEExtension.java
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher
Removed:
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.spi.client.container.DeployableContainer
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.spi.client.deployment.AuxiliaryArchiveAppender
Modified:
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/pom.xml
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
    openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/resources/arquillian.xml

Modified: openejb/trunk/arquillian-tomee/arquillian-tomee-remote/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-remote/pom.xml?rev=1184809&r1=1184808&r2=1184809&view=diff
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-remote/pom.xml (original)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-remote/pom.xml Sun Oct 16 12:22:13 2011
@@ -258,10 +258,10 @@
           <artifactId>quartz</artifactId>
           <groupId>org.quartz-scheduler</groupId>
         </exclusion>
-        <exclusion>
+        <!-- <exclusion>
           <artifactId>openwebbeans-impl</artifactId>
           <groupId>org.apache.openwebbeans</groupId>
-        </exclusion>
+        </exclusion>-->
         <exclusion>
           <artifactId>openwebbeans-ee-common</artifactId>
           <groupId>org.apache.openwebbeans</groupId>

Added: openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEEnricher.java
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEEnricher.java?rev=1184809&view=auto
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEEnricher.java
(added)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEEnricher.java
Sun Oct 16 12:22:13 2011
@@ -0,0 +1,47 @@
+package org.apache.openejb.arquillian.remote;
+
+import org.apache.openejb.cdi.ThreadSingletonServiceImpl;
+import org.jboss.arquillian.test.spi.TestEnricher;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTarget;
+import java.lang.reflect.Method;
+
+public class RemoteTomEEEnricher implements TestEnricher {
+    @Override public void enrich(Object testCase) {
+//        BeanManager mgr = getBeanManager();
+//        if (mgr != null) {
+//            AnnotatedType<?> type =  mgr.createAnnotatedType(getClass());
+//            InjectionTarget<Object> injectionTarget = (InjectionTarget<Object>)
mgr.createInjectionTarget(type);
+//            CreationalContext<Object> context = mgr.createCreationalContext(null);
+//
+//            injectionTarget.inject(testCase, context);
+//            injectionTarget.postConstruct(this);
+//        } else {
+//            throw new NullPointerException("bean manager is null");
+//        }
+
+        /* TODO: see if this code could be called after tests
+                *
+                * if (injectionTarget != null) {
+                *        injectionTarget.preDestroy(this);
+                *    }
+                *   if (context != null) {
+                *        context.release();
+                *    }
+                *
+                *   injectionTarget = null;
+                *   context = null;
+                */
+    }
+
+    @Override public Object[] resolve(Method method) {
+        return new Object[method.getParameterTypes().length];
+    }
+
+    public BeanManager getBeanManager() {
+        return ThreadSingletonServiceImpl.get().getBeanManagerImpl();
+    }
+}

Added: openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEExtension.java
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEExtension.java?rev=1184809&view=auto
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEExtension.java
(added)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEExtension.java
Sun Oct 16 12:22:13 2011
@@ -0,0 +1,12 @@
+package org.apache.openejb.arquillian.remote;
+
+import org.jboss.arquillian.container.spi.client.container.DeployableContainer;
+import org.jboss.arquillian.core.spi.LoadableExtension;
+import org.jboss.arquillian.test.spi.TestEnricher;
+
+public class RemoteTomEEExtension implements LoadableExtension {
+    @Override public void register(ExtensionBuilder builder) {
+        builder.service(DeployableContainer.class, RemoteTomEEContainer.class)
+            .service(TestEnricher.class, RemoteTomEEEnricher.class);
+    }
+}

Added: openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension?rev=1184809&view=auto
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
(added)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
Sun Oct 16 12:22:13 2011
@@ -0,0 +1 @@
+org.apache.openejb.arquillian.remote.RemoteTomEEExtension

Added: openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher?rev=1184809&view=auto
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher
(added)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.spi.TestEnricher
Sun Oct 16 12:22:13 2011
@@ -0,0 +1 @@
+org.apache.openejb.arquillian.remote.RemoteTomEEEnricher

Modified: openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java?rev=1184809&r1=1184808&r2=1184809&view=diff
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
(original)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
Sun Oct 16 12:22:13 2011
@@ -22,7 +22,7 @@ import java.net.URL;
 
 import junit.framework.Assert;
 
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.asset.StringAsset;
@@ -32,7 +32,7 @@ import org.jboss.shrinkwrap.descriptor.a
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-//@RunWith(Arquillian.class)
+@RunWith(Arquillian.class)
 public class TomEEContainerTest {
 
     @Deployment(testable = false)

Modified: openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/resources/arquillian.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/resources/arquillian.xml?rev=1184809&r1=1184808&r2=1184809&view=diff
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/resources/arquillian.xml
(original)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-remote/src/test/resources/arquillian.xml
Sun Oct 16 12:22:13 2011
@@ -26,7 +26,7 @@
                <property name="httpPort">9080</property>
                <property name="stopPort">9005</property>
                <property name="tomcatVersion"></property>
-               <property name="openejbVersion">1.0.0-beta-1</property>
+               <property name="openejbVersion">1.0.0-beta-2-SNAPSHOT</property>
            </configuration>
        </container>
 </arquillian>
\ No newline at end of file



Mime
View raw message