You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2019/06/04 09:09:09 UTC

[tomee] branch master updated: Added Singleton Startup Ordering example

This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/master by this push:
     new 5bdd113  Added Singleton Startup Ordering example
     new a8a8a8c  Merge pull request #480 from cesarhernandezgt/ejb-startup-example
5bdd113 is described below

commit 5bdd11337e65657ac69be6b55bb98381b089a414
Author: CesarHernandezGt <cf...@gmail.com>
AuthorDate: Mon Jun 3 20:04:12 2019 -0600

    Added Singleton Startup Ordering example
---
 examples/pom.xml                                   |   1 +
 examples/singleton-startup-ordering/README.adoc    | 203 +++++++++++++++++++++
 examples/singleton-startup-ordering/pom.xml        | 109 +++++++++++
 .../src/main/java/org/foo/SingletonA.java          |  43 +++++
 .../src/main/java/org/foo/SingletonB.java          |  44 +++++
 .../src/main/java/org/foo/SingletonC.java          |  46 +++++
 .../src/main/java/org/foo/Supervisor.java          |  34 ++++
 .../org/foo/rest/TestSingletonStartupOrder.java    |  68 +++++++
 .../src/test/resources/arquillian.xml              |  38 ++++
 9 files changed, 586 insertions(+)

diff --git a/examples/pom.xml b/examples/pom.xml
index 999c9df..e763b09 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -149,6 +149,7 @@
     <module>schedule-methods-meta</module>
     <module>schedule-methods</module>
     <module>server-events</module>
+    <module>singleton-startup-ordering</module>
     <module>simple-cdi-interceptor</module>
     <module>simple-ear</module>
     <module>simple-cmp2</module>
diff --git a/examples/singleton-startup-ordering/README.adoc b/examples/singleton-startup-ordering/README.adoc
new file mode 100755
index 0000000..3649977
--- /dev/null
+++ b/examples/singleton-startup-ordering/README.adoc
@@ -0,0 +1,203 @@
+= Singleton Startup Ordering
+:index-group: Session Beans
+:jbake-type: page
+:jbake-status: status=published
+
+This examples shows in practice the  `@Startup` and `@DependsOn` annotations on `singleton` EJB's.
+
+
+
+=== Run the tests
+....
+mvn clean test 
+....
+
+
+
+=== The scenario
+
+* The example is composed by three singleton beans: `SingletonA`, `SingletonB`, `SingletonC`.
+* The three EJB's contains a `@PostConstruct` annotation for the `init` method that is executed after dependency injection is done to perform any initialization. This method is invoked before the class is put into service.
+* The `init` method store the name of the bean class that is been initialized in the `Supervisor` bean.
+* The `Supervisor` bean is annotated with `@ApplicationScoped` to be able to share the list of bean names stored in the `records` attribute.
+* `SingletonA` and `SingletonB` are annotated with `@Startup` which means they are going to initialized upon application startup.  `SingletonC` will be initilized until the bean is going to be used in later injection point.
+* `SingletonB` is annotated with `@DependsOn("SingletonA")` to enforce a initialization order with respect to `SingletonA`.
+
+
+
+`SingletonA.java`: Singleton EJB annotated with  `@Startup`. It depends on the EJB `Supervisor`.
+
+....
+package org.foo;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+import javax.inject.Inject;
+import java.util.logging.Logger;
+
+@Singleton
+@Startup
+public class SingletonA {
+
+    @Inject
+    Supervisor supervisor;
+
+    private final static Logger LOGGER = Logger.getLogger(SingletonA.class.getName());
+
+
+    @PostConstruct
+    public void init() {
+        LOGGER.info("Hi from init in class: " + this.getClass().getName());
+        supervisor.addRecord(this.getClass().getSimpleName());
+    }
+}
+....
+
+
+`SingletonB.java`: Singleton EJB annotated with  `@Startup` and `DependsOn`. It depends on the EJB `Supervisor`.
+
+....
+package org.foo;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.DependsOn;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+import javax.inject.Inject;
+import java.util.logging.Logger;
+
+@Singleton
+@Startup
+@DependsOn("SingletonA")
+public class SingletonB {
+
+    @Inject
+    Supervisor supervisor;
+
+    private final static Logger LOGGER = Logger.getLogger(SingletonB.class.getName());
+
+    @PostConstruct
+    public void init() {
+        LOGGER.info("Hi from init in class: " + this.getClass().getName());
+        supervisor.addRecord(this.getClass().getSimpleName());
+    }
+}
+....
+
+
+`SingletonC.java`: Singleton EJB. It depends on the EJB `Supervisor`.
+
+....
+import javax.annotation.PostConstruct;
+import javax.ejb.Singleton;
+import javax.inject.Inject;
+import java.util.logging.Logger;
+
+@Singleton
+public class SingletonC {
+    @Inject
+    Supervisor supervisor;
+
+    private final static Logger LOGGER = Logger.getLogger(SingletonC.class.getName());
+
+    @PostConstruct
+    public void init() {
+        LOGGER.info("Hi from init in class: " + this.getClass().getName());
+        supervisor.addRecord(this.getClass().getSimpleName());
+
+    }
+
+    public String hello() {
+        return "Hello from SingletonC.class";
+    }
+}
+....
+
+
+`Supervisor.java`: Applicaiton scoped Bean that keep track of a list of Bean Names.
+
+....
+import javax.enterprise.context.ApplicationScoped;
+import java.util.ArrayList;
+import java.util.List;
+
+@ApplicationScoped
+public class Supervisor {
+    private final List<String> records = new ArrayList<>();
+
+    public void addRecord(String beanClass){
+        records.add(beanClass);
+    }
+
+    public String getRecord(){
+        return records.toString();
+    }
+}
+....
+
+
+=== The tests
+
+* The class `TestSingletonStartupOrder.java` contains two test that are executed in order via the annotation `@FixMethodOrder(MethodSorters.NAME_ASCENDING)`
+* `firstTest`: assert true if an only if the records stored in the `Supervisor.record` are equals to `[SingletonA, SingletonB]`. Notice that the order is validated too. In this test we don't expect to see `SingletonC` initilized since it's not annotated with `@Startup`.
+* `secondTest`:  This test inject `SingletonC` as a parameter in the tests, therefore it asserts to true if an only if the records stored in the `Supervisor.record` are equals to `[SingletonA, SingletonB, SingletonC]`
+
+`TestSingletonStartupOrder.java`
+....
+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.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.foo.SingletonA;
+import org.foo.SingletonB;
+import org.foo.SingletonC;
+import org.foo.Supervisor;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertTrue;
+
+
+@RunWith(Arquillian.class)
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestSingletonStartupOrder {
+    private final static Logger LOGGER = Logger.getLogger(TestSingletonStartupOrder.class.getName());
+
+    @Deployment()
+    public static WebArchive createDeployment() {
+        final WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "test.war")
+                                                .addClass(SingletonA.class)
+                                                .addClass(SingletonB.class)
+                                                .addClass(SingletonC.class)
+                                                .addClass(Supervisor.class)
+                                                .addAsWebInfResource(new StringAsset("<beans/>"), "beans.xml");
+        return webArchive;
+    }
+
+
+    @Test
+    public void firstTest(Supervisor supervisor) {
+        LOGGER.info("SUPERVISOR: [" + supervisor.getRecord() + "]");
+        assertTrue(supervisor.getRecord().equals("[SingletonA, SingletonB]"));
+    }
+
+    @Test
+    public void secondTest(Supervisor supervisor, SingletonC singletonC) {
+        LOGGER.info(singletonC.hello());
+        LOGGER.info("SUPERVISOR: [" + supervisor.getRecord() + "]");
+        assertTrue(supervisor.getRecord().equals("[SingletonA, SingletonB, SingletonC]"));
+    }
+}
+....
+
+=== About the Test architecture
+
+The test cases from this project are built using Arquillian and TomEE
+Remote. The arquillian configuration can be found in
+`src/test/resources/arquillian.xml`
\ No newline at end of file
diff --git a/examples/singleton-startup-ordering/pom.xml b/examples/singleton-startup-ordering/pom.xml
new file mode 100755
index 0000000..99a05cd
--- /dev/null
+++ b/examples/singleton-startup-ordering/pom.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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>
+
+  <groupId>org.superbiz</groupId>
+  <artifactId>singleton-startup-ordering</artifactId>
+  <version>8.0.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+  <name>OpenEJB :: Examples ::  Singleton startup ordering</name>
+
+
+  <properties>
+    <version.javaee-api>8.0</version.javaee-api>
+    <version.arquillian.bom>1.1.13.Final</version.arquillian.bom>
+    <junit.version>4.12</junit.version>
+  </properties>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tomee</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>${version.javaee-api}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomee</groupId>
+      <artifactId>openejb-cxf-rs</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.arquillian.junit</groupId>
+      <artifactId>arquillian-junit-container</artifactId>
+      <version>${version.arquillian.bom}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomee</groupId>
+      <artifactId>arquillian-tomee-remote</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomee</groupId>
+      <artifactId>apache-tomee</artifactId>
+      <version>${project.version}</version>
+      <type>zip</type>
+      <classifier>microprofile</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.tomee.maven</groupId>
+        <artifactId>tomee-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <tomeeClassifier>webprofile</tomeeClassifier>
+          <context>${project.artifactId}</context>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.7.0</version>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>3.1.0</version>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonA.java b/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonA.java
new file mode 100644
index 0000000..44c1c13
--- /dev/null
+++ b/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonA.java
@@ -0,0 +1,43 @@
+/*
+ * 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.foo;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+import javax.inject.Inject;
+import java.util.logging.Logger;
+
+/**
+ * This class is going to be eagerly initialized and will precede SingletonB.
+ */
+@Singleton
+@Startup
+public class SingletonA {
+
+    @Inject
+    Supervisor supervisor;
+
+    private final static Logger LOGGER = Logger.getLogger(SingletonA.class.getName());
+
+
+    @PostConstruct
+    public void init() {
+        LOGGER.info("Hi from init in class: " + this.getClass().getName());
+        supervisor.addRecord(this.getClass().getSimpleName());
+    }
+}
diff --git a/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonB.java b/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonB.java
new file mode 100644
index 0000000..f2a72b8
--- /dev/null
+++ b/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonB.java
@@ -0,0 +1,44 @@
+/*
+ * 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.foo;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.DependsOn;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+import javax.inject.Inject;
+import java.util.logging.Logger;
+
+/**
+ * This class is going to be eagerly initialized and will depends on SingletonA.
+ */
+@Singleton
+@Startup
+@DependsOn("SingletonA")
+public class SingletonB {
+
+    @Inject
+    Supervisor supervisor;
+
+    private final static Logger LOGGER = Logger.getLogger(SingletonB.class.getName());
+
+    @PostConstruct
+    public void init() {
+        LOGGER.info("Hi from init in class: " + this.getClass().getName());
+        supervisor.addRecord(this.getClass().getSimpleName());
+    }
+}
diff --git a/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonC.java b/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonC.java
new file mode 100644
index 0000000..db257d6
--- /dev/null
+++ b/examples/singleton-startup-ordering/src/main/java/org/foo/SingletonC.java
@@ -0,0 +1,46 @@
+/*
+ * 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.foo;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Singleton;
+import javax.inject.Inject;
+import java.util.logging.Logger;
+
+
+/**
+ * Singlenton C only is annotated with @Singleton and will be lazy initialized.
+ */
+@Singleton
+public class SingletonC {
+
+    @Inject
+    Supervisor supervisor;
+
+    private final static Logger LOGGER = Logger.getLogger(SingletonC.class.getName());
+
+    @PostConstruct
+    public void init() {
+        LOGGER.info("Hi from init in class: " + this.getClass().getName());
+        supervisor.addRecord(this.getClass().getSimpleName());
+
+    }
+
+    public String hello() {
+        return "Hello from SingletonC.class";
+    }
+}
diff --git a/examples/singleton-startup-ordering/src/main/java/org/foo/Supervisor.java b/examples/singleton-startup-ordering/src/main/java/org/foo/Supervisor.java
new file mode 100644
index 0000000..c1a8c5f
--- /dev/null
+++ b/examples/singleton-startup-ordering/src/main/java/org/foo/Supervisor.java
@@ -0,0 +1,34 @@
+/*
+ * 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.foo;
+
+import javax.enterprise.context.ApplicationScoped;
+import java.util.ArrayList;
+import java.util.List;
+
+@ApplicationScoped
+public class Supervisor {
+    private final List<String> records = new ArrayList<>();
+
+    public void addRecord(String beanClass){
+        records.add(beanClass);
+    }
+
+    public String getRecord(){
+        return records.toString();
+    }
+}
diff --git a/examples/singleton-startup-ordering/src/test/java/org/foo/rest/TestSingletonStartupOrder.java b/examples/singleton-startup-ordering/src/test/java/org/foo/rest/TestSingletonStartupOrder.java
new file mode 100755
index 0000000..56d6e8d
--- /dev/null
+++ b/examples/singleton-startup-ordering/src/test/java/org/foo/rest/TestSingletonStartupOrder.java
@@ -0,0 +1,68 @@
+/*
+ * 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.foo.rest;
+
+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.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.foo.SingletonA;
+import org.foo.SingletonB;
+import org.foo.SingletonC;
+import org.foo.Supervisor;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertTrue;
+
+
+@RunWith(Arquillian.class)
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestSingletonStartupOrder {
+    private final static Logger LOGGER = Logger.getLogger(TestSingletonStartupOrder.class.getName());
+
+    @Deployment()
+    public static WebArchive createDeployment() {
+        final WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "test.war")
+                                                .addClass(SingletonA.class)
+                                                .addClass(SingletonB.class)
+                                                .addClass(SingletonC.class)
+                                                .addClass(Supervisor.class)
+                                                .addAsWebInfResource(new StringAsset("<beans/>"), "beans.xml");
+        return webArchive;
+    }
+
+
+    @Test
+    public void firstTest(Supervisor supervisor) {
+        LOGGER.info("SUPERVISOR: [" + supervisor.getRecord() + "]");
+        assertTrue(supervisor.getRecord().equals("[SingletonA, SingletonB]"));
+    }
+
+    @Test
+    public void secondTest(Supervisor supervisor, SingletonC singletonC) {
+        LOGGER.info(singletonC.hello());
+        LOGGER.info("SUPERVISOR: [" + supervisor.getRecord() + "]");
+        assertTrue(supervisor.getRecord().equals("[SingletonA, SingletonB, SingletonC]"));
+    }
+}
diff --git a/examples/singleton-startup-ordering/src/test/resources/arquillian.xml b/examples/singleton-startup-ordering/src/test/resources/arquillian.xml
new file mode 100755
index 0000000..f468f49
--- /dev/null
+++ b/examples/singleton-startup-ordering/src/test/resources/arquillian.xml
@@ -0,0 +1,38 @@
+<?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="http://jboss.org/schema/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="server" default="true">
+    <configuration>
+      <property name="httpsPort">-1</property>
+      <property name="httpPort">-1</property>
+      <property name="stopPort">-1</property>
+      <property name="ajpPort">-1</property>
+      <property name="classifier">plus</property>
+      <property name="simpleLog">true</property>
+      <property name="cleanOnStartUp">true</property>
+      <property name="dir">target/server</property>
+      <property name="appWorkingDir">target/arquillian</property>
+    </configuration>
+  </container>
+</arquillian>
\ No newline at end of file