You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2018/01/18 15:44:18 UTC
[30/50] tomee git commit: new example project for pooling
new example project for pooling
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/e332f58f
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/e332f58f
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/e332f58f
Branch: refs/heads/master
Commit: e332f58f00c9fa87c7258abf95c2e4ea7a748492
Parents: 27d7f5a
Author: Thiago Veronezi <th...@veronezi.org>
Authored: Thu Jan 4 11:49:26 2018 -0500
Committer: Thiago Veronezi <th...@veronezi.org>
Committed: Thu Jan 4 11:49:26 2018 -0500
----------------------------------------------------------------------
examples/polling-parent/polling-mdb/pom.xml | 106 +++++++++++++++++++
.../src/main/java/org/superbiz/mdb/Api.java | 25 +++++
.../src/main/java/org/superbiz/mdb/ApiLog.java | 70 ++++++++++++
.../src/main/java/org/superbiz/mdb/LogMdb.java | 54 ++++++++++
.../main/java/org/superbiz/mdb/LogsBean.java | 40 +++++++
.../src/main/resources/META-INF/beans.xml | 20 ++++
.../src/main/resources/META-INF/ejb-jar.xml | 38 +++++++
.../polling-mdb/src/test/conf/tomee.xml | 30 ++++++
.../test/java/org/superbiz/SimpleMdbTest.java | 73 +++++++++++++
.../src/test/resources/arquillian.xml | 35 ++++++
examples/polling-parent/pom.xml | 13 +++
11 files changed, 504 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/pom.xml
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/pom.xml b/examples/polling-parent/polling-mdb/pom.xml
new file mode 100644
index 0000000..72a4f01
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/pom.xml
@@ -0,0 +1,106 @@
+<?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>
+
+ <parent>
+ <artifactId>polling-parent</artifactId>
+ <groupId>jug</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>polling-mdb</artifactId>
+ <name>OpenEJB :: Examples :: Polling :: MDB</name>
+ <packaging>war</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomee</groupId>
+ <artifactId>openejb-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomee</groupId>
+ <artifactId>openejb-cxf-rs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomee</groupId>
+ <artifactId>arquillian-tomee-remote</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomee</groupId>
+ <artifactId>tomee-webservices</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomee</groupId>
+ <artifactId>ziplock</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>polling-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>3.1.0</version>
+ <configuration>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tomee.maven</groupId>
+ <artifactId>tomee-maven-plugin</artifactId>
+ <version>${tomee.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.18.1</version>
+ <configuration> <!-- arquillian tomee embedded and openejb can conflict, since first one is suite scoped -->
+ <reuseForks>false</reuseForks>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/Api.java
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/Api.java b/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/Api.java
new file mode 100644
index 0000000..2011528
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/Api.java
@@ -0,0 +1,25 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.superbiz.mdb;
+
+import javax.ws.rs.ApplicationPath;
+
+@ApplicationPath("/api")
+public class Api {
+
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/ApiLog.java
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/ApiLog.java b/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/ApiLog.java
new file mode 100644
index 0000000..e9ab76f
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/ApiLog.java
@@ -0,0 +1,70 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.superbiz.mdb;
+
+import javax.annotation.Resource;
+import javax.ejb.EJB;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+import java.util.List;
+
+@Path("/log")
+public class ApiLog {
+
+ @Resource
+ private ConnectionFactory connectionFactory;
+
+ @Resource(name = "LoggingBean")
+ private Queue vector;
+
+ @EJB
+ private LogsBean logs;
+
+ @GET
+ @Path("/{txt}")
+ public Response get(@PathParam("txt") String txt) throws JMSException {
+ try (final Connection connection = connectionFactory.createConnection()) {
+ connection.start();
+ try (final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)) {
+ try (final MessageProducer producer = session.createProducer(vector)) {
+ final Message msg = session.createMessage();
+ msg.setStringProperty("txt", txt);
+ producer.send(msg);
+ }
+ }
+ }
+ return Response.ok().build();
+ }
+
+ @GET
+ @Path("/")
+ @Produces("application/json")
+ public List<String> get() {
+ return logs.getMessages();
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/LogMdb.java
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/LogMdb.java b/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/LogMdb.java
new file mode 100644
index 0000000..0c86df5
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/LogMdb.java
@@ -0,0 +1,54 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.superbiz.mdb;
+
+import javax.ejb.EJB;
+import javax.ejb.MessageDriven;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import java.util.concurrent.atomic.AtomicLong;
+
+@MessageDriven(activationConfig = {
+ @javax.ejb.ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
+ @javax.ejb.ActivationConfigProperty(propertyName = "destination", propertyValue = "LogMDB")
+})
+public class LogMdb implements MessageListener {
+ private static final AtomicLong ID_MANAGER = new AtomicLong(0);
+ private long id = ID_MANAGER.incrementAndGet();
+ private int usageCount = 0;
+
+ @EJB
+ private LogsBean logs;
+
+ public void onMessage(Message message) {
+ usageCount++;
+ try {
+ logs.add("BEAN_" + this.id + " [" + usageCount + "] -> " + message.getStringProperty("txt"));
+ } catch (JMSException e) {
+ throw new IllegalStateException(e);
+ }
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/LogsBean.java
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/LogsBean.java b/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/LogsBean.java
new file mode 100644
index 0000000..f9a26dc
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/main/java/org/superbiz/mdb/LogsBean.java
@@ -0,0 +1,40 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.superbiz.mdb;
+
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+import java.util.ArrayList;
+import java.util.List;
+
+@Singleton
+@Startup
+public class LogsBean {
+ private List<String> logs = new ArrayList<>();
+
+ public void add(String txt) {
+ this.logs.add(txt);
+ }
+
+ public List<String> getMessages() {
+ List<String> copy = new ArrayList<>();
+ copy.addAll(this.logs);
+ return copy;
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/main/resources/META-INF/beans.xml
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/main/resources/META-INF/beans.xml b/examples/polling-parent/polling-mdb/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000..d93dcba
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+<beans/>
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/main/resources/META-INF/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/main/resources/META-INF/ejb-jar.xml b/examples/polling-parent/polling-mdb/src/main/resources/META-INF/ejb-jar.xml
new file mode 100644
index 0000000..5d7f679
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/main/resources/META-INF/ejb-jar.xml
@@ -0,0 +1,38 @@
+<?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.
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" metadata-complete="false">
+ <enterprise-beans>
+ <message-driven>
+ <ejb-name>LogBean</ejb-name>
+ <ejb-class>org.superbiz.mdb.LogMdb</ejb-class>
+ <messaging-type>javax.jms.MessageListener</messaging-type>
+ <activation-config>
+ <activation-config-property>
+ <activation-config-property-name>destination</activation-config-property-name>
+ <activation-config-property-value>LoggingBean</activation-config-property-value>
+ </activation-config-property>
+ <activation-config-property>
+ <activation-config-property-name>destinationType</activation-config-property-name>
+ <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
+ </activation-config-property>
+ </activation-config>
+ </message-driven>
+ </enterprise-beans>
+</ejb-jar>
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/test/conf/tomee.xml
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/test/conf/tomee.xml b/examples/polling-parent/polling-mdb/src/test/conf/tomee.xml
new file mode 100644
index 0000000..311426f
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/test/conf/tomee.xml
@@ -0,0 +1,30 @@
+<?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.
+-->
+<tomee>
+ <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
+ DataSource =
+ BrokerXmlConfig = broker:(vm://localhost)
+ </Resource>
+
+ <Container id="PoolingContainer" type="MESSAGE">
+ ResourceAdapter = MyJmsResourceAdapter
+ pool = true
+ </Container>
+</tomee>
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java b/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java
new file mode 100644
index 0000000..aeda0aa
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java
@@ -0,0 +1,73 @@
+/*
+ * 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.superbiz;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.ClassLoaderAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.superbiz.mdb.Api;
+import org.superbiz.mdb.LogsBean;
+
+import javax.ejb.EJB;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+@RunWith(Arquillian.class)
+public class SimpleMdbTest {
+
+ @Deployment
+ public static WebArchive createDeployment() {
+ return ShrinkWrap.create(WebArchive.class, "test.war")
+ .addPackage(Api.class.getPackage())
+ .addAsResource(new ClassLoaderAsset("META-INF/beans.xml"), "META-INF/beans.xml")
+ .addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml"), "META-INF/ejb-jar.xml");
+ }
+
+ @ArquillianResource
+ private URL baseURL;
+
+ @EJB
+ private LogsBean logs;
+
+ @Test
+ public void testDataSourceOne() throws Exception {
+ final Client client = ClientBuilder.newClient();
+ for (int i = 0; i < 20; i++) {
+ client.target(baseURL.toExternalForm())
+ .request("log/lala_" + i)
+ .get();
+ }
+ Thread.sleep(2000);
+ List<String> expected = new ArrayList<>();
+ expected.add("BEAN_1 [7] -> lala_61");
+ List<String> actual = this.logs.getMessages();
+ Collections.sort(expected);
+ Collections.sort(actual);
+ Assert.assertEquals(expected, actual);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/polling-mdb/src/test/resources/arquillian.xml
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/test/resources/arquillian.xml b/examples/polling-parent/polling-mdb/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..6c5236f
--- /dev/null
+++ b/examples/polling-parent/polling-mdb/src/test/resources/arquillian.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<arquillian
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ >
+
+ <container qualifier="tomee" default="true">
+ <configuration>
+ <property name="conf">src/test/conf/</property>
+ <property name="httpPort">-1</property>
+ <property name="stopPort">-1</property>
+ <property name="ajpPort">-1</property>
+ <property name="simpleLog">false</property>
+ <property name="dir">target/apache-tomee-remote</property>
+ <property name="appWorkingDir">target/arquillian-test-working-dir</property>
+ <property name="classifier">plus</property>
+ </configuration>
+ </container>
+</arquillian>
http://git-wip-us.apache.org/repos/asf/tomee/blob/e332f58f/examples/polling-parent/pom.xml
----------------------------------------------------------------------
diff --git a/examples/polling-parent/pom.xml b/examples/polling-parent/pom.xml
index 289218a..0d2809e 100644
--- a/examples/polling-parent/pom.xml
+++ b/examples/polling-parent/pom.xml
@@ -74,6 +74,7 @@
<module>polling-core</module>
<module>polling-web</module>
<module>polling-client</module>
+ <module>polling-mdb</module>
</modules>
<dependencyManagement>
@@ -108,6 +109,12 @@
<!-- test -->
<dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ <version>1.1.10.Final</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>arquillian-tomee-embedded</artifactId>
<version>${tomee.version}</version>
@@ -115,6 +122,12 @@
</dependency>
<dependency>
<groupId>org.apache.tomee</groupId>
+ <artifactId>arquillian-tomee-remote</artifactId>
+ <version>${tomee.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomee</groupId>
<artifactId>tomee-webservices</artifactId>
<version>${tomee.version}</version>
<scope>test</scope>