recreating tag for openejb-4.0.0-beta-2
git-svn-id: https://svn.apache.org/repos/asf/openejb/tags/openejb-4.0.0-beta-2@1231833 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/arquillian-tomee/arquillian-tomee-remote/pom.xml b/arquillian-tomee/arquillian-tomee-remote/pom.xml
deleted file mode 100644
index c57bde2..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/pom.xml
+++ /dev/null
@@ -1,406 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- 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.
--->
-<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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>arquillian-tomee</artifactId>
- <groupId>org.apache.openejb</groupId>
- <version>1.0.0-beta-2</version>
- </parent>
- <groupId>org.apache.openejb</groupId>
- <artifactId>arquillian-tomee-remote</artifactId>
- <version>1.0.0-beta-2</version>
- <packaging>jar</packaging>
-
- <name>OpenEJB :: TomEE Arquillian Adaptor :: Remote</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-container-spi</artifactId>
- <version>${version.arquillian}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.arquillian.protocol</groupId>
- <artifactId>arquillian-protocol-servlet</artifactId>
- <version>${version.arquillian}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.arquillian.testenricher</groupId>
- <artifactId>arquillian-testenricher-cdi</artifactId>
- <version>${version.arquillian}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.arquillian.testenricher</groupId>
- <artifactId>arquillian-testenricher-resource</artifactId>
- <version>${version.arquillian}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.arquillian.testenricher</groupId>
- <artifactId>arquillian-testenricher-ejb</artifactId>
- <version>${version.arquillian}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-catalina</artifactId>
- <version>${version.org.apache.tomcat}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-coyote</artifactId>
- <version>${version.org.apache.tomcat}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jasper</artifactId>
- <version>${version.org.apache.tomcat}</version>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.jdt.core.compiler</groupId>
- <artifactId>ecj</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.arquillian.junit</groupId>
- <artifactId>arquillian-junit-container</artifactId>
- <version>${version.arquillian}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>apache-tomee</artifactId>
- <type>zip</type>
- <version>1.0.0-beta-2</version>
- <classifier>webprofile</classifier>
- </dependency>
-
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <version>${version.cdi-api}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.jdt.core.compiler</groupId>
- <artifactId>ecj</artifactId>
- <version>3.5.1</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.6.4</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-j2ee-deployment_1.1_spec</artifactId>
- <version>1.1</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>openejb-client</artifactId>
- <version>4.0.0-beta-2</version>
- <type>jar</type>
- </dependency>
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>openejb-core</artifactId>
- <version>4.0.0-beta-2</version>
- <type>jar</type>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <artifactId>mbean-annotation-api</artifactId>
- <groupId>org.apache.openejb</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>commons-lang</artifactId>
- <groupId>commons-lang</groupId>
- </exclusion>
- <exclusion>
- <artifactId>javaee-api-embedded</artifactId>
- <groupId>org.apache.openejb</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openejb-api</artifactId>
- <groupId>org.apache.openejb</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openejb-javaagent</artifactId>
- <groupId>org.apache.openejb</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openejb-jee</artifactId>
- <groupId>org.apache.openejb</groupId>
- </exclusion>
- <exclusion>
- <artifactId>commons-cli</artifactId>
- <groupId>commons-cli</groupId>
- </exclusion>
- <exclusion>
- <artifactId>activemq-ra</artifactId>
- <groupId>org.apache.activemq</groupId>
- </exclusion>
- <exclusion>
- <artifactId>activemq-core</artifactId>
- <groupId>org.apache.activemq</groupId>
- </exclusion>
- <exclusion>
- <artifactId>geronimo-connector</artifactId>
- <groupId>org.apache.geronimo.components</groupId>
- </exclusion>
- <exclusion>
- <artifactId>geronimo-transaction</artifactId>
- <groupId>org.apache.geronimo.components</groupId>
- </exclusion>
- <exclusion>
- <artifactId>howl</artifactId>
- <groupId>org.objectweb.howl</groupId>
- </exclusion>
- <exclusion>
- <artifactId>geronimo-javamail_1.4_mail</artifactId>
- <groupId>org.apache.geronimo.javamail</groupId>
- </exclusion>
- <exclusion>
- <artifactId>xbean-asm-shaded</artifactId>
- <groupId>org.apache.xbean</groupId>
- </exclusion>
- <exclusion>
- <artifactId>xbean-finder-shaded</artifactId>
- <groupId>org.apache.xbean</groupId>
- </exclusion>
- <exclusion>
- <artifactId>xbean-reflect</artifactId>
- <groupId>org.apache.xbean</groupId>
- </exclusion>
- <exclusion>
- <artifactId>xbean-naming</artifactId>
- <groupId>org.apache.xbean</groupId>
- </exclusion>
- <exclusion>
- <artifactId>xbean-bundleutils</artifactId>
- <groupId>org.apache.xbean</groupId>
- </exclusion>
- <exclusion>
- <artifactId>hsqldb</artifactId>
- <groupId>hsqldb</groupId>
- </exclusion>
- <exclusion>
- <artifactId>bval-core</artifactId>
- <groupId>org.apache.bval</groupId>
- </exclusion>
- <exclusion>
- <artifactId>bval-jsr303</artifactId>
- <groupId>org.apache.bval</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openjpa</artifactId>
- <groupId>org.apache.openjpa</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openwebbeans-web</artifactId>
- <groupId>org.apache.openwebbeans</groupId>
- </exclusion>
- <exclusion>
- <artifactId>commons-dbcp</artifactId>
- <groupId>commons-dbcp</groupId>
- </exclusion>
- <exclusion>
- <artifactId>commons-pool</artifactId>
- <groupId>commons-pool</groupId>
- </exclusion>
- <exclusion>
- <artifactId>swizzle-stream</artifactId>
- <groupId>org.codehaus.swizzle</groupId>
- </exclusion>
- <exclusion>
- <artifactId>wsdl4j</artifactId>
- <groupId>wsdl4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>quartz</artifactId>
- <groupId>org.quartz-scheduler</groupId>
- </exclusion>
- <!-- <exclusion>
- <artifactId>openwebbeans-impl</artifactId>
- <groupId>org.apache.openwebbeans</groupId>
- </exclusion>-->
- <exclusion>
- <artifactId>openwebbeans-ee-common</artifactId>
- <groupId>org.apache.openwebbeans</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-api</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openwebbeans-spi</artifactId>
- <groupId>org.apache.openwebbeans</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openwebbeans-ejb</artifactId>
- <groupId>org.apache.openwebbeans</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openwebbeans-ee</artifactId>
- <groupId>org.apache.openwebbeans</groupId>
- </exclusion>
- <exclusion>
- <artifactId>javaee-api</artifactId>
- <groupId>org.apache.openejb</groupId>
- </exclusion>
- <exclusion>
- <artifactId>openejb-bval</artifactId>
- <groupId>org.apache.openejb.patch</groupId>
- </exclusion>
- <exclusion>
- <artifactId>mbean-annotation-api</artifactId>
- <groupId>org.apache.openejb</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap.resolver</groupId>
- <artifactId>shrinkwrap-resolver-api-maven</artifactId>
- <version>${version.shrinkwrap.resolver}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap.resolver</groupId>
- <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
- <version>${version.shrinkwrap.resolver}</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>arquillian-tomee-common</artifactId>
- <version>1.0.0-beta-2</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>tomee-common</artifactId>
- <version>4.0.0-beta-2</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.swizzle</groupId>
- <artifactId>swizzle-stream</artifactId>
- <version>1.0.2</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap.descriptors</groupId>
- <artifactId>shrinkwrap-descriptors-impl</artifactId>
- <version>${version.shrinkwrap.descriptor}</version>
- </dependency>
-
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.7</version>
- <executions>
- <execution>
- <id>reserve-network-port</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>reserve-network-port</goal>
- </goals>
- <configuration>
- <portNames>
- <portName>tomee.http.port</portName>
- <portName>tomee.shutdown.port</portName>
- </portNames>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.1</version>
- <executions>
- <execution>
- <id>copy-test-libs</id>
- <phase>process-test-resources</phase>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- </artifactItem>
- </artifactItems>
- <outputDirectory>
- ${project.build.directory}/test-libs
- </outputDirectory>
- <stripVersion>true</stripVersion>
- </configuration>
- <goals>
- <goal>copy</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEContainer.java b/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEContainer.java
deleted file mode 100644
index 26cfea7..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEContainer.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/**
- * 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.openejb.arquillian.remote;
-
-import org.apache.openejb.arquillian.common.FileUtils;
-import org.apache.openejb.arquillian.common.MavenCache;
-import org.apache.openejb.arquillian.common.TomEEContainer;
-import org.apache.openejb.assembler.Deployer;
-import org.apache.openejb.config.RemoteServer;
-import org.apache.tomee.installer.Installer;
-import org.apache.tomee.installer.Paths;
-import org.jboss.arquillian.container.spi.client.container.DeploymentException;
-import org.jboss.arquillian.container.spi.client.container.LifecycleException;
-import org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData;
-import org.jboss.shrinkwrap.api.Archive;
-import org.sonatype.aether.artifact.Artifact;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.net.Socket;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.naming.NamingException;
-
-/*
- * TODO: delete old embedded adapter, move the tests and set those up
- */
-public class RemoteTomEEContainer extends TomEEContainer {
- private static File DOWNLOADED = null;
-
- private RemoteServer container;
- private boolean needsStart = false;
-
- public ProtocolMetaData deploy(Archive<?> archive) throws DeploymentException {
- ProtocolMetaData pmd = super.deploy(archive);
- try { // TODO: maybe querying tomee to know if a webapp is completely deployed (for tomcat)
- Thread.sleep(100); // maybe tomcat is still not started
- } catch (InterruptedException e) {
- // no-op
- }
- return pmd;
- }
-
- public void start() throws LifecycleException {
- if (System.getProperty("tomee.http.port") != null) {
- configuration.setHttpPort(Integer.parseInt(System.getProperty("tomee.http.port")));
- }
- if (System.getProperty("tomee.shutdown.port") != null) {
- configuration.setStopPort(Integer.parseInt(System.getProperty("tomee.shutdown.port")));
- }
-
- // see if TomEE is already running by checking the http port
- try {
- connect(configuration.getHttpPort());
- } catch (Exception e) {
- needsStart = true;
- }
-
- if (!needsStart) {
- return;
- }
-
- try {
- final File workingDirectory = new File(configuration.getDir());
- workingDirectory.mkdirs();
- if (workingDirectory.exists()) {
- FileUtils.deleteOnExit(workingDirectory);
- }
-
- File openejbHome;
- if (DOWNLOADED != null && DOWNLOADED.getAbsolutePath().startsWith(workingDirectory.getAbsolutePath())) {
- openejbHome = findOpenEJBHome(workingDirectory);
- } else if (configuration.getTomcatVersion() == null || configuration.getTomcatVersion().length() == 0) {
- downloadTomEE(workingDirectory);
- openejbHome = findOpenEJBHome(workingDirectory);
- } else {
- downloadTomcat(workingDirectory, configuration.getTomcatVersion());
- openejbHome = findOpenEJBHome(workingDirectory);
- File webappsOpenEJB = new File(openejbHome, "webapps/openejb");
- webappsOpenEJB.mkdirs();
- downloadOpenEJBWebapp(webappsOpenEJB);
-
- System.setProperty("catalina.home", openejbHome.getAbsolutePath());
- System.setProperty("catalina.base", openejbHome.getAbsolutePath());
- System.setProperty("openejb.deploymentId.format", "{appId}/{ejbJarId}/{ejbName}");
- Paths paths = new Paths(new File(openejbHome.getAbsolutePath(), "/webapps/openejb"));
- Installer installer = new Installer(paths, true);
- installer.installAll();
- }
- DOWNLOADED = workingDirectory;
-
- if (openejbHome == null || (!openejbHome.exists())) {
- throw new LifecycleException("Error finding OPENEJB_HOME");
- }
-
- FileUtils.deleteOnExit(openejbHome);
- Map<String, String> replacements = new HashMap<String, String>();
- replacements.put("8080", String.valueOf(configuration.getHttpPort()));
- replacements.put("8005", String.valueOf(configuration.getStopPort()));
- replace(replacements, new File(openejbHome, "conf/server.xml"));
-
- write(Thread.currentThread().getContextClassLoader().getResource("default.remote.logging.properties"), new File(openejbHome, "conf/logging.properties"));
-
- System.setProperty("tomee.http.port", String.valueOf(configuration.getHttpPort()));
- System.setProperty("tomee.shutdown.port", String.valueOf(configuration.getStopPort()));
- System.setProperty("java.naming.provider.url", "http://localhost:" + configuration.getHttpPort() + "/openejb/ejb");
- System.setProperty("connect.tries", "90");
- System.setProperty("server.http.port", String.valueOf(configuration.getHttpPort()));
- System.setProperty("server.shutdown.port", String.valueOf(configuration.getStopPort()));
- System.setProperty("java.opts", "-Xmx512m -Xms256m -XX:PermSize=64m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=64m -Dtomee.http.port=" + configuration.getHttpPort());
- System.setProperty("openejb.home", openejbHome.getAbsolutePath());
-
- container = new RemoteServer();
- container.start();
- } catch (Exception e) {
- throw new LifecycleException("Unable to start remote container", e);
- }
- }
-
- private static void write(URL resource, File file) throws IOException {
- if (file.exists()) {
- FileUtils.delete(file);
- }
- InputStream is = resource.openStream();
- OutputStream out = new FileOutputStream(file);
- byte buf[] = new byte[1024];
- int len;
- while ((len = is.read(buf)) > 0) {
- out.write(buf, 0, len);
- }
- out.close();
- is.close();
- }
-
- private File findOpenEJBHome(File directory) {
- File conf = new File(directory, "conf");
- File webapps = new File(directory, "webapps");
-
- if (conf.exists() && conf.isDirectory() && webapps.exists() && webapps.isDirectory()) {
- return directory;
- }
-
- for (File file : directory.listFiles()) {
- if (".".equals(file.getName()) || "..".equals(file.getName())) continue;
-
- File found = findOpenEJBHome(file);
- if (found != null) {
- return found;
- }
- }
-
- return null;
- }
-
- protected void downloadTomEE(File catalinaDirectory) throws LifecycleException {
- String artifactName;
- if (configuration.isPlusContainer()) {
- artifactName = "org.apache.openejb:apache-tomee:zip:plus:" + configuration.getOpenejbVersion();
- } else {
- artifactName = "org.apache.openejb:apache-tomee:zip:webprofile:" + configuration.getOpenejbVersion();
- }
-
- File zipFile = downloadFile(artifactName, null);
- ZipExtractor.unzip(zipFile, catalinaDirectory);
- }
-
- protected File downloadFile(String artifactName, String altUrl) {
- Artifact artifact = new MavenCache().getArtifact(artifactName, altUrl);
- if (artifact == null) throw new NullPointerException(String.format("No such artifact: %s", artifactName));
- return artifact.getFile();
- }
-
- protected void downloadOpenEJBWebapp(File targetDirectory) throws LifecycleException {
- String artifactName;
- if (configuration.isPlusContainer()) {
- artifactName = "org.apache.openejb:openejb-tomcat-plus-webapp:war:" + configuration.getOpenejbVersion();
- } else {
- artifactName = "org.apache.openejb:openejb-tomcat-webapp:war:" + configuration.getOpenejbVersion();
- }
-
- File zipFile = downloadFile(artifactName, null);
- ZipExtractor.unzip(zipFile, targetDirectory);
- }
-
- protected void downloadTomcat(File catalinaDirectory, String tomcatVersion) throws LifecycleException {
- String source = null;
-
- if (tomcatVersion.startsWith("7.")) {
- source = "http://archive.apache.org/dist/tomcat/tomcat-7/v" + tomcatVersion + "/bin/apache-tomcat-" + tomcatVersion + ".zip";
- }
-
- if (tomcatVersion.startsWith("6.")) {
- source = "http://archive.apache.org/dist/tomcat/tomcat-6/v" + tomcatVersion + "/bin/apache-tomcat-" + tomcatVersion + ".zip";
- }
-
- if (tomcatVersion.startsWith("5.5")) {
- source = "http://archive.apache.org/dist/tomcat/tomcat-5/v" + tomcatVersion + "/bin/apache-tomcat-" + tomcatVersion + ".zip";
- }
-
- if (source == null) {
- throw new LifecycleException("Unable to find URL for Tomcat " + tomcatVersion);
- }
-
- File zipFile = downloadFile("org.apache.openejb:tomcat:zip:" + tomcatVersion, source);
- ZipExtractor.unzip(zipFile, catalinaDirectory);
- }
-
- public void stop() throws LifecycleException {
- // only stop the container if we started it
- if (needsStart) {
- container.stop();
- }
- }
-
- public void connect(int port) throws Exception {
- Socket socket = new Socket("localhost", port);
- OutputStream out = socket.getOutputStream();
- out.close();
- }
-
- private void replace(Map<String, String> replacements, File file) throws IOException {
- BufferedReader reader = null;
- PrintWriter writer = null;
-
- try {
- File tmpFile = copyToTempFile(file);
- reader = new BufferedReader(new FileReader(tmpFile));
- writer = new PrintWriter(new FileWriter(file));
- String line;
-
- while ((line = reader.readLine()) != null) {
- Iterator<String> iterator = replacements.keySet().iterator();
- while (iterator.hasNext()) {
- String pattern = iterator.next();
- String replacement = replacements.get(pattern);
-
- line = line.replaceAll(pattern, replacement);
- }
-
- writer.println(line);
- }
- } catch (IOException e) {
- throw e;
- } finally {
- if (reader != null) {
- reader.close();
- }
-
- if (writer != null) {
- writer.close();
- }
- }
- }
-
- private File copyToTempFile(File file) throws IOException {
- InputStream is = null;
- OutputStream os = null;
-
- File tmpFile;
- try {
- tmpFile = File.createTempFile("oejb", ".fil");
- tmpFile.deleteOnExit();
-
- is = new FileInputStream(file);
- os = new FileOutputStream(tmpFile);
-
- Installer.copy(is, os);
- } catch (IOException e) {
- throw e;
- } finally {
- if (is != null) {
- is.close();
- }
-
- if (os != null) {
- os.close();
- }
- }
-
- return tmpFile;
- }
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEEJBEnricherArchiveAppender.java b/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEEJBEnricherArchiveAppender.java
deleted file mode 100644
index dd735a3..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEEJBEnricherArchiveAppender.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.openejb.arquillian.remote;
-
-import org.jboss.arquillian.container.test.spi.RemoteLoadableExtension;
-import org.jboss.arquillian.container.test.spi.client.deployment.AuxiliaryArchiveAppender;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-
-public class RemoteTomEEEJBEnricherArchiveAppender implements AuxiliaryArchiveAppender {
- @Override public Archive<?> createAuxiliaryArchive() {
- return ShrinkWrap.create(JavaArchive.class, "arquillian-tomee-testenricher-ejb.jar")
- .addClasses(RemoteTomEEObserver.class, RemoteTomEERemoteExtension.class)
- .addAsServiceProvider(RemoteLoadableExtension.class, RemoteTomEERemoteExtension.class);
- }
-}
\ No newline at end of file
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEExtension.java b/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEExtension.java
deleted file mode 100644
index c5dabbd..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEExtension.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.openejb.arquillian.remote;
-
-import org.jboss.arquillian.container.spi.client.container.DeployableContainer;
-import org.jboss.arquillian.container.test.spi.client.deployment.AuxiliaryArchiveAppender;
-import org.jboss.arquillian.core.spi.LoadableExtension;
-
-public class RemoteTomEEExtension implements LoadableExtension {
- @Override public void register(ExtensionBuilder builder) {
- builder.service(DeployableContainer.class, RemoteTomEEContainer.class)
- .service(AuxiliaryArchiveAppender.class, RemoteTomEEEJBEnricherArchiveAppender.class);
- }
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEObserver.java b/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEObserver.java
deleted file mode 100644
index 7490a9e..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEEObserver.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.openejb.arquillian.remote;
-
-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 RemoteTomEEObserver {
- @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
- }
- }
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEERemoteExtension.java b/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEERemoteExtension.java
deleted file mode 100644
index 016175c..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/RemoteTomEERemoteExtension.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.openejb.arquillian.remote;
-
-import org.jboss.arquillian.container.test.spi.RemoteLoadableExtension;
-
-public class RemoteTomEERemoteExtension implements RemoteLoadableExtension {
- @Override public void register(ExtensionBuilder builder) {
- builder.observer(RemoteTomEEObserver.class);
- }
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/ZipExtractor.java b/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/ZipExtractor.java
deleted file mode 100644
index 5c98146..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/openejb/arquillian/remote/ZipExtractor.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.openejb.arquillian.remote;
-
-import java.io.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-public class ZipExtractor {
-
- public static void unzip(File source, File targetDirectory) {
- OutputStream os = null;
- ZipInputStream is = null;
-
- try {
- is = new ZipInputStream(new FileInputStream(source));
- ZipEntry entry;
-
- while ((entry = is.getNextEntry()) != null) {
- String name = entry.getName();
- File file = new File(targetDirectory, name);
-
- if (name.endsWith("/")) {
- file.mkdir();
- } else {
- file.createNewFile();
-
- int bytesRead;
- byte data[] = new byte[8192];
-
- os = new FileOutputStream(file);
- while ((bytesRead = is.read(data)) != -1) {
- os.write(data, 0, bytesRead);
- }
-
- is.closeEntry();
- }
-
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch (Exception e) {
- }
- }
-
- if (os != null) {
- try {
- os.close();
- } catch (Exception e) {
- }
- }
-
- }
- }
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
deleted file mode 100644
index 575a754..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.openejb.arquillian.remote.RemoteTomEEExtension
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/main/resources/default.remote.logging.properties b/arquillian-tomee/arquillian-tomee-remote/src/main/resources/default.remote.logging.properties
deleted file mode 100644
index 867ef12..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/main/resources/default.remote.logging.properties
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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.
-
-handlers = 1catalina.java.util.logging.ConsoleHandler, 2localhost.java.util.logging.ConsoleHandler, 3manager.java.util.logging.ConsoleHandler, 4host-manager.java.util.logging.ConsoleHandler, java.util.logging.ConsoleHandler
-
-.handlers = 1catalina.java.util.logging.ConsoleHandler, java.util.logging.ConsoleHandler
-
-1catalina.java.util.logging.ConsoleHandler.level = FINE
-1catalina.java.util.logging.ConsoleHandler.directory = ${catalina.base}/logs
-1catalina.java.util.logging.ConsoleHandler.prefix = catalina.
-
-2localhost.java.util.logging.ConsoleHandler.level = FINE
-2localhost.java.util.logging.ConsoleHandler.directory = ${catalina.base}/logs
-2localhost.java.util.logging.ConsoleHandler.prefix = localhost.
-
-3manager.java.util.logging.ConsoleHandler.level = FINE
-3manager.java.util.logging.ConsoleHandler.directory = ${catalina.base}/logs
-3manager.java.util.logging.ConsoleHandler.prefix = manager.
-
-4host-manager.java.util.logging.ConsoleHandler.level = FINE
-4host-manager.java.util.logging.ConsoleHandler.directory = ${catalina.base}/logs
-4host-manager.java.util.logging.ConsoleHandler.prefix = host-manager.
-
-java.util.logging.ConsoleHandler.level = FINE
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.java.util.logging.ConsoleHandler
-
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.java.util.logging.ConsoleHandler
-
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.java.util.logging.ConsoleHandler
-
-
-log4j.rootLogger = INFO,C
-log4j.appender.C = org.apache.log4j.ConsoleAppender
-log4j.appender.C.layout = org.apache.log4j.SimpleLayout
-
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TestEjb.java b/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TestEjb.java
deleted file mode 100644
index ffe8313..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TestEjb.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.openejb.arquillian;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class TestEjb {
-
- public String greet(String name) {
- return "Hello, " + name;
- }
-
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TestServlet.java b/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TestServlet.java
deleted file mode 100644
index fdd4301..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TestServlet.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.openejb.arquillian;
-
-import java.io.IOException;
-
-import javax.ejb.EJB;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class TestServlet extends HttpServlet {
-
- @EJB
- private TestEjb myEjb;
-
- @Override
- protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
- String name = req.getParameter("name");
- if (name == null || name.length() == 0) {
- name = "OpenEJB";
- }
-
- resp.getOutputStream().print(myEjb.greet(name));
- }
-
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java b/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
deleted file mode 100644
index 237444a..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.openejb.arquillian;
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.ejb.EJB;
-
-import junit.framework.Assert;
-
-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;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.descriptor.api.Descriptors;
-import org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(Arquillian.class)
-public class TomEEContainerTest {
-
- @Deployment
- public static WebArchive createDeployment() {
- return ShrinkWrap.create(WebArchive.class, "test.war").addClass(TestServlet.class).addClass(TestEjb.class).addClass(TomEEContainerTest.class)
- .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class).version("3.0").servlet(TestServlet.class, "/ejb").exportAsString()));
- }
-
- @EJB
- private TestEjb ejb;
-
- @Test
- public void testEjbIsNotNull() throws Exception {
- Assert.assertNotNull(ejb);
- }
-
- @Test
- public void testShouldBeAbleToAccessServletAndEjb() throws Exception {
- InputStream is = new URL("http://127.0.0.1:" + System.getProperty("tomee.http.port", "10080") + "/test/ejb").openStream();
- ByteArrayOutputStream os = new ByteArrayOutputStream();
-
- int bytesRead = -1;
- byte[] buffer = new byte[8192];
- while ((bytesRead = is.read(buffer)) > -1) {
- os.write(buffer, 0, bytesRead);
- }
-
- is.close();
- os.close();
-
- String output = new String(os.toByteArray(), "UTF-8");
- Assert.assertTrue(output.contains("Hello, OpenEJB"));
- }
-
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/PojoSessionScoped.java b/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/PojoSessionScoped.java
deleted file mode 100644
index 256a3f0..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/PojoSessionScoped.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.openejb.arquillian.session;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
-import java.io.Serializable;
-import java.util.concurrent.atomic.AtomicInteger;
-
-@SessionScoped
-public class PojoSessionScoped implements Serializable {
- private static AtomicInteger ID = new AtomicInteger();
-
- private long ms;
- private int id;
-
- public PojoSessionScoped() {
- ms = System.currentTimeMillis();
- }
-
- @PostConstruct public void initId() {
- id = ID.incrementAndGet();
- }
-
- public int getId() {
- return id;
- }
-
- public long getMs() {
- return ms;
- }
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/PojoSessionScopedServletWrapper.java b/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/PojoSessionScopedServletWrapper.java
deleted file mode 100644
index 5500cf0..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/PojoSessionScopedServletWrapper.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.openejb.arquillian.session;
-
-import javax.inject.Inject;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-public class PojoSessionScopedServletWrapper extends HttpServlet {
- @Inject private PojoSessionScoped pojo;
-
- @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
- resp.setContentType("text/plain");
- resp.getWriter().println("ms=" + pojo.getMs());
- resp.getWriter().println("id=" + pojo.getId());
- }
-
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java b/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
deleted file mode 100644
index baf226b..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.openejb.arquillian.session;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.openejb.util.IOUtils;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.descriptor.api.Descriptors;
-import org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.File;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.URL;
-import java.util.Properties;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-
-@RunWith(Arquillian.class)
-public class SessionScopeTest {
- public static final String TEST_SESSION_URL = "http://127.0.0.1:" + System.getProperty("tomee.http.port", "10080") + "/test/session";
-
- @Deployment
- public static WebArchive createDeployment() {
- return ShrinkWrap.create(WebArchive.class, "test.war")
- .addClass(PojoSessionScoped.class).addClass(PojoSessionScopedServletWrapper.class)
- .addAsLibraries(new File("target/test-libs/commons-httpclient.jar"))
- .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
- .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
- .version("3.0")
- .servlet(PojoSessionScopedServletWrapper.class, "/session")
- .exportAsString()));
- }
-
- @Test
- public void testShouldBeAbleToAccessServletAndEjb() throws Exception {
- String[] sessionResult = new String[2];
- for (int i = 0; i < sessionResult.length; i++) {
- HttpClient client = new HttpClient();
- HttpMethod get = new GetMethod(TEST_SESSION_URL);
- String[] contents = new String[2];
- try {
- for (int j = 0; j < contents.length; j++) {
- int out = client.executeMethod(get);
- if (out != 200) {
- throw new RuntimeException("get " + TEST_SESSION_URL + " returned " + out);
- }
- contents[j] = get.getResponseBodyAsString();
- }
-
- assertEquals(contents[0], contents[1]);
- } finally {
- get.releaseConnection();
- }
- sessionResult[i] = contents[0];
- }
-
- assertNotSame(sessionResult[0], sessionResult[1]);
- }
-}
diff --git a/arquillian-tomee/arquillian-tomee-remote/src/test/resources/arquillian.xml b/arquillian-tomee/arquillian-tomee-remote/src/test/resources/arquillian.xml
deleted file mode 100644
index 16e7b87..0000000
--- a/arquillian-tomee/arquillian-tomee-remote/src/test/resources/arquillian.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
--->
-<arquillian
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
-
- <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-2</property>
- </configuration>
- </container>
-</arquillian>
diff --git a/arquillian-tomee/pom.xml b/arquillian-tomee/pom.xml
index e8ceaf1..e2ba336 100644
--- a/arquillian-tomee/pom.xml
+++ b/arquillian-tomee/pom.xml
@@ -45,7 +45,6 @@
<modules>
<module>arquillian-tomee-common</module>
<module>arquillian-tomee-embedded</module>
- <module>arquillian-tomee-remote</module>
<module>arquillian-tomee-tests</module>
<module>arquillian-tomee-moviefun-example</module>
<module>ziplock</module>