openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: svn commit: r1326901 - in /openejb/branches/openejb-4.0.0/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-tom
Date Tue, 17 Apr 2012 06:08:17 GMT
Cool for syst props port :).
Le 17 avr. 2012 08:02, "David Blevins" <david.blevins@gmail.com> a écrit :

> If that's an issue, we should just wait to pick ports until we actually
> start.
>
> On a related note, I'm getting the info from Dan Allen on how to not need
> the system property export for exposing ports.  Hopefully I can get that in
> tonight.
>
>
> -David
>
> On Apr 16, 2012, at 10:32 PM, Romain Manni-Bucau wrote:
>
> > The try to rebind logic is now removed? Was useful for ci platforms
> where a
> > random port can be used by two tests (latency between random call and
> start
> > up).
> >
> > - Romain
> > Le 17 avr. 2012 05:52, <dblevins@apache.org> a écrit :
> >
> >> Author: dblevins
> >> Date: Tue Apr 17 03:52:00 2012
> >> New Revision: 1326901
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1326901&view=rev
> >> Log:
> >> Further clean up of TOMEE-137: Arquillian.xml properties overridable as
> >> system properties for TomEE adapters
> >>
> >> There was still duplicate code doing overriding via fixed string
> >> properties not based on the Configuration resulting in
> >> competing/conflicting ways to override and hard to document rules on
> which
> >> would win (tomee.httpPort vs tomee.http.port).  As well code to
> configure
> >> random ports was taking place before Arquillian Configuration object
> >> overriding, so 0 or -1 ports could not be specified as system property
> >> overrides.  This actually did work, but only because of the "second try"
> >> code that kicked in just before the container was started.  The end
> result
> >> was that it was a bit twisted and indirect when and how ports were set
> and
> >> using what properties.
> >>
> >> Properties are now overridden from TomEEContainer.setup(Configuration),
> >> ports are selected, then the properties are exported.
> >>
> >> If we need fancier code, we can build on that simple localized logic.
> >>
> >> As well properties that only apply to the remote adapter were once again
> >> removed from the Embedded configuration object, specifically ajpPort.
> >>
> >> Thanks to jieryn on IRC for pointing out the confusion.
> >>
> >> Modified:
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEConfiguration.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainer.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/test/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainerTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEConfiguration.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/constructor/ServletCdiConstructorInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/inject/ServletCdiInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/producer/ServletCdiProducerTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/enventry/ServletEnvEntryInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/ext/enventries/StratocasterTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/filterenventry/ServletFilterEnvEntryInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/getresources/GetResourcesTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/JaxrsTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/JAXWSTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/dd/JAXWSDDTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/openejbjar/OpenEJBJarForAddressDeploymentTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerenventry/ServletListenerEnvEntryInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerlocalinject/ServletListenerEjbLocalInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerpersistence/ServletListenerPersistenceInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerremote/ServletListenerEjbRemoteTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/localinject/ServletEjbLocalInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/ServletPersistenceInjectionTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/multiple/MultiplePersistenceTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/remote/ServletEjbRemoteTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/requestdispose/ServletDisposeRequestScopeTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappConfiguration.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
> >>
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -45,22 +45,20 @@ public class Setup {
> >>    public static final int DEFAULT_AJP_PORT = 8009;
> >>
> >>    public static void exportProperties(File openejbHome,
> >> TomEEConfiguration c) {
> >> -        System.setProperty("tomee.http.port",
> >> String.valueOf(c.getHttpPort()));
> >> -        System.setProperty("tomee.ajp.port",
> >> String.valueOf(c.getAjpPort()));
> >> -        System.setProperty("tomee.shutdown.port",
> >> String.valueOf(c.getStopPort()));
> >>        System.setProperty("java.naming.provider.url", "http://localhost
> :"
> >> + c.getHttpPort() + "/tomee/ejb");
> >>        System.setProperty("connect.tries", "90");
> >>        System.setProperty("server.http.port",
> >> String.valueOf(c.getHttpPort()));
> >>        System.setProperty("server.shutdown.port",
> >> String.valueOf(c.getStopPort()));
> >> -        System.setProperty("java.opts", "-Xmx512m -Xms256m
> >> -XX:PermSize=64m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=64m
> >> -Dtomee.http.port=" + c.getHttpPort());
> >> +        System.setProperty("java.opts", "-Xmx512m -Xms256m
> >> -XX:PermSize=64m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=64m
> >> -Dtomee.httpPort=" + c.getHttpPort());
> >>        System.setProperty("openejb.home",
> openejbHome.getAbsolutePath());
> >> +        System.setProperty("tomee.home",
> openejbHome.getAbsolutePath());
> >>    }
> >>
> >> -    public static void updateServerXml(File openejbHome,
> >> TomEEConfiguration c, int http, int stop, int ajp) throws IOException {
> >> +    public static void updateServerXml(File openejbHome, final int
> >> httpPort, final int stopPort, final int ajpPort) throws IOException {
> >>        final Map<String, String> replacements = new HashMap<String,
> >> String>();
> >> -        replacements.put(Integer.toString(http),
> >> String.valueOf(c.getHttpPort()));
> >> -        replacements.put(Integer.toString(stop),
> >> String.valueOf(c.getStopPort()));
> >> -        replacements.put(Integer.toString(ajp),
> >> String.valueOf(c.getAjpPort()));
> >> +        replacements.put(Integer.toString(DEFAULT_HTTP_PORT),
> >> String.valueOf(httpPort));
> >> +        replacements.put(Integer.toString(DEFAULT_STOP_PORT),
> >> String.valueOf(stopPort));
> >> +        replacements.put(Integer.toString(DEFAULT_AJP_PORT),
> >> String.valueOf(ajpPort));
> >>        final String s = File.separator;
> >>        replace(replacements, new File(openejbHome, "conf" + s +
> >> "server.xml"));
> >>    }
> >> @@ -152,6 +150,7 @@ public class Setup {
> >>                writer.close();
> >>            }
> >>        }
> >> +        IO.copy(file, System.out);
> >>    }
> >>
> >>    private static File copyToTempFile(File file) throws IOException {
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -29,11 +29,9 @@ import java.util.Properties;
> >> public class TomEEConfiguration implements ContainerConfiguration {
> >>
> >>    private int httpPort = 8080;
> >> -    private int ajpPort = 8009;
> >>    private int stopPort = 8005;
> >>    private String dir = System.getProperty("java.io.tmpdir") +
> >> "/arquillian-apache-tomee";
> >>    private String appWorkingDir = System.getProperty("java.io.tmpdir");
> >> -    private String systemProperties = "";
> >>
> >>    public int getHttpPort() {
> >>        return httpPort;
> >> @@ -51,14 +49,6 @@ public class TomEEConfiguration implemen
> >>        this.stopPort = stopPort;
> >>    }
> >>
> >> -    public int getAjpPort() {
> >> -        return ajpPort;
> >> -    }
> >> -
> >> -    public void setAjpPort(int ajpPort) {
> >> -        this.ajpPort = ajpPort;
> >> -    }
> >> -
> >>    public String getDir() {
> >>        return dir;
> >>    }
> >> @@ -67,14 +57,6 @@ public class TomEEConfiguration implemen
> >>        this.dir = dir;
> >>    }
> >>
> >> -    public String getSystemProperties() {
> >> -        return systemProperties;
> >> -    }
> >> -
> >> -    public void setSystemProperties(String systemProperties) {
> >> -        this.systemProperties = systemProperties;
> >> -    }
> >> -
> >>    public String getAppWorkingDir() {
> >>        return appWorkingDir;
> >>    }
> >> @@ -83,22 +65,6 @@ public class TomEEConfiguration implemen
> >>        this.appWorkingDir = appWorkingDir;
> >>    }
> >>
> >> -    public Properties systemProperties() {
> >> -        final Properties p = new Properties();
> >> -        final Reader reader = new StringReader(systemProperties);
> >> -        try {
> >> -            p.load(new InputStream() {
> >> -                @Override
> >> -                public int read() throws IOException {
> >> -                    return reader.read();
> >> -                }
> >> -            });
> >> -        } catch (IOException e) {
> >> -            throw new ArquillianRuntimeException("can't read " +
> >> systemProperties);
> >> -        }
> >> -        return p;
> >> -    }
> >> -
> >>    public void validate() throws ConfigurationException {
> >>    }
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -54,10 +54,6 @@ public abstract class TomEEContainer<Con
> >>    protected Map<String, File> moduleIds = new HashMap<String, File>();
> >>    private final Options options;
> >>
> >> -    protected int previousHttpPort;
> >> -    protected int previousStopPort;
> >> -    protected int previousAjpPort;
> >> -
> >>    protected TomEEContainer() {
> >>        this.options = new Options(System.getProperties());
> >>    }
> >> @@ -69,28 +65,9 @@ public abstract class TomEEContainer<Con
> >>
> >>        if (prefixes == null) return;
> >>
> >> -        previousHttpPort = configuration.getHttpPort();
> >> -        if (configuration.getHttpPort() <= 0) {
> >> -
>  configuration.setHttpPort(NetworkUtil.getNextAvailablePort());
> >> -        }
> >> -
> >> -        previousStopPort = configuration.getStopPort();
> >> -        if (configuration.getStopPort() <= 0) {
> >> -
>  configuration.setStopPort(NetworkUtil.getNextAvailablePort());
> >> -            if (configuration.getHttpPort() ==
> >> configuration.getStopPort()) {
> >> -                configuration.setStopPort(configuration.getHttpPort() +
> >> 1);
> >> -            }
> >> -        }
> >> -
> >> -        // only for remote cases
> >> -        previousAjpPort = configuration.getAjpPort();
> >> -        if (configuration.getAjpPort() <= 0) {
> >> -
>  configuration.setAjpPort(NetworkUtil.getNextAvailablePort());
> >> -            if (configuration.getAjpPort() ==
> configuration.getStopPort()
> >> || configuration.getAjpPort() == configuration.getHttpPort()) {
> >> -
> >> configuration.setAjpPort(Math.max(configuration.getHttpPort(),
> >> configuration.getStopPort()) + 1);
> >> -            }
> >> -        }
> >> -
> >> +        //
> >> +        // Override the config with system properties
> >> +        //
> >>        final ObjectMap map = new ObjectMap(configuration);
> >>        for (String key : map.keySet()) {
> >>            for (String prefix : prefixes.value()) {
> >> @@ -110,21 +87,38 @@ public abstract class TomEEContainer<Con
> >>                }
> >>            }
> >>        }
> >> -    }
> >> +        //
> >> +        // Set ports if they are unspecified
> >> +        //
> >> +        for (Map.Entry<String, Object> entry : map.entrySet()) {
> >> +            if (!entry.getKey().toLowerCase().endsWith("port"))
> continue;
> >> +            try {
> >> +                Object value = entry.getValue();
> >> +                int port = new Integer(value + "");
> >> +                if (port <= 0) {
> >> +                    port = NetworkUtil.getNextAvailablePort();
> >> +                    entry.setValue(port);
> >> +                }
> >> +            } catch (NumberFormatException mustNotBeAPortConfig) {
> >> +            }
> >> +        }
> >> +        //
> >> +        // Export the config back out to properties
> >> +        //
> >> +        for (Map.Entry<String, Object> entry : map.entrySet()) {
> >> +            for (String prefix : prefixes.value()) {
> >> +                try {
> >> +                    final String property = prefix + "." +
> entry.getKey();
> >> +                    final String value = entry.getValue().toString();
> >>
> >> -    protected void resetPortsToOriginal(Configuration configuration) {
> >> -        int http = configuration.getHttpPort();
> >> -        configuration.setHttpPort(previousHttpPort);
> >> -        int stop = configuration.getStopPort();
> >> -        configuration.setStopPort(previousStopPort);
> >> -        int ajp = configuration.getAjpPort();
> >> -        configuration.setAjpPort(previousAjpPort);
> >> -
> >> -        // keep this port to be able to re-update the modified config
> >> -        // => it means we can try it only once
> >> -        previousHttpPort = http;
> >> -        previousStopPort = stop;
> >> -        previousAjpPort = ajp;
> >> +                    LOGGER.log(Level.FINER, String.format("Exporting
> >> '%s=%s'", property, value));
> >> +
> >> +                    System.setProperty(property, value);
> >> +                } catch (Throwable e) {
> >> +                    // value cannot be converted to a string
> >> +                }
> >> +            }
> >> +        }
> >>    }
> >>
> >>    public abstract void start() throws LifecycleException;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEConfiguration.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEConfiguration.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEConfiguration.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEConfiguration.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -25,4 +25,13 @@ import org.apache.openejb.arquillian.com
> >> @Prefixes({"tomee", "tomee.embedded"})
> >> public class EmbeddedTomEEConfiguration extends TomEEConfiguration {
> >>
> >> +    private int ajpPort = 8009;
> >> +
> >> +    public int getAjpPort() {
> >> +        return ajpPort;
> >> +    }
> >> +
> >> +    public void setAjpPort(int ajpPort) {
> >> +        this.ajpPort = ajpPort;
> >> +    }
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainer.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainer.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainer.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/main/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainer.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -47,13 +47,17 @@ public class EmbeddedTomEEContainer exte
> >>    public static final String TOMEE_ARQUILLIAN_HTTP_PORT =
> >> "tomee.arquillian.http";
> >>    public static final String TOMEE_ARQUILLIAN_STOP_PORT =
> >> "tomee.arquillian.stop";
> >>
> >> -    @Inject @ContainerScoped private InstanceProducer<Context>
> >> contextInstance;
> >> -    @Inject @DeploymentScoped private InstanceProducer<BeanManager>
> >> beanManagerInstance;
> >> +    @Inject
> >> +    @ContainerScoped
> >> +    private InstanceProducer<Context> contextInstance;
> >> +
> >> +    @Inject
> >> +    @DeploymentScoped
> >> +    private InstanceProducer<BeanManager> beanManagerInstance;
> >>
> >>    private static final Map<Archive<?>, File> ARCHIVES = new
> >> ConcurrentHashMap<Archive<?>, File>();
> >>
> >>    private Container container;
> >> -    private Properties savedProperties;
> >>
> >>    public Class<EmbeddedTomEEConfiguration> getConfigurationClass() {
> >>        return EmbeddedTomEEConfiguration.class;
> >> @@ -61,7 +65,6 @@ public class EmbeddedTomEEContainer exte
> >>
> >>    public void setup(EmbeddedTomEEConfiguration configuration) {
> >>        super.setup(configuration);
> >> -        setSystemProperties();
> >>        container = new Container();
> >>        container.setup(convertConfiguration(configuration));
> >>    }
> >> @@ -73,24 +76,11 @@ public class EmbeddedTomEEContainer exte
> >>    private Configuration convertConfiguration(EmbeddedTomEEConfiguration
> >> tomeeConfiguration) {
> >>       Configuration configuration = new Configuration();
> >>       configuration.setDir(tomeeConfiguration.getDir());
> >> -
> >> configuration.setHttpPort(getPortAndShare(TOMEE_ARQUILLIAN_HTTP_PORT,
> >> tomeeConfiguration.getHttpPort()));
> >> -
> >> configuration.setStopPort(getPortAndShare(TOMEE_ARQUILLIAN_STOP_PORT,
> >> tomeeConfiguration.getStopPort()));
> >> +       configuration.setHttpPort(tomeeConfiguration.getHttpPort());
> >> +       configuration.setStopPort(tomeeConfiguration.getStopPort());
> >>               return configuration;
> >>       }
> >>
> >> -    private static int getPortAndShare(String systemPropName, int
> value) {
> >> -        int port = value;
> >> -        if (port <= 0) {
> >> -            port = NetworkUtil.getNextAvailablePort();
> >> -        }
> >> -        System.setProperty(systemPropName, Integer.toString(port));
> >> -
> >> -        // some hack to simply be able to use the same system property
> >> than other adapters
> >> -        System.setProperty(systemPropName.replace(".arquillian", "") +
> >> ".port", Integer.toString(port));
> >> -
> >> -        return port;
> >> -    }
> >> -
> >>    public void start() throws LifecycleException {
> >>        try {
> >>            container.start();
> >> @@ -101,37 +91,12 @@ public class EmbeddedTomEEContainer exte
> >>        }
> >>    }
> >>
> >> -    private void setSystemProperties() {
> >> -        savedProperties = new Properties();
> >> -        final Properties props = System.getProperties();
> >> -        for (Map.Entry<Object, Object> entry :
> >> configuration.systemProperties().entrySet()) {
> >> -            final String key = (String) entry.getKey();
> >> -            if (props.contains(key)) {
> >> -                savedProperties.put(key, System.getProperty(key));
> >> -            }
> >> -            props.setProperty(key, (String) entry.getValue());
> >> -        }
> >> -    }
> >> -
> >> -    private void clearSystemProperties() {
> >> -        final Properties props = System.getProperties();
> >> -        for (Map.Entry<Object, Object> entry :
> >> configuration.systemProperties().entrySet()) {
> >> -            final String key = (String) entry.getKey();
> >> -            if (savedProperties.contains(key)) {
> >> -                System.setProperty(key,
> savedProperties.getProperty(key));
> >> -            } else {
> >> -                props.remove(key);
> >> -            }
> >> -        }
> >> -    }
> >> -
> >>    public void stop() throws LifecycleException {
> >>        try {
> >>            container.stop();
> >>        } catch (Exception e) {
> >>            throw new LifecycleException("Unable to stop server", e);
> >>        }
> >> -        clearSystemProperties();
> >>    }
> >>
> >>    public ProtocolDescription getDefaultProtocol() {
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/test/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainerTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/test/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainerTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/test/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainerTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-embedded/src/test/java/org/apache/openejb/arquillian/embedded/EmbeddedTomEEContainerTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -52,13 +52,13 @@ public class EmbeddedTomEEContainerTest
> >>
> >>    @Test
> >>    public void servletIsDeployed() throws Exception {
> >> -        final String read = IOUtils.toString(new URL("http://localhost
> :"
> >> + System.getProperty("tomee.http.port", "8080") +
> >> "/test/a-servlet").openStream());
> >> +        final String read = IOUtils.toString(new URL("http://localhost
> :"
> >> + System.getProperty("tomee.httpPort", "8080") +
> >> "/test/a-servlet").openStream());
> >>        assertEquals("ok=true", read);
> >>    }
> >>
> >>    @Test
> >>    public void restServiceIsDeployed() throws Exception {
> >> -        final String read = IOUtils.toString(new URL("http://localhost
> :"
> >> + System.getProperty("tomee.http.port", "8080") +
> >> "/test/rest/foo").openStream());
> >> +        final String read = IOUtils.toString(new URL("http://localhost
> :"
> >> + System.getProperty("tomee.httpPort", "8080") +
> >> "/test/rest/foo").openStream());
> >>        assertEquals("foo", read);
> >>    }
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEConfiguration.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEConfiguration.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEConfiguration.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEConfiguration.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -31,6 +31,7 @@ public class RemoteTomEEConfiguration ex
> >>    private String classifier = "webprofile";
> >>    private String type = "zip";
> >>    private boolean removeUnusedWebapps = true;
> >> +    private int ajpPort = 8009;
> >>
> >>    public String getGroupId() {
> >>        return groupId;
> >> @@ -87,4 +88,12 @@ public class RemoteTomEEConfiguration ex
> >>    public void setRemoveUnusedWebapps(boolean removeUnusedWebapps) {
> >>        this.removeUnusedWebapps = removeUnusedWebapps;
> >>    }
> >> +
> >> +    public int getAjpPort() {
> >> +        return ajpPort;
> >> +    }
> >> +
> >> +    public void setAjpPort(int ajpPort) {
> >> +        this.ajpPort = ajpPort;
> >> +    }
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -39,18 +39,6 @@ public class RemoteTomEEContainer extend
> >>    private boolean shutdown = false;
> >>
> >>    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")));
> >> -        }
> >> -
> >> -        if (System.getProperty("tomee.ajp.port") != null) {
> >> -
> >>
> configuration.setStopPort(Integer.parseInt(System.getProperty("tomee.ajp.port")));
> >> -        }
> >> -
> >>        // see if TomEE is already running by checking the http port
> >>        if (Setup.isRunning(configuration.getHttpPort())) {
> >>
> >> @@ -63,26 +51,17 @@ public class RemoteTomEEContainer extend
> >>
> >>        try {
> >>
> >> -            configure(Setup.DEFAULT_HTTP_PORT, Setup.DEFAULT_STOP_PORT,
> >> Setup.DEFAULT_AJP_PORT);
> >> +            configure();
> >>
> >>            container = new RemoteServer();
> >>
> >> -            if (Setup.isRunning(configuration.getHttpPort())) {
> >> -                // try to reconfigure it
> >> -                // if it was using random ports
> >> -                // it can simply be a conflict
> >> -                resetPortsToOriginal(configuration);
> >> -                setup(configuration);
> >> -                configure(previousHttpPort, previousStopPort,
> >> previousAjpPort);
> >> -            }
> >> -
> >>            container.start();
> >>        } catch (Exception e) {
> >>            throw new LifecycleException("Unable to start remote
> >> container", e);
> >>        }
> >>    }
> >>
> >> -    private void configure(int http, int stop, int ajp) throws
> >> LifecycleException, IOException {
> >> +    private void configure() throws LifecycleException, IOException {
> >>        final File workingDirectory = new File(configuration.getDir());
> >>
> >>        if (workingDirectory.exists()) {
> >> @@ -108,7 +87,7 @@ public class RemoteTomEEContainer extend
> >>        Files.readable(openejbHome);
> >>        Files.writable(openejbHome);
> >>
> >> -        Setup.updateServerXml(openejbHome, configuration, http, stop,
> >> ajp);
> >> +        Setup.updateServerXml(openejbHome, configuration.getHttpPort(),
> >> configuration.getStopPort(), configuration.getAjpPort());
> >>
> >>        Setup.exportProperties(openejbHome, configuration);
> >>
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -19,6 +19,8 @@ package org.apache.openejb.arquillian;
> >> import java.io.ByteArrayOutputStream;
> >> import java.io.InputStream;
> >> import java.net.URL;
> >> +import java.util.Map;
> >> +import java.util.TreeMap;
> >>
> >> import javax.ejb.EJB;
> >>
> >> @@ -53,7 +55,8 @@ public class TomEEContainerTest {
> >>
> >>    @Test
> >>    public void testShouldBeAbleToAccessServletAndEjb() throws Exception
> {
> >> -        InputStream is = new URL("http://127.0.0.1:" +
> >> System.getProperty("tomee.http.port", "10080") +
> "/test/ejb").openStream();
> >> +        URL url = new URL("http://127.0.0.1:" +
> >> System.getProperty("tomee.httpPort", "10080") + "/test/ejb");
> >> +        InputStream is = url.openStream();
> >>        ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -39,7 +39,7 @@ import static org.junit.Assert.assertNot
> >>
> >> @RunWith(Arquillian.class)
> >> public class SessionScopeTest {
> >> -    public static final String TEST_SESSION_URL = "http://127.0.0.1:"
> +
> >> System.getProperty("tomee.http.port", "10080") +
> >> "/SessionScopeTest/session";
> >> +    public static final String TEST_SESSION_URL = "http://127.0.0.1:"
> +
> >> System.getProperty("tomee.httpPort", "10080") +
> "/SessionScopeTest/session";
> >>
> >>    @Deployment
> >>    public static WebArchive createDeployment() {
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -80,7 +80,7 @@ public abstract class TestSetup {
> >>    }
> >>
> >>    protected void validateTest(String servlet, String expectedOutput)
> >> throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" +
> getTestContextName()
> >> + "/" + servlet).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" +
> getTestContextName()
> >> + "/" + servlet).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead = -1;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/constructor/ServletCdiConstructorInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/constructor/ServletCdiConstructorInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/constructor/ServletCdiConstructorInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/constructor/ServletCdiConstructorInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -67,7 +67,7 @@ public class ServletCdiConstructorInject
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        Tests.assertOutput("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME, expectedOutput);
> >> +        Tests.assertOutput("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME, expectedOutput);
> >>    }
> >> }
> >>
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/inject/ServletCdiInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/inject/ServletCdiInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/inject/ServletCdiInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/inject/ServletCdiInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -72,7 +72,7 @@ public class ServletCdiInjectionTest {
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/producer/ServletCdiProducerTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/producer/ServletCdiProducerTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/producer/ServletCdiProducerTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/producer/ServletCdiProducerTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -71,7 +71,7 @@ public class ServletCdiProducerTest {
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        Tests.assertOutput("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME, expectedOutput);
> >> +        Tests.assertOutput("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME, expectedOutput);
> >>    }
> >>
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/enventry/ServletEnvEntryInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/enventry/ServletEnvEntryInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/enventry/ServletEnvEntryInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/enventry/ServletEnvEntryInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -148,7 +148,7 @@ public class ServletEnvEntryInjectionTes
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/ext/enventries/StratocasterTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/ext/enventries/StratocasterTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/ext/enventries/StratocasterTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/ext/enventries/StratocasterTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -85,7 +85,7 @@ public class StratocasterTest {
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        Tests.assertOutput("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME, expectedOutput);
> >> +        Tests.assertOutput("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME, expectedOutput);
> >>    }
> >>
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/filterenventry/ServletFilterEnvEntryInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/filterenventry/ServletFilterEnvEntryInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/filterenventry/ServletFilterEnvEntryInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/filterenventry/ServletFilterEnvEntryInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -165,7 +165,7 @@ public class ServletFilterEnvEntryInject
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/getresources/GetResourcesTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/getresources/GetResourcesTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/getresources/GetResourcesTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/getresources/GetResourcesTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -55,7 +55,7 @@ public class GetResourcesTest {
> >>    }
> >>
> >>    @Test public void check() throws IOException {
> >> -        assertOutput("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME +
> >> "/get-resources", "foundFromListener=1");
> >> -        assertOutput("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME +
> >> "/get-resources", "servletContextGetResource=ok");
> >> +        assertOutput("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME +
> >> "/get-resources", "foundFromListener=1");
> >> +        assertOutput("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME +
> >> "/get-resources", "servletContextGetResource=ok");
> >>    }
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/JaxrsTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/JaxrsTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/JaxrsTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/JaxrsTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -72,7 +72,7 @@ public class JaxrsTest {
> >>
> >>    protected URI uri(String path) {
> >>        if (path.startsWith("/")) path = path.substring(1);
> >> -        final String port = System.getProperty("tomee.http.port",
> >> "11080");
> >> +        final String port = System.getProperty("tomee.httpPort",
> "11080");
> >>        return URI.create(String.format("http://localhost:%s/%s/%s",
> >> port, this.getClass().getSimpleName(), path));
> >>    }
> >>
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/JAXWSTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/JAXWSTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/JAXWSTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/JAXWSTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -47,7 +47,7 @@ public class JAXWSTest {
> >>    @Test
> >>    public void invoke() throws Exception {
> >>        final String s = JAXWSTest.class.getSimpleName();
> >> -        final Service service = Service.create(new URL("
> http://localhost:"
> >> + System.getProperty("tomee.http.port", "11080") + "/" + s +
> >> "/webservices/HelloWS?wsdl"), new QName("
> >> http://jaxws.tests.arquillian.openejb.apache.org/", "HelloWSService"));
> >> +        final Service service = Service.create(new URL("
> http://localhost:"
> >> + System.getProperty("tomee.httpPort", "11080") + "/" + s +
> >> "/webservices/HelloWS?wsdl"), new QName("
> >> http://jaxws.tests.arquillian.openejb.apache.org/", "HelloWSService"));
> >>        final Hello hello = service.getPort(Hello.class);
> >>        assertEquals("hi foo!", hello.hi("foo"));
> >>    }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/dd/JAXWSDDTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/dd/JAXWSDDTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/dd/JAXWSDDTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/dd/JAXWSDDTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -63,7 +63,7 @@ public class JAXWSDDTest {
> >>    }
> >>
> >>    private void checkWSDLExists(final String name) throws Exception {
> >> -        final URL url = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") +
> >> "/JAXWSDDTest/webservices/" + name + "?wsdl");
> >> +        final URL url = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") +
> "/JAXWSDDTest/webservices/"
> >> + name + "?wsdl");
> >>        assertTrue(IO.slurp(url).contains(name));
> >>    }
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/openejbjar/OpenEJBJarForAddressDeploymentTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/openejbjar/OpenEJBJarForAddressDeploymentTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/openejbjar/OpenEJBJarForAddressDeploymentTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/openejbjar/OpenEJBJarForAddressDeploymentTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -38,7 +38,7 @@ public class OpenEJBJarForAddressDeploym
> >>    @Test
> >>    public void invoke() throws Exception {
> >>        final String s =
> >> OpenEJBJarForAddressDeploymentTest.class.getSimpleName();
> >> -        final URL url = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + s +
> >> "/webservices/foo/bar/my-ws?wsdl");
> >> +        final URL url = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + s +
> >> "/webservices/foo/bar/my-ws?wsdl");
> >>        final String wsdl = IO.slurp(url);
> >>        assertTrue(wsdl.contains("LengthCalculator"));
> >>    }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerenventry/ServletListenerEnvEntryInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerenventry/ServletListenerEnvEntryInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerenventry/ServletListenerEnvEntryInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerenventry/ServletListenerEnvEntryInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -242,7 +242,7 @@ public class ServletListenerEnvEntryInje
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerlocalinject/ServletListenerEjbLocalInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerlocalinject/ServletListenerEjbLocalInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerlocalinject/ServletListenerEjbLocalInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerlocalinject/ServletListenerEjbLocalInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -242,7 +242,7 @@ public class ServletListenerEjbLocalInje
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerpersistence/ServletListenerPersistenceInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerpersistence/ServletListenerPersistenceInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerpersistence/ServletListenerPersistenceInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerpersistence/ServletListenerPersistenceInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -101,7 +101,7 @@ public class ServletListenerPersistenceI
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead = -1;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerremote/ServletListenerEjbRemoteTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerremote/ServletListenerEjbRemoteTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerremote/ServletListenerEjbRemoteTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/listenerremote/ServletListenerEjbRemoteTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -77,7 +77,7 @@ public class ServletListenerEjbRemoteTes
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/localinject/ServletEjbLocalInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/localinject/ServletEjbLocalInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/localinject/ServletEjbLocalInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/localinject/ServletEjbLocalInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -68,7 +68,7 @@ public class ServletEjbLocalInjectionTes
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/ServletPersistenceInjectionTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/ServletPersistenceInjectionTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/ServletPersistenceInjectionTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/ServletPersistenceInjectionTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -82,7 +82,7 @@ public class ServletPersistenceInjection
> >>
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/multiple/MultiplePersistenceTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/multiple/MultiplePersistenceTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/multiple/MultiplePersistenceTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/persistence/multiple/MultiplePersistenceTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -71,7 +71,7 @@ public class MultiplePersistenceTest {
> >>
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/remote/ServletEjbRemoteTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/remote/ServletEjbRemoteTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/remote/ServletEjbRemoteTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/remote/ServletEjbRemoteTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -63,7 +63,7 @@ public class ServletEjbRemoteTest {
> >>    }
> >>
> >>    private void validateTest(String expectedOutput) throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME + "/" +
> >> TEST_NAME).openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/requestdispose/ServletDisposeRequestScopeTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/requestdispose/ServletDisposeRequestScopeTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/requestdispose/ServletDisposeRequestScopeTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/requestdispose/ServletDisposeRequestScopeTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -57,7 +57,7 @@ public class ServletDisposeRequestScopeT
> >>    }
> >>
> >>    private String invoke() throws IOException {
> >> -        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.http.port", "11080") + "/" + TEST_NAME +
> >> "/test").openStream();
> >> +        final InputStream is = new URL("http://localhost:" +
> >> System.getProperty("tomee.httpPort", "11080") + "/" + TEST_NAME +
> >> "/test").openStream();
> >>        final ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappConfiguration.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappConfiguration.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappConfiguration.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappConfiguration.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -31,6 +31,7 @@ public class TomEEWebappConfiguration ex
> >>    private String version = "1.0.0-beta-3-SNAPSHOT";
> >>    private String type = "war";
> >>    private boolean removeUnusedWebapps = true;
> >> +    private int ajpPort = 8009;
> >>
> >>    public String getGroupId() {
> >>        return groupId;
> >> @@ -85,4 +86,12 @@ public class TomEEWebappConfiguration ex
> >>    public void setRemoveUnusedWebapps(boolean removeUnusedWebapps) {
> >>        this.removeUnusedWebapps = removeUnusedWebapps;
> >>    }
> >> +
> >> +    public int getAjpPort() {
> >> +        return ajpPort;
> >> +    }
> >> +
> >> +    public void setAjpPort(int ajpPort) {
> >> +        this.ajpPort = ajpPort;
> >> +    }
> >> }
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -45,13 +45,6 @@ public class TomEEWebappContainer extend
> >>    private boolean shutdown = false;
> >>
> >>    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
> >>        if (Setup.isRunning(configuration.getHttpPort())) {
> >>
> >> @@ -108,7 +101,7 @@ public class TomEEWebappContainer extend
> >>            Files.readable(openejbHome);
> >>            Files.writable(openejbHome);
> >>
> >> -            Setup.updateServerXml(openejbHome, configuration,
> >> Setup.DEFAULT_HTTP_PORT, Setup.DEFAULT_STOP_PORT,
> Setup.DEFAULT_AJP_PORT);
> >> +            Setup.updateServerXml(openejbHome,
> >> configuration.getHttpPort(), configuration.getStopPort(), 0);
> >>            Setup.exportProperties(openejbHome, configuration);
> >>
> >>            final URL logging =
> >>
> Thread.currentThread().getContextClassLoader().getResource("default.remote.logging.properties");
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/TomEEContainerTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -53,7 +53,7 @@ public class TomEEContainerTest {
> >>
> >>    @Test
> >>    public void testShouldBeAbleToAccessServletAndEjb() throws Exception
> {
> >> -        InputStream is = new URL("http://127.0.0.1:" +
> >> System.getProperty("tomee.http.port", "10080") +
> "/test/ejb").openStream();
> >> +        InputStream is = new URL("http://127.0.0.1:" +
> >> System.getProperty("tomee.httpPort", "10080") +
> "/test/ejb").openStream();
> >>        ByteArrayOutputStream os = new ByteArrayOutputStream();
> >>
> >>        int bytesRead = -1;
> >>
> >> Modified:
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
> >> URL:
> >>
> http://svn.apache.org/viewvc/openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java?rev=1326901&r1=1326900&r2=1326901&view=diff
> >>
> >>
> ==============================================================================
> >> ---
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
> >> (original)
> >> +++
> >>
> openejb/branches/openejb-4.0.0/arquillian-tomee/arquillian-tomee-webapp-remote/src/test/java/org/apache/openejb/arquillian/session/SessionScopeTest.java
> >> Tue Apr 17 03:52:00 2012
> >> @@ -39,7 +39,7 @@ import static org.junit.Assert.assertNot
> >>
> >> @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";
> >> +    public static final String TEST_SESSION_URL = "http://127.0.0.1:"
> +
> >> System.getProperty("tomee.httpPort", "10080") + "/test/session";
> >>
> >>    @Deployment
> >>    public static WebArchive createDeployment() {
> >>
> >>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message