You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2012/02/13 03:23:55 UTC
svn commit: r1243396 [2/2] - in /openejb/trunk/openejb/arquillian-tomee:
arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/
arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/
arquillian-tomee-remote...
Added: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappObserver.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappObserver.java?rev=1243396&view=auto
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappObserver.java (added)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappObserver.java Mon Feb 13 02:23:54 2012
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tomee.arquillian.webapp;
+
+import org.apache.openejb.cdi.ThreadSingletonServiceImpl;
+import org.jboss.arquillian.core.api.InstanceProducer;
+import org.jboss.arquillian.core.api.annotation.Inject;
+import org.jboss.arquillian.core.api.annotation.Observes;
+import org.jboss.arquillian.test.spi.annotation.SuiteScoped;
+import org.jboss.arquillian.test.spi.event.suite.BeforeSuite;
+
+import javax.enterprise.inject.spi.BeanManager;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class TomEEWebappObserver {
+ @Inject
+ @SuiteScoped
+ private InstanceProducer<BeanManager> beanManager;
+ @Inject
+ @SuiteScoped
+ private InstanceProducer<Context> context;
+
+ public void beforeSuite(@Observes BeforeSuite event) {
+ beanManager.set(ThreadSingletonServiceImpl.get().getBeanManagerImpl());
+ try {
+ context.set(new InitialContext());
+ } catch (NamingException e) {
+ // no-op
+ }
+ }
+}
Added: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappRemoteExtension.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappRemoteExtension.java?rev=1243396&view=auto
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappRemoteExtension.java (added)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappRemoteExtension.java Mon Feb 13 02:23:54 2012
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tomee.arquillian.webapp;
+
+import org.jboss.arquillian.container.test.spi.RemoteLoadableExtension;
+
+public class TomEEWebappRemoteExtension implements RemoteLoadableExtension {
+
+ @Override
+ public void register(ExtensionBuilder builder) {
+ builder.observer(TomEEWebappObserver.class);
+ }
+}
Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension?rev=1243396&r1=1243395&r2=1243396&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension (original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension Mon Feb 13 02:23:54 2012
@@ -1 +1 @@
-org.apache.tomee.arquillian.webapp.RemoteTomEEExtension
+org.apache.tomee.arquillian.webapp.TomEEWebappExtension
Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/resources/arquillian.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/resources/arquillian.xml?rev=1243396&r1=1243395&r2=1243396&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/resources/arquillian.xml (original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/resources/arquillian.xml Mon Feb 13 02:23:54 2012
@@ -22,11 +22,10 @@
<container qualifier="tomee" default="true">
<configuration>
- <property name="dir">/tmp/arquillian-apache-tomee</property>
<property name="httpPort">10080</property>
<property name="stopPort">10005</property>
- <property name="tomcatVersion"></property>
- <property name="openejbVersion">1.0.0-beta-3-SNAPSHOT</property>
+ <property name="tomcatVersion">7.0.21</property>
+ <property name="version">4.0.0-beta-3-SNAPSHOT</property>
</configuration>
</container>
</arquillian>