[tomee] branch master updated: TOMEE-1395 Invalid package on simple-mdb-with-descriptor

2019-09-05 Thread jgallimore
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 b41c82c  TOMEE-1395 Invalid package on simple-mdb-with-descriptor
 new b55866d  Merge pull request #531 from davidsalter/TOMEE-1395
b41c82c is described below

commit b41c82c03e55420c60af88ae31b5ac5738a20563
Author: David Salter 
AuthorDate: Mon Aug 5 17:30:43 2019 +0100

TOMEE-1395 Invalid package on simple-mdb-with-descriptor

Changed the package name of the test to correspond to the directory
structure.
---
 .../src/test/java/org/superbiz/mdbdesc/ChatBeanTest.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/examples/simple-mdb-with-descriptor/src/test/java/org/superbiz/mdbdesc/ChatBeanTest.java
 
b/examples/simple-mdb-with-descriptor/src/test/java/org/superbiz/mdbdesc/ChatBeanTest.java
index 42258bc..9900dd7 100644
--- 
a/examples/simple-mdb-with-descriptor/src/test/java/org/superbiz/mdbdesc/ChatBeanTest.java
+++ 
b/examples/simple-mdb-with-descriptor/src/test/java/org/superbiz/mdbdesc/ChatBeanTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 //START SNIPPET: code
-package org.superbiz.mdb;
+package org.superbiz.mdbdesc;
 
 import junit.framework.TestCase;
 



[tomee] branch tomee-7.1.x updated: HTTP(s) basic auth failed if password contained ampersand passed via basic.password URL parameter

2019-09-05 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.1.x by this push:
 new 2d93ffa  HTTP(s) basic auth failed if password contained ampersand 
passed via basic.password URL parameter
2d93ffa is described below

commit 2d93ffa8e5780f2ef9ffef3a89f88b945ba448e4
Author: Zachary Bedell 
AuthorDate: Mon Oct 2 13:01:41 2017 -0400

HTTP(s) basic auth failed if password contained ampersand passed via 
basic.password URL parameter

A double-decode bug caused URLDecode to be applied twice to parameters 
passed in
via URL including basic.username and basic.password.  The parameters were 
automatically
decoded by the call to URI.getQuery() then again as each parameter was 
parsed and added
to the returned Map in MulticastConnectionFactory.URIs.parseQuery().  
parseQuery() splits the
query string on the ampersand character then explictly URLDecode's each 
value.  Since
URI.getQuery() had already decoded the basic.password parameter, the 
splitting process
in parseQuery truncated the password at the first ampersand character.

Instead, URI.getRawQuery() should be called to get the still URLEncoded 
query string.  The
splitting and subsequent decoding in parseQuery() then correctly extracts 
the full password
from the query string.
---
 .../openejb/client/MulticastConnectionFactory.java |  2 +-
 .../apache/openejb/client/HttpConnectionTest.java  | 32 ++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git 
a/server/openejb-client/src/main/java/org/apache/openejb/client/MulticastConnectionFactory.java
 
b/server/openejb-client/src/main/java/org/apache/openejb/client/MulticastConnectionFactory.java
index 22f2f86..6851c50 100644
--- 
a/server/openejb-client/src/main/java/org/apache/openejb/client/MulticastConnectionFactory.java
+++ 
b/server/openejb-client/src/main/java/org/apache/openejb/client/MulticastConnectionFactory.java
@@ -133,7 +133,7 @@ public class MulticastConnectionFactory implements 
ConnectionFactory {
 }
 
 public static Map parseParamters(final URI uri) throws 
URISyntaxException {
-return uri.getQuery() == null ? new HashMap(0) : 
parseQuery(stripPrefix(uri.getQuery(), "?"));
+return uri.getRawQuery() == null ? new HashMap(0) 
: parseQuery(stripPrefix(uri.getRawQuery(), "?"));
 }
 
 public static String stripPrefix(final String value, final String 
prefix) {
diff --git 
a/server/openejb-client/src/test/java/org/apache/openejb/client/HttpConnectionTest.java
 
b/server/openejb-client/src/test/java/org/apache/openejb/client/HttpConnectionTest.java
index 4df016a..177192b 100644
--- 
a/server/openejb-client/src/test/java/org/apache/openejb/client/HttpConnectionTest.java
+++ 
b/server/openejb-client/src/test/java/org/apache/openejb/client/HttpConnectionTest.java
@@ -168,6 +168,38 @@ public class HttpConnectionTest {
 }
 
 @Test
+public void httpBasicSpecificConfigAmpersand() throws URISyntaxException, 
IOException {
+final HttpConnectionFactory factory = new HttpConnectionFactory();
+final String url = "http://localhost:; + server.getAddress().getPort() 
+ 
"/e?basic.password=pwd=te%26st=AltAuthorization";
+for (int i = 0; i < 3; i++) {
+final Connection connection = factory.getConnection(new URI(url));
+
+BufferedReader br = null;
+final StringBuilder sb = new StringBuilder();
+String line;
+try {
+br = new BufferedReader(new 
InputStreamReader(connection.getInputStream()));
+while ((line = br.readLine()) != null) {
+sb.append(line);
+}
+} catch (final IOException e) {
+e.printStackTrace();
+} finally {
+if (br != null) {
+try {
+br.close();
+} catch (final IOException e) {
+e.printStackTrace();
+}
+}
+connection.close();
+}
+
+Assert.assertTrue("should contain", sb.toString().contains("secure 
pagealtBasic dGUmc3Q6cHdk"));
+}
+}
+
+@Test
 public void complexURIAuthorization() throws IOException, 
URISyntaxException {
 final String baseHttp = "http://localhost:; + 
server.getAddress().getPort() + "/e?authorization=";
 final String uri = "failover:sticky+random:" + baseHttp + 
"Basic%20ABCD&" + baseHttp + "Basic%20EFG";



[tomee] branch tomee-7.0.x updated: HTTP(s) basic auth failed if password contained ampersand passed via basic.password URL parameter

2019-09-05 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.0.x by this push:
 new 2f7e3e0  HTTP(s) basic auth failed if password contained ampersand 
passed via basic.password URL parameter
2f7e3e0 is described below

commit 2f7e3e0350f0adc46a2cc5904e57255beb117cf4
Author: Zachary Bedell 
AuthorDate: Mon Oct 2 13:01:41 2017 -0400

HTTP(s) basic auth failed if password contained ampersand passed via 
basic.password URL parameter

A double-decode bug caused URLDecode to be applied twice to parameters 
passed in
via URL including basic.username and basic.password.  The parameters were 
automatically
decoded by the call to URI.getQuery() then again as each parameter was 
parsed and added
to the returned Map in MulticastConnectionFactory.URIs.parseQuery().  
parseQuery() splits the
query string on the ampersand character then explictly URLDecode's each 
value.  Since
URI.getQuery() had already decoded the basic.password parameter, the 
splitting process
in parseQuery truncated the password at the first ampersand character.

Instead, URI.getRawQuery() should be called to get the still URLEncoded 
query string.  The
splitting and subsequent decoding in parseQuery() then correctly extracts 
the full password
from the query string.
---
 .../openejb/client/MulticastConnectionFactory.java |  2 +-
 .../apache/openejb/client/HttpConnectionTest.java  | 32 ++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git 
a/server/openejb-client/src/main/java/org/apache/openejb/client/MulticastConnectionFactory.java
 
b/server/openejb-client/src/main/java/org/apache/openejb/client/MulticastConnectionFactory.java
index 22f2f86..6851c50 100644
--- 
a/server/openejb-client/src/main/java/org/apache/openejb/client/MulticastConnectionFactory.java
+++ 
b/server/openejb-client/src/main/java/org/apache/openejb/client/MulticastConnectionFactory.java
@@ -133,7 +133,7 @@ public class MulticastConnectionFactory implements 
ConnectionFactory {
 }
 
 public static Map parseParamters(final URI uri) throws 
URISyntaxException {
-return uri.getQuery() == null ? new HashMap(0) : 
parseQuery(stripPrefix(uri.getQuery(), "?"));
+return uri.getRawQuery() == null ? new HashMap(0) 
: parseQuery(stripPrefix(uri.getRawQuery(), "?"));
 }
 
 public static String stripPrefix(final String value, final String 
prefix) {
diff --git 
a/server/openejb-client/src/test/java/org/apache/openejb/client/HttpConnectionTest.java
 
b/server/openejb-client/src/test/java/org/apache/openejb/client/HttpConnectionTest.java
index 4df016a..177192b 100644
--- 
a/server/openejb-client/src/test/java/org/apache/openejb/client/HttpConnectionTest.java
+++ 
b/server/openejb-client/src/test/java/org/apache/openejb/client/HttpConnectionTest.java
@@ -168,6 +168,38 @@ public class HttpConnectionTest {
 }
 
 @Test
+public void httpBasicSpecificConfigAmpersand() throws URISyntaxException, 
IOException {
+final HttpConnectionFactory factory = new HttpConnectionFactory();
+final String url = "http://localhost:; + server.getAddress().getPort() 
+ 
"/e?basic.password=pwd=te%26st=AltAuthorization";
+for (int i = 0; i < 3; i++) {
+final Connection connection = factory.getConnection(new URI(url));
+
+BufferedReader br = null;
+final StringBuilder sb = new StringBuilder();
+String line;
+try {
+br = new BufferedReader(new 
InputStreamReader(connection.getInputStream()));
+while ((line = br.readLine()) != null) {
+sb.append(line);
+}
+} catch (final IOException e) {
+e.printStackTrace();
+} finally {
+if (br != null) {
+try {
+br.close();
+} catch (final IOException e) {
+e.printStackTrace();
+}
+}
+connection.close();
+}
+
+Assert.assertTrue("should contain", sb.toString().contains("secure 
pagealtBasic dGUmc3Q6cHdk"));
+}
+}
+
+@Test
 public void complexURIAuthorization() throws IOException, 
URISyntaxException {
 final String baseHttp = "http://localhost:; + 
server.getAddress().getPort() + "/e?authorization=";
 final String uri = "failover:sticky+random:" + baseHttp + 
"Basic%20ABCD&" + baseHttp + "Basic%20EFG";



[tomee] branch master updated (0937cdc -> 4ece444)

2019-09-05 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


from 0937cdc  Fix issue where proxyConnection() wasn't called in 
handleObtained().
 add 1905fcc  HTTP(s) basic auth failed if password contained ampersand 
passed via basic.password URL parameter
 new 4ece444  Merge branch 'fix-ampersand-password' of 
github.com:pendor/tomee into fix-ampersand-password

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../openejb/client/MulticastConnectionFactory.java |  2 +-
 .../apache/openejb/client/HttpConnectionTest.java  | 32 ++
 2 files changed, 33 insertions(+), 1 deletion(-)



[tomee] 01/01: Merge branch 'fix-ampersand-password' of github.com:pendor/tomee into fix-ampersand-password

2019-09-05 Thread jgallimore
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

commit 4ece444818f62d40a8b0a0eb39bed292b67ec154
Merge: 0937cdc 1905fcc
Author: Jonathan Gallimore 
AuthorDate: Thu Sep 5 10:49:28 2019 +0100

Merge branch 'fix-ampersand-password' of github.com:pendor/tomee into 
fix-ampersand-password

 .../openejb/client/MulticastConnectionFactory.java |  2 +-
 .../apache/openejb/client/HttpConnectionTest.java  | 32 ++
 2 files changed, 33 insertions(+), 1 deletion(-)




[tomee] branch tomee-7.0.x updated: Fix issue where proxyConnection() wasn't called in handleObtained().

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.0.x by this push:
 new a08819d  Fix issue where proxyConnection() wasn't called in 
handleObtained().
a08819d is described below

commit a08819de2feb6c1e49a5060c31dbc3419b7ea838
Author: Jonathan Gallimore 
AuthorDate: Wed Sep 4 14:04:08 2019 +0100

Fix issue where proxyConnection() wasn't called in handleObtained().
---
 .../java/org/apache/openejb/resource/AutoConnectionTracker.java| 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
index 82432df..c13cc93 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
@@ -155,9 +155,10 @@ public class AutoConnectionTracker implements 
ConnectionTracker {
 } catch (SystemException | ClassCastException e) {
 // ignore
 }
-if (!reassociate) {
-proxyConnection(interceptor, connectionInfo);
-}
+}
+
+if (!reassociate) {
+proxyConnection(interceptor, connectionInfo);
 }
 }
 



[tomee] branch tomee-7.1.x updated: Fix issue where proxyConnection() wasn't called in handleObtained().

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.1.x by this push:
 new 6f40ec7  Fix issue where proxyConnection() wasn't called in 
handleObtained().
6f40ec7 is described below

commit 6f40ec714c2dc2a943ed803d4458fae86a601c7d
Author: Jonathan Gallimore 
AuthorDate: Wed Sep 4 14:04:08 2019 +0100

Fix issue where proxyConnection() wasn't called in handleObtained().
---
 .../java/org/apache/openejb/resource/AutoConnectionTracker.java| 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
index 82432df..c13cc93 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
@@ -155,9 +155,10 @@ public class AutoConnectionTracker implements 
ConnectionTracker {
 } catch (SystemException | ClassCastException e) {
 // ignore
 }
-if (!reassociate) {
-proxyConnection(interceptor, connectionInfo);
-}
+}
+
+if (!reassociate) {
+proxyConnection(interceptor, connectionInfo);
 }
 }
 



[tomee] 06/07: Fix deployment issue with test on remote (non-embedded) containers

2019-09-04 Thread jgallimore
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

commit 54c3f3a69ac13110f18a27a01d938b1210a9d017
Author: Jonathan Gallimore 
AuthorDate: Wed Sep 4 11:19:47 2019 +0100

Fix deployment issue with test on remote (non-embedded) containers
---
 .../apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index 5d9d2a4..238ef3d 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -47,10 +47,10 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment(testable = false)
+@Deployment
 public static WebArchive getArchive() {
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class, 
XACancellingException.class);
 }
 
 @Test



[tomee] 03/07: add license header

2019-09-04 Thread jgallimore
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

commit c13c58f097397474ba6a8b876a948d7663f1552d
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 12:27:55 2019 -0500

add license header
---
 .../arquillian/tests/jms/XACancellingException.java  | 16 
 1 file changed, 16 insertions(+)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
index 627f13a..18a281c 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.openejb.arquillian.tests.jms;
 
 import javax.ejb.ApplicationException;



[tomee] 04/07: Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests

2019-09-04 Thread jgallimore
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

commit 532e737a2c5430063a49efcc13e61ec25b0aa341
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 14:28:48 2019 -0500

Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests
---
 .../openejb/resource/AutoConnectionTracker.java| 77 +++---
 1 file changed, 40 insertions(+), 37 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
index b5080ab..bb7b10f 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
@@ -109,52 +109,55 @@ public class AutoConnectionTracker implements 
ConnectionTracker {
 @Override
 public void handleObtained(final ConnectionTrackingInterceptor 
interceptor, final ConnectionInfo connectionInfo, final boolean reassociate) 
throws ResourceException {
 if (txMgr != null && registry != null) {
-TransactionImpl currentTx = null;
 try {
-currentTx = (TransactionImpl) txMgr.getTransaction();
-} catch (SystemException | ClassCastException e) {
-//ignore
-}
-
-if (currentTx != null) {
-Map> 
txConnections = (Map>) 
registry.getResource(KEY);
-if (txConnections == null) {
-txConnections = new HashMap<>();
-registry.putResource(KEY, txConnections);
-}
+final TransactionImpl currentTx = (TransactionImpl) 
txMgr.getTransaction();
+if (currentTx != null) {
+Map> 
txConnections = (Map>) 
registry
+.getResource(KEY);
+if (txConnections == null) {
+txConnections = new HashMap>();
+registry.putResource(KEY, txConnections);
+}
 
-Map connectionObjects = 
txConnections.computeIfAbsent(connectionInfo.getManagedConnectionInfo(), k -> 
new HashMap<>());
+Map connectionObjects = 
txConnections.get(connectionInfo.getManagedConnectionInfo());
+if (connectionObjects == null) {
+connectionObjects = new HashMap();
+
txConnections.put(connectionInfo.getManagedConnectionInfo(), connectionObjects);
+}
 
-connectionObjects.put(connectionInfo, 
connectionInfo.getConnectionProxy());
+connectionObjects.put(connectionInfo, 
connectionInfo.getConnectionProxy());
 
-registry.registerInterposedSynchronization(new 
Synchronization() {
-@Override
-public void beforeCompletion() {
-final Map> txConnections = (Map>) registry.getResource(KEY);
-if (txConnections != null && txConnections.size() > 0) 
{
+registry.registerInterposedSynchronization(new 
Synchronization() {
+@Override
+public void beforeCompletion() {
+}
 
-for (final Map.Entry> managedConnectionInfoMapEntry : 
txConnections.entrySet()) {
-final StringBuilder sb = new StringBuilder();
-final Collection 
connectionInfos = managedConnectionInfoMapEntry.getValue().keySet();
-for (final ConnectionInfo connectionInfo : 
connectionInfos) {
-sb.append("\n  ").append("Connection 
handle opened at 
").append(stackTraceToString(connectionInfo.getTrace().getStackTrace()));
+@Override
+public void afterCompletion(final int status) {
+final Map> txConnections = (Map>) currentTx
+.getResource(KEY);
+if (txConnections != null && txConnections.size() 
> 0) {
+for (final ManagedConnectionInfo 
managedConnectionInfo : txConnections.keySet()) {
+final StringBuilder sb = new 
StringBuilder();
+final Collection 
connectionInfos = txConnections.get(managedConnectionInfo)
+.keySet();
+for (final ConnectionInfo connectionInfo : 
connectionInfos) {
+sb.append("\n  

[tomee] branch master updated (657878a -> 0937cdc)

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


from 657878a  Revert "TOMEE-2506 this test is now passing"
 new a570fcf  Add @jgallimore 's JMX Context Tests
 new 4aa7e55  Skookimify junit tests so they don't depend on processing 
order as much
 new c13c58f  add license header
 new 532e737  Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests
 new 36f2f4d  Fix formatting
 new 54c3f3a  Fix deployment issue with test on remote (non-embedded) 
containers
 new 0937cdc  Fix issue where proxyConnection() wasn't called in 
handleObtained().

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../tests/jms/JMSContextInjectionTest.java | 34 +-
 .../arquillian/tests/jms/JMSReceiverBean.java  |  1 -
 .../arquillian/tests/jms/JMSSenderBean.java| 24 ++--
 .../arquillian/tests/jms/MessageCounter.java   |  5 +-
 .../tests/jms/XACancellingException.java   | 14 +++--
 .../src/test/resources/arquillian.xml  | 17 +++--
 .../openejb/resource/AutoConnectionTracker.java| 72 --
 7 files changed, 93 insertions(+), 74 deletions(-)
 copy 
server/openejb-client/src/main/java/org/apache/openejb/client/RemoteInitialContextFactory.java
 => 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 (76%)



[tomee] 01/07: Add @jgallimore 's JMX Context Tests

2019-09-04 Thread jgallimore
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

commit a570fcf6e1173bfcd18dfd299013ef465f26806d
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 09:33:01 2019 -0500

Add @jgallimore 's JMX Context Tests
---
 .../arquillian/tests/jms/JMSContextInjectionTest.java   | 12 
 .../openejb/arquillian/tests/jms/JMSSenderBean.java |  4 ++--
 .../openejb/arquillian/tests/jms/MessageCounter.java|  4 ++--
 .../src/test/resources/arquillian.xml   | 17 +++--
 4 files changed, 15 insertions(+), 22 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index 3d49c49..b6a4d2c 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -5,9 +5,9 @@
  * 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.
@@ -21,7 +21,6 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -32,7 +31,6 @@ import java.net.URL;
 
 import static org.junit.Assert.assertEquals;
 
-@Ignore // we know these are failing
 @RunWith(Arquillian.class)
 public class JMSContextInjectionTest {
 
@@ -62,7 +60,7 @@ public class JMSContextInjectionTest {
 for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
-
+Thread.sleep(100L);
 assertEquals(200, messageCounter.getValue());
 }
 
@@ -75,9 +73,7 @@ public class JMSContextInjectionTest {
 } catch (Exception e) {
 e.printStackTrace();
 }
-
+Thread.sleep(100L);
 assertEquals(0, messageCounter.getValue());
 }
-
-
 }
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
index 77118d7..042 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
@@ -5,9 +5,9 @@
  * 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.
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
index df47ef1..577dda3 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
@@ -5,9 +5,9 @@
  * 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

[tomee] 07/07: Fix issue where proxyConnection() wasn't called in handleObtained().

2019-09-04 Thread jgallimore
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

commit 0937cdc901b86d72e0bb290086e10682c1948156
Author: Jonathan Gallimore 
AuthorDate: Wed Sep 4 14:04:08 2019 +0100

Fix issue where proxyConnection() wasn't called in handleObtained().
---
 .../java/org/apache/openejb/resource/AutoConnectionTracker.java| 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
index bb7b10f..882c1ed 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
@@ -155,9 +155,10 @@ public class AutoConnectionTracker implements 
ConnectionTracker {
 } catch (SystemException | ClassCastException e) {
 // ignore
 }
-if (!reassociate) {
-proxyConnection(interceptor, connectionInfo);
-}
+}
+
+if (!reassociate) {
+proxyConnection(interceptor, connectionInfo);
 }
 }
 



[tomee] 05/07: Fix formatting

2019-09-04 Thread jgallimore
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

commit 36f2f4d406928ff3ff9021721b7071b9556e4382
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 15:09:19 2019 -0500

Fix formatting
---
 .../apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java   | 3 +--
 .../java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java  | 1 -
 .../java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java| 3 +--
 .../java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java   | 1 -
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index e1a1a75..5d9d2a4 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -49,7 +49,6 @@ public class JMSContextInjectionTest {
 
 @Deployment(testable = false)
 public static WebArchive getArchive() {
-
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
 .addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
 }
@@ -60,7 +59,7 @@ public class JMSContextInjectionTest {
 for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
-int waitingCount =0;
+int waitingCount = 0;
 while (senderBean.countMessagesInQueue("test") > 0 && waitingCount++ < 
15) {
 Thread.sleep(10L);
 }
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
index 63033c2..6d0e2ca 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
@@ -27,7 +27,6 @@ import javax.jms.MessageListener;
 @ActivationConfigProperty(propertyName = "destination", propertyValue 
= "test")
 })
 public class JMSReceiverBean implements MessageListener {
-
 @Inject
 private MessageCounter counter;
 
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
index 94123ca..bfa7903 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
@@ -28,7 +28,6 @@ import javax.jms.QueueBrowser;
 @Lock(LockType.READ)
 @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
 public class JMSSenderBean {
-
 @Inject
 private JMSContext jmsContext;
 
@@ -49,7 +48,7 @@ public class JMSSenderBean {
 final Queue queue = jmsContext.createQueue(queueName);
 final QueueBrowser browser = jmsContext.createBrowser(queue);
 final Enumeration msgEnumeration = browser.getEnumeration();
-int count =0 ;
+int count = 0;
 while (msgEnumeration.hasMoreElements()) {
 msgEnumeration.nextElement();
 count++;
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
index 577dda3..51474e3 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
@@ -21,7 +21,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 @ApplicationScoped
 public class MessageCounter {
-
 private AtomicInteger count = new AtomicInteger(0);
 
 public int getValue() {



[tomee] 02/07: Skookimify junit tests so they don't depend on processing order as much

2019-09-04 Thread jgallimore
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

commit 4aa7e559ded7715de890b6c5a67ff0fa8e471131
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 12:15:15 2019 -0500

Skookimify junit tests so they don't depend on processing order as much
---
 .../arquillian/tests/jms/JMSContextInjectionTest.java | 19 ++-
 .../openejb/arquillian/tests/jms/JMSSenderBean.java   | 19 +--
 .../arquillian/tests/jms/XACancellingException.java   | 12 
 3 files changed, 43 insertions(+), 7 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index b6a4d2c..e1a1a75 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,6 +21,7 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -56,22 +57,30 @@ public class JMSContextInjectionTest {
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
-
 for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
-Thread.sleep(100L);
+int waitingCount =0;
+while (senderBean.countMessagesInQueue("test") > 0 && waitingCount++ < 
15) {
+Thread.sleep(10L);
+}
+if (waitingCount >= 15) {
+Assert.fail("Hit max wait time");
+}
 assertEquals(200, messageCounter.getValue());
 }
 
 @Test
 public void testTransactionShouldRollback() throws Exception {
 messageCounter.reset();
-
+boolean fail = true;
 try {
 senderBean.sendToQueue("test", "Hello world", true);
-} catch (Exception e) {
-e.printStackTrace();
+} catch (XACancellingException e) {
+fail = false;
+}
+if (fail) {
+Assert.fail("Did not catch XACancellingException and we needed 
to");
 }
 Thread.sleep(100L);
 assertEquals(0, messageCounter.getValue());
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
index 042..94123ca 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
@@ -16,14 +16,17 @@
  */
 package org.apache.openejb.arquillian.tests.jms;
 
+import java.util.Enumeration;
+
 import javax.ejb.*;
 import javax.inject.Inject;
 import javax.jms.JMSContext;
 import javax.jms.Queue;
+import javax.jms.QueueBrowser;
 
 @Singleton
 @Lock(LockType.READ)
-@TransactionAttribute(TransactionAttributeType.REQUIRED)
+@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
 public class JMSSenderBean {
 
 @Inject
@@ -38,7 +41,19 @@ public class JMSSenderBean {
 jmsContext.createProducer().send(queue, message);
 
 if (rollback) {
-throw new RuntimeException("Should rollback");
+throw new XACancellingException();
+}
+}
+
+public int countMessagesInQueue(final String queueName) throws Exception {
+final Queue queue = jmsContext.createQueue(queueName);
+final QueueBrowser browser = jmsContext.createBrowser(queue);
+final Enumeration msgEnumeration = browser.getEnumeration();
+int count =0 ;
+while (msgEnumeration.hasMoreElements()) {
+msgEnumeration.nextElement();
+count++;
 }
+return count;
 }
 }
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.jav

[tomee] 01/06: Add @jgallimore 's JMX Context Tests

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit cacfc843032a60fc34c1f4184b3273d6b0af5609
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 09:33:01 2019 -0500

Add @jgallimore 's JMX Context Tests
---
 .../arquillian/tests/jms/JMSContextInjectionTest.java |  8 ++--
 .../openejb/arquillian/tests/jms/JMSReceiverBean.java |  3 +++
 .../src/test/resources/arquillian.xml | 19 ---
 3 files changed, 13 insertions(+), 17 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index e71f8f1..b6a4d2c 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,7 +21,6 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -32,7 +31,6 @@ import java.net.URL;
 
 import static org.junit.Assert.assertEquals;
 
-@Ignore // we know these are failing
 @RunWith(Arquillian.class)
 public class JMSContextInjectionTest {
 
@@ -62,7 +60,7 @@ public class JMSContextInjectionTest {
 for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
-
+Thread.sleep(100L);
 assertEquals(200, messageCounter.getValue());
 }
 
@@ -75,9 +73,7 @@ public class JMSContextInjectionTest {
 } catch (Exception e) {
 e.printStackTrace();
 }
-
+Thread.sleep(100L);
 assertEquals(0, messageCounter.getValue());
 }
-
-
 }
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
index 0047f69..76beebf 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
@@ -18,6 +18,8 @@ package org.apache.openejb.arquillian.tests.jms;
 
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
 import javax.inject.Inject;
 import javax.jms.Message;
 import javax.jms.MessageListener;
@@ -26,6 +28,7 @@ import javax.jms.MessageListener;
 @ActivationConfigProperty(propertyName = "destinationType", 
propertyValue = "javax.jms.Queue"),
 @ActivationConfigProperty(propertyName = "destination", propertyValue 
= "test")
 })
+@TransactionAttribute(TransactionAttributeType.REQUIRED)
 public class JMSReceiverBean implements MessageListener {
 
 @Inject
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/resources/arquillian.xml
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/resources/arquillian.xml
index a73adfe..9790cfd 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/resources/arquillian.xml
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/resources/arquillian.xml
@@ -31,10 +31,9 @@
 
 openejb.classloader.forced-load=org.apache.openejb.arquillian.tests.jms
 openejb.descriptors.output=true
-
+
 AMQResourceAdapter = new://Resource?type=ActiveMQResourceAdapter
-AMQResourceAdapter.BrokerXmlConfig = 
broker:(tcp://localhost:61616)?useJmx=falsepersistent=false
-AMQResourceAdapter.ServerUrl = vm://jvm_broker
+AMQResourceAdapter.BrokerXmlConfig = 
broker:(vm://localhost)?useJmx=falsepersistent=falsedeleteAllMessagesOnStartup=true
 AMQMessageContainer = new://Container?type=MESSAGE
 AMQMessageContainer.ResourceAdapter = AMQResourceAdapter
 AMQConnectionFactory = new://Resource?type=javax.jms.ConnectionFactory
@@ -54,10 +53,9 @@
 My\ Unmanaged\ DataSource.JdbcUrl = jdbc:hsqldb:mem:hsqldb
 
 openejb.classloader.forced-load=org.apache.openejb.arquillian.tests.jms
-
+
 A

[tomee] branch tomee-7.1.x updated (7ff7894 -> 852ac9c)

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.1.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from 7ff7894  Revert "TOMEE-2506 this test is now passing"
 new cacfc84  Add @jgallimore 's JMX Context Tests
 new d7f8390  Skookimify junit tests so they don't depend on processing 
order as much
 new 44b01d0  add license header
 new 09f92e8  Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests
 new 11e7001  Fix formatting
 new 852ac9c  Fix deployment issue with test on remote (non-embedded) 
containers

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../tests/jms/JMSContextInjectionTest.java | 30 
 .../arquillian/tests/jms/JMSReceiverBean.java  |  4 +-
 .../arquillian/tests/jms/JMSSenderBean.java| 20 +-
 .../arquillian/tests/jms/MessageCounter.java   |  1 -
 .../tests/jms/XACancellingException.java   | 14 ++--
 .../src/test/resources/arquillian.xml  | 19 +++--
 .../openejb/resource/AutoConnectionTracker.java| 81 +++---
 7 files changed, 93 insertions(+), 76 deletions(-)
 copy 
server/openejb-client/src/main/java/org/apache/openejb/client/RemoteInitialContextFactory.java
 => 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 (76%)



[tomee] 04/06: Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 09f92e8886cba0c8236d4f1c80338d9451fbdd4b
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 14:28:48 2019 -0500

Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests
---
 .../openejb/resource/AutoConnectionTracker.java| 81 +++---
 1 file changed, 40 insertions(+), 41 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
index 3064aec..82432df 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
@@ -109,56 +109,55 @@ public class AutoConnectionTracker implements 
ConnectionTracker {
 @Override
 public void handleObtained(final ConnectionTrackingInterceptor 
interceptor, final ConnectionInfo connectionInfo, final boolean reassociate) 
throws ResourceException {
 if (txMgr != null && registry != null) {
-TransactionImpl currentTx = null;
 try {
-currentTx = (TransactionImpl) txMgr.getTransaction();
-} catch (SystemException | ClassCastException e) {
-//ignore
-}
-
-if (currentTx != null) {
-Map> 
txConnections = (Map>) 
registry.getResource(KEY);
-if (txConnections == null) {
-txConnections = new HashMap>();
-registry.putResource(KEY, txConnections);
-}
+final TransactionImpl currentTx = (TransactionImpl) 
txMgr.getTransaction();
+if (currentTx != null) {
+Map> 
txConnections = (Map>) 
registry
+.getResource(KEY);
+if (txConnections == null) {
+txConnections = new HashMap>();
+registry.putResource(KEY, txConnections);
+}
 
-Map connectionObjects = 
txConnections.get(connectionInfo.getManagedConnectionInfo());
-if (connectionObjects == null) {
-connectionObjects = new HashMap();
-
txConnections.put(connectionInfo.getManagedConnectionInfo(), connectionObjects);
-}
+Map connectionObjects = 
txConnections.get(connectionInfo.getManagedConnectionInfo());
+if (connectionObjects == null) {
+connectionObjects = new HashMap();
+
txConnections.put(connectionInfo.getManagedConnectionInfo(), connectionObjects);
+}
 
-connectionObjects.put(connectionInfo, 
connectionInfo.getConnectionProxy());
+connectionObjects.put(connectionInfo, 
connectionInfo.getConnectionProxy());
 
-registry.registerInterposedSynchronization(new 
Synchronization() {
-@Override
-public void beforeCompletion() {
-final Map> txConnections = (Map>) registry.getResource(KEY);
-if (txConnections != null && txConnections.size() > 0) 
{
+registry.registerInterposedSynchronization(new 
Synchronization() {
+@Override
+public void beforeCompletion() {
+}
 
-for (final ManagedConnectionInfo 
managedConnectionInfo : txConnections.keySet()) {
-final StringBuilder sb = new StringBuilder();
-final Collection 
connectionInfos = txConnections.get(managedConnectionInfo).keySet();
-for (final ConnectionInfo connectionInfo : 
connectionInfos) {
-sb.append("\n  ").append("Connection 
handle opened at 
").append(stackTraceToString(connectionInfo.getTrace().getStackTrace()));
+@Override
+public void afterCompletion(final int status) {
+final Map> txConnections = (Map>) currentTx
+.getResource(KEY);
+if (txConnections != null && txConnections.size() 
> 0) {
+for (final ManagedConnectionInfo 
managedConnectionInfo : txConnections.keySet()) {
+final StringBuilder sb = new 
StringBuilder();
+final Collection 
connectionInfos = txConnections.get(managedConnectionInfo)
+  

[tomee] 06/06: Fix deployment issue with test on remote (non-embedded) containers

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 852ac9cb41ee7cc05bea41e994512e09afbaf77d
Author: Jonathan Gallimore 
AuthorDate: Wed Sep 4 11:19:47 2019 +0100

Fix deployment issue with test on remote (non-embedded) containers
---
 .../apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index 5d9d2a4..238ef3d 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -47,10 +47,10 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment(testable = false)
+@Deployment
 public static WebArchive getArchive() {
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class, 
XACancellingException.class);
 }
 
 @Test



[tomee] 03/06: add license header

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 44b01d09598ab96ac7133d8b5a98b1d1159ad6a2
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 12:27:55 2019 -0500

add license header
---
 .../arquillian/tests/jms/XACancellingException.java  | 16 
 1 file changed, 16 insertions(+)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
index 627f13a..18a281c 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.openejb.arquillian.tests.jms;
 
 import javax.ejb.ApplicationException;



[tomee] 02/06: Skookimify junit tests so they don't depend on processing order as much

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit d7f839094e956e4a2d45857d74052cc14e2c541b
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 12:15:15 2019 -0500

Skookimify junit tests so they don't depend on processing order as much
---
 .../arquillian/tests/jms/JMSContextInjectionTest.java | 19 ++-
 .../openejb/arquillian/tests/jms/JMSSenderBean.java   | 19 +--
 .../arquillian/tests/jms/XACancellingException.java   | 12 
 3 files changed, 43 insertions(+), 7 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index b6a4d2c..e1a1a75 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,6 +21,7 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -56,22 +57,30 @@ public class JMSContextInjectionTest {
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
-
 for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
-Thread.sleep(100L);
+int waitingCount =0;
+while (senderBean.countMessagesInQueue("test") > 0 && waitingCount++ < 
15) {
+Thread.sleep(10L);
+}
+if (waitingCount >= 15) {
+Assert.fail("Hit max wait time");
+}
 assertEquals(200, messageCounter.getValue());
 }
 
 @Test
 public void testTransactionShouldRollback() throws Exception {
 messageCounter.reset();
-
+boolean fail = true;
 try {
 senderBean.sendToQueue("test", "Hello world", true);
-} catch (Exception e) {
-e.printStackTrace();
+} catch (XACancellingException e) {
+fail = false;
+}
+if (fail) {
+Assert.fail("Did not catch XACancellingException and we needed 
to");
 }
 Thread.sleep(100L);
 assertEquals(0, messageCounter.getValue());
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
index 042..94123ca 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
@@ -16,14 +16,17 @@
  */
 package org.apache.openejb.arquillian.tests.jms;
 
+import java.util.Enumeration;
+
 import javax.ejb.*;
 import javax.inject.Inject;
 import javax.jms.JMSContext;
 import javax.jms.Queue;
+import javax.jms.QueueBrowser;
 
 @Singleton
 @Lock(LockType.READ)
-@TransactionAttribute(TransactionAttributeType.REQUIRED)
+@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
 public class JMSSenderBean {
 
 @Inject
@@ -38,7 +41,19 @@ public class JMSSenderBean {
 jmsContext.createProducer().send(queue, message);
 
 if (rollback) {
-throw new RuntimeException("Should rollback");
+throw new XACancellingException();
+}
+}
+
+public int countMessagesInQueue(final String queueName) throws Exception {
+final Queue queue = jmsContext.createQueue(queueName);
+final QueueBrowser browser = jmsContext.createBrowser(queue);
+final Enumeration msgEnumeration = browser.getEnumeration();
+int count =0 ;
+while (msgEnumeration.hasMoreElements()) {
+msgEnumeration.nextElement();
+count++;
 }
+return count;
 }
 }
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.jav

[tomee] 05/06: Fix formatting

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 11e700114410a03913db490e03f1abaf3e88a835
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 15:09:19 2019 -0500

Fix formatting
---
 .../apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java   | 3 +--
 .../java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java  | 1 -
 .../java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java| 3 +--
 .../java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java   | 1 -
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index e1a1a75..5d9d2a4 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -49,7 +49,6 @@ public class JMSContextInjectionTest {
 
 @Deployment(testable = false)
 public static WebArchive getArchive() {
-
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
 .addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
 }
@@ -60,7 +59,7 @@ public class JMSContextInjectionTest {
 for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
-int waitingCount =0;
+int waitingCount = 0;
 while (senderBean.countMessagesInQueue("test") > 0 && waitingCount++ < 
15) {
 Thread.sleep(10L);
 }
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
index 76beebf..b60de73 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
@@ -30,7 +30,6 @@ import javax.jms.MessageListener;
 })
 @TransactionAttribute(TransactionAttributeType.REQUIRED)
 public class JMSReceiverBean implements MessageListener {
-
 @Inject
 private MessageCounter counter;
 
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
index 94123ca..bfa7903 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
@@ -28,7 +28,6 @@ import javax.jms.QueueBrowser;
 @Lock(LockType.READ)
 @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
 public class JMSSenderBean {
-
 @Inject
 private JMSContext jmsContext;
 
@@ -49,7 +48,7 @@ public class JMSSenderBean {
 final Queue queue = jmsContext.createQueue(queueName);
 final QueueBrowser browser = jmsContext.createBrowser(queue);
 final Enumeration msgEnumeration = browser.getEnumeration();
-int count =0 ;
+int count = 0;
 while (msgEnumeration.hasMoreElements()) {
 msgEnumeration.nextElement();
 count++;
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
index 577dda3..51474e3 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
@@ -21,7 +21,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 @ApplicationScoped
 public class MessageCounter {
-
 private AtomicInteger count = new AtomicInteger(0);
 
 public int getValue() {



[tomee] 01/08: Add @jgallimore 's JMX Context Tests

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit c9794d52064da451b5fbb7aad9440f5673478b58
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 09:33:01 2019 -0500

Add @jgallimore 's JMX Context Tests
---
 .../tests/jms/JMSContextInjectionTest.java | 79 ++
 .../arquillian/tests/jms/JMSReceiverBean.java  | 41 +++
 .../arquillian/tests/jms/JMSSenderBean.java| 44 
 .../arquillian/tests/jms/MessageCounter.java   | 38 +++
 .../src/test/resources/arquillian.xml  | 28 ++--
 5 files changed, 225 insertions(+), 5 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
new file mode 100644
index 000..b6a4d2c
--- /dev/null
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -0,0 +1,79 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.arquillian.tests.jms;
+
+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.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.annotation.Resource;
+import javax.inject.Inject;
+import javax.jms.ConnectionFactory;
+import java.net.URL;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(Arquillian.class)
+public class JMSContextInjectionTest {
+
+@ArquillianResource
+private URL url;
+
+@Inject
+private JMSSenderBean senderBean;
+
+@Inject
+private MessageCounter messageCounter;
+
+@Resource
+private ConnectionFactory connectionFactory;
+
+@Deployment(testable = false)
+public static WebArchive getArchive() {
+
+return ShrinkWrap.create(WebArchive.class, "jms-context.war")
+.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+}
+
+@Test
+public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
+messageCounter.reset();
+
+for (int i = 0; i < 200; i++) {
+senderBean.sendToQueue("test", "Hello world");
+}
+Thread.sleep(100L);
+assertEquals(200, messageCounter.getValue());
+}
+
+@Test
+public void testTransactionShouldRollback() throws Exception {
+messageCounter.reset();
+
+try {
+senderBean.sendToQueue("test", "Hello world", true);
+} catch (Exception e) {
+e.printStackTrace();
+}
+Thread.sleep(100L);
+assertEquals(0, messageCounter.getValue());
+}
+}
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
new file mode 100644
index 000..76beebf
--- /dev/null
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
@@ -0,0 +1,41 @@
+/**
+ * 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

[tomee] 03/08: Skookimify junit tests so they don't depend on processing order as much

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 0b8637273c62e251a3fefd694b24fcf6eb0d654c
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 12:15:15 2019 -0500

Skookimify junit tests so they don't depend on processing order as much
---
 .../arquillian/tests/jms/JMSContextInjectionTest.java | 19 ++-
 .../openejb/arquillian/tests/jms/JMSSenderBean.java   | 19 +--
 .../arquillian/tests/jms/XACancellingException.java   | 12 
 3 files changed, 43 insertions(+), 7 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index b6a4d2c..e1a1a75 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,6 +21,7 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -56,22 +57,30 @@ public class JMSContextInjectionTest {
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
-
 for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
-Thread.sleep(100L);
+int waitingCount =0;
+while (senderBean.countMessagesInQueue("test") > 0 && waitingCount++ < 
15) {
+Thread.sleep(10L);
+}
+if (waitingCount >= 15) {
+Assert.fail("Hit max wait time");
+}
 assertEquals(200, messageCounter.getValue());
 }
 
 @Test
 public void testTransactionShouldRollback() throws Exception {
 messageCounter.reset();
-
+boolean fail = true;
 try {
 senderBean.sendToQueue("test", "Hello world", true);
-} catch (Exception e) {
-e.printStackTrace();
+} catch (XACancellingException e) {
+fail = false;
+}
+if (fail) {
+Assert.fail("Did not catch XACancellingException and we needed 
to");
 }
 Thread.sleep(100L);
 assertEquals(0, messageCounter.getValue());
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
index 042..94123ca 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
@@ -16,14 +16,17 @@
  */
 package org.apache.openejb.arquillian.tests.jms;
 
+import java.util.Enumeration;
+
 import javax.ejb.*;
 import javax.inject.Inject;
 import javax.jms.JMSContext;
 import javax.jms.Queue;
+import javax.jms.QueueBrowser;
 
 @Singleton
 @Lock(LockType.READ)
-@TransactionAttribute(TransactionAttributeType.REQUIRED)
+@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
 public class JMSSenderBean {
 
 @Inject
@@ -38,7 +41,19 @@ public class JMSSenderBean {
 jmsContext.createProducer().send(queue, message);
 
 if (rollback) {
-throw new RuntimeException("Should rollback");
+throw new XACancellingException();
+}
+}
+
+public int countMessagesInQueue(final String queueName) throws Exception {
+final Queue queue = jmsContext.createQueue(queueName);
+final QueueBrowser browser = jmsContext.createBrowser(queue);
+final Enumeration msgEnumeration = browser.getEnumeration();
+int count =0 ;
+while (msgEnumeration.hasMoreElements()) {
+msgEnumeration.nextElement();
+count++;
 }
+return count;
 }
 }
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.jav

[tomee] branch tomee-7.0.x updated (b4da23c -> 47450d4)

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.0.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from b4da23c  Revert "TOMEE-2506 this test is now passing"
 new c9794d5  Add @jgallimore 's JMX Context Tests
 new 1505b3c  Merge branch 'tomee-7.0.x' of github.com:exabrial/tomee into 
tomee-7.0.x
 new 0b86372  Skookimify junit tests so they don't depend on processing 
order as much
 new 141bab2  add license header
 new 621e49e  Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests
 new 58b8ed8  Fix formatting
 new b9e5a8d  Merge branch 'tomee-2506_autoconnection_tracker_warning' of 
github.com:exabrial/tomee into exabrial-tomee-2506
 new 47450d4  Fix deployment issue with test on remote (non-embedded) 
containers

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../tests/jms/JMSContextInjectionTest.java | 30 
 .../arquillian/tests/jms/JMSReceiverBean.java  |  4 +-
 .../arquillian/tests/jms/JMSSenderBean.java| 20 +-
 .../tests/jms/XACancellingException.java   | 14 ++--
 .../src/test/resources/arquillian.xml  | 19 +++--
 .../openejb/resource/AutoConnectionTracker.java| 81 +++---
 6 files changed, 93 insertions(+), 75 deletions(-)
 copy 
server/openejb-client/src/main/java/org/apache/openejb/client/RemoteInitialContextFactory.java
 => 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 (76%)



[tomee] 08/08: Fix deployment issue with test on remote (non-embedded) containers

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 47450d47bae984304815f118f218b735e61d3a25
Author: Jonathan Gallimore 
AuthorDate: Wed Sep 4 11:19:47 2019 +0100

Fix deployment issue with test on remote (non-embedded) containers
---
 .../apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index 5d9d2a4..238ef3d 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -47,10 +47,10 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment(testable = false)
+@Deployment
 public static WebArchive getArchive() {
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class, 
XACancellingException.class);
 }
 
 @Test



[tomee] 06/08: Fix formatting

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 58b8ed8a7513925df7c5c379c1727b2becbc16ae
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 15:09:19 2019 -0500

Fix formatting
---
 .../apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java   | 3 +--
 .../java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java  | 1 -
 .../java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java| 3 +--
 .../java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java   | 1 -
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index e1a1a75..5d9d2a4 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -49,7 +49,6 @@ public class JMSContextInjectionTest {
 
 @Deployment(testable = false)
 public static WebArchive getArchive() {
-
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
 .addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
 }
@@ -60,7 +59,7 @@ public class JMSContextInjectionTest {
 for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
-int waitingCount =0;
+int waitingCount = 0;
 while (senderBean.countMessagesInQueue("test") > 0 && waitingCount++ < 
15) {
 Thread.sleep(10L);
 }
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
index 76beebf..b60de73 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
@@ -30,7 +30,6 @@ import javax.jms.MessageListener;
 })
 @TransactionAttribute(TransactionAttributeType.REQUIRED)
 public class JMSReceiverBean implements MessageListener {
-
 @Inject
 private MessageCounter counter;
 
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
index 94123ca..bfa7903 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
@@ -28,7 +28,6 @@ import javax.jms.QueueBrowser;
 @Lock(LockType.READ)
 @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
 public class JMSSenderBean {
-
 @Inject
 private JMSContext jmsContext;
 
@@ -49,7 +48,7 @@ public class JMSSenderBean {
 final Queue queue = jmsContext.createQueue(queueName);
 final QueueBrowser browser = jmsContext.createBrowser(queue);
 final Enumeration msgEnumeration = browser.getEnumeration();
-int count =0 ;
+int count = 0;
 while (msgEnumeration.hasMoreElements()) {
 msgEnumeration.nextElement();
 count++;
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
index 577dda3..51474e3 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
@@ -21,7 +21,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 @ApplicationScoped
 public class MessageCounter {
-
 private AtomicInteger count = new AtomicInteger(0);
 
 public int getValue() {



[tomee] 07/08: Merge branch 'tomee-2506_autoconnection_tracker_warning' of github.com:exabrial/tomee into exabrial-tomee-2506

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit b9e5a8de7e96528b01eac631284f7d4d0bc9c01a
Merge: b4da23c 58b8ed8
Author: Jonathan Gallimore 
AuthorDate: Wed Sep 4 10:58:57 2019 +0100

Merge branch 'tomee-2506_autoconnection_tracker_warning' of 
github.com:exabrial/tomee into exabrial-tomee-2506

 .../tests/jms/JMSContextInjectionTest.java | 26 ---
 .../arquillian/tests/jms/JMSReceiverBean.java  |  4 +-
 .../arquillian/tests/jms/JMSSenderBean.java| 20 +-
 ...eceiverBean.java => XACancellingException.java} | 30 +++-
 .../src/test/resources/arquillian.xml  | 19 +++--
 .../openejb/resource/AutoConnectionTracker.java| 81 +++---
 6 files changed, 93 insertions(+), 87 deletions(-)



[tomee] 02/08: Merge branch 'tomee-7.0.x' of github.com:exabrial/tomee into tomee-7.0.x

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 1505b3c78741d5f367750d2323034efc305b0bd9
Merge: c9794d5 b9dbdee
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 09:58:38 2019 -0500

Merge branch 'tomee-7.0.x' of github.com:exabrial/tomee into tomee-7.0.x

 .../java/org/apache/openejb/resource/activemq/jms2/JMSContextImpl.java | 3 ---
 1 file changed, 3 deletions(-)



[tomee] 04/08: add license header

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 141bab223701b232948675b161b1743a84db54b4
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 12:27:55 2019 -0500

add license header
---
 .../arquillian/tests/jms/XACancellingException.java  | 16 
 1 file changed, 16 insertions(+)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
index 627f13a..18a281c 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/XACancellingException.java
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.openejb.arquillian.tests.jms;
 
 import javax.ejb.ApplicationException;



[tomee] 05/08: Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests

2019-09-04 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 621e49e610d01ecf32bf3ec90adb7707ed07b45b
Author: Jonathan S. Fisher 
AuthorDate: Tue Sep 3 14:28:48 2019 -0500

Fix TOMEE-2506 and add Jonathan Gallimore's JMS Context Tests
---
 .../openejb/resource/AutoConnectionTracker.java| 81 +++---
 1 file changed, 40 insertions(+), 41 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
index 3064aec..82432df 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/AutoConnectionTracker.java
@@ -109,56 +109,55 @@ public class AutoConnectionTracker implements 
ConnectionTracker {
 @Override
 public void handleObtained(final ConnectionTrackingInterceptor 
interceptor, final ConnectionInfo connectionInfo, final boolean reassociate) 
throws ResourceException {
 if (txMgr != null && registry != null) {
-TransactionImpl currentTx = null;
 try {
-currentTx = (TransactionImpl) txMgr.getTransaction();
-} catch (SystemException | ClassCastException e) {
-//ignore
-}
-
-if (currentTx != null) {
-Map> 
txConnections = (Map>) 
registry.getResource(KEY);
-if (txConnections == null) {
-txConnections = new HashMap>();
-registry.putResource(KEY, txConnections);
-}
+final TransactionImpl currentTx = (TransactionImpl) 
txMgr.getTransaction();
+if (currentTx != null) {
+Map> 
txConnections = (Map>) 
registry
+.getResource(KEY);
+if (txConnections == null) {
+txConnections = new HashMap>();
+registry.putResource(KEY, txConnections);
+}
 
-Map connectionObjects = 
txConnections.get(connectionInfo.getManagedConnectionInfo());
-if (connectionObjects == null) {
-connectionObjects = new HashMap();
-
txConnections.put(connectionInfo.getManagedConnectionInfo(), connectionObjects);
-}
+Map connectionObjects = 
txConnections.get(connectionInfo.getManagedConnectionInfo());
+if (connectionObjects == null) {
+connectionObjects = new HashMap();
+
txConnections.put(connectionInfo.getManagedConnectionInfo(), connectionObjects);
+}
 
-connectionObjects.put(connectionInfo, 
connectionInfo.getConnectionProxy());
+connectionObjects.put(connectionInfo, 
connectionInfo.getConnectionProxy());
 
-registry.registerInterposedSynchronization(new 
Synchronization() {
-@Override
-public void beforeCompletion() {
-final Map> txConnections = (Map>) registry.getResource(KEY);
-if (txConnections != null && txConnections.size() > 0) 
{
+registry.registerInterposedSynchronization(new 
Synchronization() {
+@Override
+public void beforeCompletion() {
+}
 
-for (final ManagedConnectionInfo 
managedConnectionInfo : txConnections.keySet()) {
-final StringBuilder sb = new StringBuilder();
-final Collection 
connectionInfos = txConnections.get(managedConnectionInfo).keySet();
-for (final ConnectionInfo connectionInfo : 
connectionInfos) {
-sb.append("\n  ").append("Connection 
handle opened at 
").append(stackTraceToString(connectionInfo.getTrace().getStackTrace()));
+@Override
+public void afterCompletion(final int status) {
+final Map> txConnections = (Map>) currentTx
+.getResource(KEY);
+if (txConnections != null && txConnections.size() 
> 0) {
+for (final ManagedConnectionInfo 
managedConnectionInfo : txConnections.keySet()) {
+final StringBuilder sb = new 
StringBuilder();
+final Collection 
connectionInfos = txConnections.get(managedConnectionInfo)
+  

[tomee] branch tomee-7.1.x updated: Revert "TOMEE-2506 this test is now passing"

2019-09-02 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.1.x by this push:
 new 7ff7894  Revert "TOMEE-2506 this test is now passing"
7ff7894 is described below

commit 7ff789441a9b01081745115fc50f55702465837e
Author: Jonathan Gallimore 
AuthorDate: Mon Sep 2 20:22:17 2019 +0100

Revert "TOMEE-2506 this test is now passing"

This reverts commit 5596d1d624187f0b572a09d2293e972317645426.
---
 .../openejb/arquillian/tests/jms/JMSContextInjectionTest.java | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index 31eb36f..e71f8f1 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,6 +21,7 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -31,6 +32,7 @@ import java.net.URL;
 
 import static org.junit.Assert.assertEquals;
 
+@Ignore // we know these are failing
 @RunWith(Arquillian.class)
 public class JMSContextInjectionTest {
 
@@ -46,18 +48,18 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment
+@Deployment(testable = false)
 public static WebArchive getArchive() {
 
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class);
+.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
 }
 
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
 
-for (int i = 0; i <= 200; i++) {
+for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
 



[tomee] branch master updated: Revert "TOMEE-2506 this test is now passing"

2019-09-02 Thread jgallimore
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 657878a  Revert "TOMEE-2506 this test is now passing"
657878a is described below

commit 657878adb926af83cd59f592e2c53c3f8cd4b9a0
Author: Jonathan Gallimore 
AuthorDate: Mon Sep 2 20:22:44 2019 +0100

Revert "TOMEE-2506 this test is now passing"

This reverts commit 5596d1d624187f0b572a09d2293e972317645426.
---
 .../openejb/arquillian/tests/jms/JMSContextInjectionTest.java | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index 744ca2f..3d49c49 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,6 +21,7 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -31,6 +32,7 @@ import java.net.URL;
 
 import static org.junit.Assert.assertEquals;
 
+@Ignore // we know these are failing
 @RunWith(Arquillian.class)
 public class JMSContextInjectionTest {
 
@@ -46,18 +48,18 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment
+@Deployment(testable = false)
 public static WebArchive getArchive() {
 
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class);
+.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
 }
 
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
 
-for (int i = 0; i <= 200; i++) {
+for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
 



[tomee] branch tomee-7.0.x updated (b9dbdee -> b4da23c)

2019-09-02 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.0.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from b9dbdee  Fix tomee-2653: JMSContext auto-destruction results in 
exception
 new 6721943  TOMEE-2506 adding tests (@Ignore 'd) to demonstrate TX issues 
with @Inject 'd JMSContext for JMS 2.0.
 new 5596d1d  TOMEE-2506 this test is now passing
 new b4da23c  Revert "TOMEE-2506 this test is now passing"

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../arquillian-tomee-jms-tests/pom.xml |  4 ++
 .../tests/jms/JMSContextInjectionTest.java | 83 ++
 .../jms/{RedBean.java => JMSReceiverBean.java} | 18 +++--
 .../arquillian/tests/jms/JMSSenderBean.java| 28 +---
 .../arquillian/tests/jms/MessageCounter.java   | 21 +++---
 .../src/test/resources/arquillian.xml  | 27 ++-
 6 files changed, 150 insertions(+), 31 deletions(-)
 create mode 100644 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 copy 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/{RedBean.java
 => JMSReceiverBean.java} (66%)
 copy 
examples/cdi-alternative-and-stereotypes/src/main/java/org/superbiz/cdi/stereotype/Journey.java
 => 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 (55%)
 copy 
examples/cdi-application-scope/src/main/java/org/superbiz/cdi/applicationscope/Soup.java
 => 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
 (71%)



[tomee] 03/03: Revert "TOMEE-2506 this test is now passing"

2019-09-02 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit b4da23cdc007c5037509e9aea5ff908c790f7eae
Author: Jonathan Gallimore 
AuthorDate: Mon Sep 2 20:21:34 2019 +0100

Revert "TOMEE-2506 this test is now passing"

This reverts commit 5596d1d624187f0b572a09d2293e972317645426.
---
 .../openejb/arquillian/tests/jms/JMSContextInjectionTest.java | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index 31eb36f..e71f8f1 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,6 +21,7 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -31,6 +32,7 @@ import java.net.URL;
 
 import static org.junit.Assert.assertEquals;
 
+@Ignore // we know these are failing
 @RunWith(Arquillian.class)
 public class JMSContextInjectionTest {
 
@@ -46,18 +48,18 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment
+@Deployment(testable = false)
 public static WebArchive getArchive() {
 
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class);
+.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
 }
 
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
 
-for (int i = 0; i <= 200; i++) {
+for (int i = 0; i < 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
 



[tomee] 02/03: TOMEE-2506 this test is now passing

2019-09-02 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 5596d1d624187f0b572a09d2293e972317645426
Author: Jonathan Gallimore 
AuthorDate: Mon Sep 2 15:39:07 2019 +0100

TOMEE-2506 this test is now passing
---
 .../openejb/arquillian/tests/jms/JMSContextInjectionTest.java | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index e71f8f1..31eb36f 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,7 +21,6 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -32,7 +31,6 @@ import java.net.URL;
 
 import static org.junit.Assert.assertEquals;
 
-@Ignore // we know these are failing
 @RunWith(Arquillian.class)
 public class JMSContextInjectionTest {
 
@@ -48,18 +46,18 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment(testable = false)
+@Deployment
 public static WebArchive getArchive() {
 
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class);
 }
 
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
 
-for (int i = 0; i < 200; i++) {
+for (int i = 0; i <= 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
 



[tomee] 01/03: TOMEE-2506 adding tests (@Ignore 'd) to demonstrate TX issues with @Inject 'd JMSContext for JMS 2.0.

2019-09-02 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 67219437bc23d7ba75da1d7c808c6c41a5280766
Author: Jonathan Gallimore 
AuthorDate: Thu Apr 4 13:46:33 2019 +0100

TOMEE-2506 adding tests (@Ignore 'd) to demonstrate TX issues with @Inject 
'd JMSContext for JMS 2.0.
---
 .../arquillian-tomee-jms-tests/pom.xml |  4 ++
 .../tests/jms/JMSContextInjectionTest.java | 83 ++
 .../arquillian/tests/jms/JMSReceiverBean.java  | 38 ++
 .../arquillian/tests/jms/JMSSenderBean.java| 44 
 .../arquillian/tests/jms/MessageCounter.java   | 38 ++
 .../src/test/resources/arquillian.xml  | 27 ++-
 6 files changed, 231 insertions(+), 3 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml
index 8da8470..9c0357e 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml
@@ -33,6 +33,10 @@
 
 true
 true
+
+
+true
+true
   
 
   
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
new file mode 100644
index 000..e71f8f1
--- /dev/null
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -0,0 +1,83 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.arquillian.tests.jms;
+
+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.spec.WebArchive;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.annotation.Resource;
+import javax.inject.Inject;
+import javax.jms.ConnectionFactory;
+import java.net.URL;
+
+import static org.junit.Assert.assertEquals;
+
+@Ignore // we know these are failing
+@RunWith(Arquillian.class)
+public class JMSContextInjectionTest {
+
+@ArquillianResource
+private URL url;
+
+@Inject
+private JMSSenderBean senderBean;
+
+@Inject
+private MessageCounter messageCounter;
+
+@Resource
+private ConnectionFactory connectionFactory;
+
+@Deployment(testable = false)
+public static WebArchive getArchive() {
+
+return ShrinkWrap.create(WebArchive.class, "jms-context.war")
+.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+}
+
+@Test
+public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
+messageCounter.reset();
+
+for (int i = 0; i < 200; i++) {
+senderBean.sendToQueue("test", "Hello world");
+}
+
+assertEquals(200, messageCounter.getValue());
+}
+
+@Test
+public void testTransactionShouldRollback() throws Exception {
+messageCounter.reset();
+
+try {
+senderBean.sendToQueue("test", "Hello world", true);
+} catch (Exception e) {
+e.printStackTrace();
+}
+
+assertEquals(0, messageCounter.getValue());
+}
+
+
+}
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
new file mode 100644
index 000..0047f69
--- /dev/null
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/

[tomee] 01/02: TOMEE-2506 adding tests (@Ignore 'd) to demonstrate TX issues with @Inject 'd JMSContext for JMS 2.0.

2019-09-02 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 675f9da47e563bc03302d9a786499264df7c7f56
Author: Jonathan Gallimore 
AuthorDate: Thu Apr 4 13:46:33 2019 +0100

TOMEE-2506 adding tests (@Ignore 'd) to demonstrate TX issues with @Inject 
'd JMSContext for JMS 2.0.
---
 .../arquillian-tomee-jms-tests/pom.xml |  4 ++
 .../tests/jms/JMSContextInjectionTest.java | 83 ++
 .../arquillian/tests/jms/JMSReceiverBean.java  | 38 ++
 .../arquillian/tests/jms/JMSSenderBean.java| 44 
 .../arquillian/tests/jms/MessageCounter.java   | 38 ++
 .../src/test/resources/arquillian.xml  | 27 ++-
 6 files changed, 231 insertions(+), 3 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml
index 7db7bbe..a4c247c 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml
@@ -33,6 +33,10 @@
 
 true
 true
+
+
+true
+true
   
 
   
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
new file mode 100644
index 000..e71f8f1
--- /dev/null
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -0,0 +1,83 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.arquillian.tests.jms;
+
+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.spec.WebArchive;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.annotation.Resource;
+import javax.inject.Inject;
+import javax.jms.ConnectionFactory;
+import java.net.URL;
+
+import static org.junit.Assert.assertEquals;
+
+@Ignore // we know these are failing
+@RunWith(Arquillian.class)
+public class JMSContextInjectionTest {
+
+@ArquillianResource
+private URL url;
+
+@Inject
+private JMSSenderBean senderBean;
+
+@Inject
+private MessageCounter messageCounter;
+
+@Resource
+private ConnectionFactory connectionFactory;
+
+@Deployment(testable = false)
+public static WebArchive getArchive() {
+
+return ShrinkWrap.create(WebArchive.class, "jms-context.war")
+.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+}
+
+@Test
+public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
+messageCounter.reset();
+
+for (int i = 0; i < 200; i++) {
+senderBean.sendToQueue("test", "Hello world");
+}
+
+assertEquals(200, messageCounter.getValue());
+}
+
+@Test
+public void testTransactionShouldRollback() throws Exception {
+messageCounter.reset();
+
+try {
+senderBean.sendToQueue("test", "Hello world", true);
+} catch (Exception e) {
+e.printStackTrace();
+}
+
+assertEquals(0, messageCounter.getValue());
+}
+
+
+}
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSReceiverBean.java
new file mode 100644
index 000..0047f69
--- /dev/null
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/

[tomee] 02/02: TOMEE-2506 this test is now passing

2019-09-02 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 9ff5b4469ca87fdcbe1fcb5287fe83d63b92798d
Author: Jonathan Gallimore 
AuthorDate: Mon Sep 2 15:39:07 2019 +0100

TOMEE-2506 this test is now passing
---
 .../openejb/arquillian/tests/jms/JMSContextInjectionTest.java | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index e71f8f1..31eb36f 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,7 +21,6 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -32,7 +31,6 @@ import java.net.URL;
 
 import static org.junit.Assert.assertEquals;
 
-@Ignore // we know these are failing
 @RunWith(Arquillian.class)
 public class JMSContextInjectionTest {
 
@@ -48,18 +46,18 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment(testable = false)
+@Deployment
 public static WebArchive getArchive() {
 
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class);
 }
 
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
 
-for (int i = 0; i < 200; i++) {
+for (int i = 0; i <= 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
 



[tomee] branch tomee-7.1.x updated (79ddc0a -> 9ff5b44)

2019-09-02 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.1.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from 79ddc0a  Fix tomee-2653: JMSContext auto-destruction results in 
exception
 new 675f9da  TOMEE-2506 adding tests (@Ignore 'd) to demonstrate TX issues 
with @Inject 'd JMSContext for JMS 2.0.
 new 9ff5b44  TOMEE-2506 this test is now passing

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../arquillian-tomee-jms-tests/pom.xml |  4 ++
 .../tests/jms/JMSContextInjectionTest.java | 69 +-
 .../jms/{RedBean.java => JMSReceiverBean.java} | 18 --
 .../arquillian/tests/jms/JMSSenderBean.java| 28 +
 .../arquillian/tests/jms/MessageCounter.java   | 21 ---
 .../src/test/resources/arquillian.xml  | 27 -
 6 files changed, 109 insertions(+), 58 deletions(-)
 copy 
examples/mp-faulttolerance-timeout/src/test/java/org/superbiz/rest/WeatherServiceTest.java
 => 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 (50%)
 copy 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/{RedBean.java
 => JMSReceiverBean.java} (66%)
 copy 
examples/cdi-alternative-and-stereotypes/src/main/java/org/superbiz/cdi/stereotype/Journey.java
 => 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSSenderBean.java
 (55%)
 copy 
examples/cdi-application-scope/src/main/java/org/superbiz/cdi/applicationscope/Soup.java
 => 
arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/MessageCounter.java
 (71%)



[tomee] branch master updated: TOMEE-2506 this test is now passing

2019-09-02 Thread jgallimore
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 f6145c2  TOMEE-2506 this test is now passing
f6145c2 is described below

commit f6145c272fbf1605d259531e9dcd782d8e8d1774
Author: Jonathan Gallimore 
AuthorDate: Mon Sep 2 15:39:07 2019 +0100

TOMEE-2506 this test is now passing
---
 .../openejb/arquillian/tests/jms/JMSContextInjectionTest.java | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
index 3d49c49..744ca2f 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/apache/openejb/arquillian/tests/jms/JMSContextInjectionTest.java
@@ -21,7 +21,6 @@ import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -32,7 +31,6 @@ import java.net.URL;
 
 import static org.junit.Assert.assertEquals;
 
-@Ignore // we know these are failing
 @RunWith(Arquillian.class)
 public class JMSContextInjectionTest {
 
@@ -48,18 +46,18 @@ public class JMSContextInjectionTest {
 @Resource
 private ConnectionFactory connectionFactory;
 
-@Deployment(testable = false)
+@Deployment
 public static WebArchive getArchive() {
 
 return ShrinkWrap.create(WebArchive.class, "jms-context.war")
-.addClasses(JMSSenderBean.class, JMSReceiverBean.class, 
MessageCounter.class);
+.addClasses(JMSContextInjectionTest.class, 
JMSSenderBean.class, JMSReceiverBean.class, MessageCounter.class);
 }
 
 @Test
 public void testShouldSendAndReceiveTwoHundredMessages() throws Exception {
 messageCounter.reset();
 
-for (int i = 0; i < 200; i++) {
+for (int i = 0; i <= 200; i++) {
 senderBean.sendToQueue("test", "Hello world");
 }
 



[tomee] branch master updated: TOMEE-2481 - Move code using PropertyEditors (deprecated class) to PropertyEditorRegistry

2019-08-28 Thread jgallimore
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 c23834a  TOMEE-2481 - Move code using PropertyEditors (deprecated 
class) to PropertyEditorRegistry
 new 96c30d8  Merge pull request #541 from rzo1/TOMEE-2481
c23834a is described below

commit c23834a9fbb4872c777eb11632d381e17d791e8a
Author: Richard Zowalla 
AuthorDate: Thu Aug 22 13:55:56 2019 +0200

TOMEE-2481 - Move code using PropertyEditors (deprecated class) to 
PropertyEditorRegistry
---
 .../java/org/apache/openejb/monitoring/ManagedMBean.java|  7 +--
 .../apache/openejb/resource/activemq/ActiveMQ5Factory.java  |  5 +++--
 .../openejb/resource/activemq/jms2/JMSProducerImpl.java |  6 --
 .../org/apache/tomee/microprofile/jwt/cdi/ClaimBean.java|  3 +--
 .../apache/openejb/server/cli/command/LocalJMXCommand.java  | 13 ++---
 5 files changed, 23 insertions(+), 11 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/monitoring/ManagedMBean.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/monitoring/ManagedMBean.java
index a4d8a7e..ef30158 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/monitoring/ManagedMBean.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/monitoring/ManagedMBean.java
@@ -19,7 +19,7 @@ package org.apache.openejb.monitoring;
 
 import org.apache.openejb.util.Classes;
 import org.apache.xbean.finder.ClassFinder;
-import org.apache.xbean.propertyeditor.PropertyEditors;
+import org.apache.xbean.propertyeditor.PropertyEditorRegistry;
 
 import javax.management.Attribute;
 import javax.management.AttributeList;
@@ -71,6 +71,7 @@ public class ManagedMBean implements DynamicMBean {
 private boolean filterAttributes;
 private MBeanParameterInfo excludeInfo;
 private MBeanParameterInfo includeInfo;
+private PropertyEditorRegistry propertyEditorRegistry = new 
PropertyEditorRegistry();
 
 public ManagedMBean(final Object managed) {
 this(managed, "");
@@ -93,6 +94,8 @@ public class ManagedMBean implements DynamicMBean {
 operationsMap.put(filterOperation.getName(), new 
MethodMember(method, this, ""));
 
 filterAttributes = true;
+
+propertyEditorRegistry.registerDefaults();
 } catch (final NoSuchMethodException e) {
 throw new IllegalStateException(e);
 }
@@ -200,7 +203,7 @@ public class ManagedMBean implements DynamicMBean {
 final Class expectedType = method.getParameterTypes()[i];
 if (value instanceof String && expectedType != Object.class) {
 final String stringValue = (String) value;
-value = PropertyEditors.getValue(expectedType, stringValue);
+value = propertyEditorRegistry.getValue(expectedType, 
stringValue);
 }
 args[i] = value;
 }
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
index e890747..ab70a9f 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
@@ -36,7 +36,7 @@ import org.apache.openejb.spi.ContainerSystem;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 import org.apache.xbean.propertyeditor.PropertyEditorException;
-import org.apache.xbean.propertyeditor.PropertyEditors;
+import org.apache.xbean.propertyeditor.PropertyEditorRegistry;
 import org.apache.xbean.recipe.ObjectRecipe;
 
 import javax.naming.Context;
@@ -65,6 +65,7 @@ public class ActiveMQ5Factory implements BrokerFactoryHandler 
{
 protected static final Map brokers = new HashMap();
 private static Throwable throwable;
 private static final AtomicBoolean started = new AtomicBoolean(false);
+private static PropertyEditorRegistry propertyEditorRegistry = new 
PropertyEditorRegistry().registerDefaults();
 
 public static void setThreadProperties(final Properties p) {
 properties = p;
@@ -433,7 +434,7 @@ public class ActiveMQ5Factory implements 
BrokerFactoryHandler {
 final Object field = params.remove(key);
 if (field != null) {
 try {
-final Object toSet = 
PropertyEditors.getValue(m.getParameterTypes()[0], field.toString());
+final Object toSet = 
propertyEditorRegistry.getValue(m.getParameterTypes()[0], field.toString());
 m.invoke(persistenceAdapter, toSet);
   

[tomee] 02/02: Revert "Backport JAXB bom and 2.3.2"

2019-08-14 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 9b4ae38302d31ea8515ac0528508659a1e3b2979
Author: Jonathan Gallimore 
AuthorDate: Wed Aug 14 15:28:09 2019 +0100

Revert "Backport JAXB bom and 2.3.2"

This reverts commit 73ef5a7d3ecca2fdd89ccfc0c96bf36bd3cf174b.
---
 boms/jaxb-runtime/pom.xml  | 63 --
 boms/pom.xml   | 41 ---
 container/openejb-jee/pom.xml  | 16 ++--
 examples/groovy-cdi/pom.xml| 12 --
 examples/groovy-jpa/pom.xml| 12 --
 examples/groovy-spock/pom.xml  | 12 --
 examples/simple-stateful-callbacks/pom.xml |  6 ---
 pom.xml| 27 -
 server/openejb-client/pom.xml  | 13 --
 server/openejb-cxf/pom.xml |  9 +++--
 server/openejb-webservices/pom.xml | 13 --
 tomee/apache-tomee/pom.xml | 12 --
 tomee/tomee-webaccess/pom.xml  | 13 --
 13 files changed, 98 insertions(+), 151 deletions(-)

diff --git a/boms/jaxb-runtime/pom.xml b/boms/jaxb-runtime/pom.xml
deleted file mode 100644
index 581561a..000
--- a/boms/jaxb-runtime/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-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/maven-v4_0_0.xsd;>
-
-  
-org.apache.tomee.bom
-boms
-7.1.2-SNAPSHOT
-  
-
-  4.0.0
-  jaxb-runtime
-  pom
-  TomEE :: BOMs :: JAXB Runtime
-
-  
-
-  
-
-  jakarta.xml.bind
-  jakarta.xml.bind-api
-  2.3.2
-
-
-  org.glassfish.jaxb
-  jaxb-runtime
-  2.3.2
-  
- 
-  jakarta.activation
-  jakarta.activation-api
-
-  
-
-  
-
-
-
diff --git a/boms/pom.xml b/boms/pom.xml
deleted file mode 100644
index 615dbdd..000
--- a/boms/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-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/maven-v4_0_0.xsd;>
-
-  
-tomee-project
-org.apache.tomee
-7.1.2-SNAPSHOT
-  
-
-  4.0.0
-  org.apache.tomee.bom
-  boms
-  pom
-  TomEE :: BOMs
-
-  
-jaxb-runtime
-  
-
-
-
diff --git a/container/openejb-jee/pom.xml b/container/openejb-jee/pom.xml
index 1c6c9e1..3e29c1e 100644
--- a/container/openejb-jee/pom.xml
+++ b/container/openejb-jee/pom.xml
@@ -59,9 +59,19 @@
   provided
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  pom
+  javax.xml.bind
+  jaxb-api
+  provided
+
+
+  com.sun.xml.bind
+  jaxb-impl
+  provided
+
+
+  com.sun.xml.bind
+  jaxb-core
+  provided
 
 
   junit
diff --git a/examples/groovy-cdi/pom.xml b/examples/groovy-cdi/pom.xml
index a87f8bd..07cf891 100644
--- a/examples/groovy-cdi/pom.xml
+++ b/examples/groovy-cdi/pom.xml
@@ -80,10 +80,14 @@
   2.4.8
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  7.1.2-SNAPSHOT
-  pom
+  org.apache.geronimo.specs
+  geronimo-jaxb_2.2_spec
+  1.0.1
+
+
+  com.sun.xml.bind
+  jaxb-impl
+  2.2.11
 
 
   junit
diff --git a/examples/groovy-jpa/pom.xml b/examples/groovy-jpa/pom.xml
index f51655b..4f819f7 100644
--- a/examples/groovy-jpa/pom.xml
+++ b/examples/groovy-jpa/pom.xml
@@ -81,10 +81,14 @@
   2.4.8
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  7.1.2-SNAPSHOT
-  pom
+  org.apache.geronimo.specs
+  geronimo-jaxb_2.2_spec
+  1.0.1
+
+
+  com.sun.xml.bind
+  jaxb-impl
+  2.1.13
 
 
   junit
diff --git a/examples/groovy-spock/pom.xml b/examples/groovy-spock/pom.xml
index 578449e..5ea8ba1 100644
--- a/examples/groovy-spock/pom.xml
+++ b/examples/groovy-spock/pom.xml
@@ -90,10 +90,14 @@
   2.4.8
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  7.1.2-SNAPSHOT
-  pom
+  org.apache.geronimo.specs
+  geronimo-jaxb_2.2_spec
+  1.0.1
+
+
+  com.sun.xml.bind
+  jaxb-impl
+  2.1.13
 
 
   junit
diff --git a/examples/simple-stateful-callbacks/pom.xml 
b/examples/simple-stateful-callbacks/pom.xml
index 93b5695..8e02250 100644
--- a/examples/simple-stateful-callbacks/pom.xml
+++ b/examples/simple-stateful-callbacks/pom.xml
@@ -58,12 +58,6 @@
   provided
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  7.1.2-SNAPSHOT
-  pom
-
-
   junit
   junit
   4.12
diff --git a/pom.xml b/pom.xml
index 1e2cc42..0a70f8b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -523,7 +523,6 @@
   

[tomee] 01/02: Revert "Fix compile error"

2019-08-14 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 0108bbaf7217e06acb4ab16f10cd281a88f540a5
Author: Jonathan Gallimore 
AuthorDate: Wed Aug 14 15:28:01 2019 +0100

Revert "Fix compile error"

This reverts commit 608eed2e8edc7c2b6b54666dcb83d9f9df762ac7.
---
 server/openejb-cxf/pom.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/server/openejb-cxf/pom.xml b/server/openejb-cxf/pom.xml
index b266650..a73f601 100644
--- a/server/openejb-cxf/pom.xml
+++ b/server/openejb-cxf/pom.xml
@@ -127,6 +127,10 @@
   pom
 
 
+  com.sun.xml.bind
+  jaxb-core
+
+
   org.apache.cxf
   cxf-rt-frontend-jaxws
   ${cxf.version}



[tomee] branch tomee-7.1.x updated (608eed2 -> 9b4ae38)

2019-08-14 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.1.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from 608eed2  Fix compile error
 new 0108bba  Revert "Fix compile error"
 new 9b4ae38  Revert "Backport JAXB bom and 2.3.2"

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 boms/jaxb-runtime/pom.xml  | 63 --
 boms/pom.xml   | 41 ---
 container/openejb-jee/pom.xml  | 16 ++--
 examples/groovy-cdi/pom.xml| 12 --
 examples/groovy-jpa/pom.xml| 12 --
 examples/groovy-spock/pom.xml  | 12 --
 examples/simple-stateful-callbacks/pom.xml |  6 ---
 pom.xml| 27 -
 server/openejb-client/pom.xml  | 13 --
 server/openejb-cxf/pom.xml | 13 --
 server/openejb-webservices/pom.xml | 13 --
 tomee/apache-tomee/pom.xml | 12 --
 tomee/tomee-webaccess/pom.xml  | 13 --
 13 files changed, 102 insertions(+), 151 deletions(-)
 delete mode 100644 boms/jaxb-runtime/pom.xml
 delete mode 100644 boms/pom.xml



[tomee] branch master updated (c167067 -> 6c680c4)

2019-08-14 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


from c167067  Bump Tomcat version to latest 9.0.22
 new 83a4050  Adding simple async servlet example
 new 8dc4ba5  Don't obtain the writer from the response when running async, 
and force the buffers to be nulled on recycle
 new e4d0a26  Improvements to this example
 new 6961b01  Update documentation
 new 6c680c4  Merge pull request #535 from jgallimore/simple-async-servlet

The 12745 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 examples/async-servlet/README.adoc |  55 
 .../{mp-config-example => async-servlet}/pom.xml   |  88 +++---
 .../java/org/superbiz/asyncservlet/CalcBean.java   |  27 ++
 .../org/superbiz/asyncservlet/CalcServlet.java | 175 
 .../java/org/superbiz/asyncservlet/CalcTest.java   | 301 +
 .../src/test/resources/arquillian.xml  |   1 -
 examples/pom.xml   |   1 +
 7 files changed, 606 insertions(+), 42 deletions(-)
 create mode 100644 examples/async-servlet/README.adoc
 copy examples/{mp-config-example => async-servlet}/pom.xml (61%)
 create mode 100644 
examples/async-servlet/src/main/java/org/superbiz/asyncservlet/CalcBean.java
 create mode 100644 
examples/async-servlet/src/main/java/org/superbiz/asyncservlet/CalcServlet.java
 create mode 100644 
examples/async-servlet/src/test/java/org/superbiz/asyncservlet/CalcTest.java
 copy examples/{mvc-cxf => async-servlet}/src/test/resources/arquillian.xml 
(94%)



[tomee] 04/05: Update JAXB to 2.3.1

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 0f4002a6849b4a4f9712a2ebf07bef70bb8cf719
Author: Jonathan Gallimore 
AuthorDate: Tue Aug 13 21:33:39 2019 +0100

Update JAXB to 2.3.1
---
 examples/groovy-cdi/pom.xml   | 2 +-
 examples/groovy-jpa/pom.xml   | 2 +-
 examples/groovy-spock/pom.xml | 2 +-
 pom.xml   | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/examples/groovy-cdi/pom.xml b/examples/groovy-cdi/pom.xml
index 62f2f51..9840e4c 100644
--- a/examples/groovy-cdi/pom.xml
+++ b/examples/groovy-cdi/pom.xml
@@ -87,7 +87,7 @@
 
   com.sun.xml.bind
   jaxb-impl
-  2.2.11
+  2.3.1
 
 
   junit
diff --git a/examples/groovy-jpa/pom.xml b/examples/groovy-jpa/pom.xml
index 98a5b07..c96eddc 100644
--- a/examples/groovy-jpa/pom.xml
+++ b/examples/groovy-jpa/pom.xml
@@ -88,7 +88,7 @@
 
   com.sun.xml.bind
   jaxb-impl
-  2.1.13
+  2.3.1
 
 
   junit
diff --git a/examples/groovy-spock/pom.xml b/examples/groovy-spock/pom.xml
index 38231ea..3106207 100644
--- a/examples/groovy-spock/pom.xml
+++ b/examples/groovy-spock/pom.xml
@@ -97,7 +97,7 @@
 
   com.sun.xml.bind
   jaxb-impl
-  2.1.13
+  2.3.1
 
 
   junit
diff --git a/pom.xml b/pom.xml
index 9042eea..c7e723e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1732,17 +1732,17 @@
   
 javax.xml.bind
 jaxb-api
-2.3.0
+2.3.1
   
   
 com.sun.xml.bind
 jaxb-impl
-2.3.0
+2.3.1
   
   
 com.sun.xml.bind
 jaxb-core
-2.3.0
+2.3.1
   

 org.fusesource.jansi



[tomee] 05/05: Revert "Update JAXB to 2.3.1"

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 31a4704929c63ded7fc4e1c0f20c5064a0c5fa62
Author: Jonathan Gallimore 
AuthorDate: Tue Aug 13 21:43:51 2019 +0100

Revert "Update JAXB to 2.3.1"

This reverts commit 0f4002a6849b4a4f9712a2ebf07bef70bb8cf719.
---
 examples/groovy-cdi/pom.xml   | 2 +-
 examples/groovy-jpa/pom.xml   | 2 +-
 examples/groovy-spock/pom.xml | 2 +-
 pom.xml   | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/examples/groovy-cdi/pom.xml b/examples/groovy-cdi/pom.xml
index 9840e4c..62f2f51 100644
--- a/examples/groovy-cdi/pom.xml
+++ b/examples/groovy-cdi/pom.xml
@@ -87,7 +87,7 @@
 
   com.sun.xml.bind
   jaxb-impl
-  2.3.1
+  2.2.11
 
 
   junit
diff --git a/examples/groovy-jpa/pom.xml b/examples/groovy-jpa/pom.xml
index c96eddc..98a5b07 100644
--- a/examples/groovy-jpa/pom.xml
+++ b/examples/groovy-jpa/pom.xml
@@ -88,7 +88,7 @@
 
   com.sun.xml.bind
   jaxb-impl
-  2.3.1
+  2.1.13
 
 
   junit
diff --git a/examples/groovy-spock/pom.xml b/examples/groovy-spock/pom.xml
index 3106207..38231ea 100644
--- a/examples/groovy-spock/pom.xml
+++ b/examples/groovy-spock/pom.xml
@@ -97,7 +97,7 @@
 
   com.sun.xml.bind
   jaxb-impl
-  2.3.1
+  2.1.13
 
 
   junit
diff --git a/pom.xml b/pom.xml
index c7e723e..9042eea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1732,17 +1732,17 @@
   
 javax.xml.bind
 jaxb-api
-2.3.1
+2.3.0
   
   
 com.sun.xml.bind
 jaxb-impl
-2.3.1
+2.3.0
   
   
 com.sun.xml.bind
 jaxb-core
-2.3.1
+2.3.0
   

 org.fusesource.jansi



[tomee] 03/05: Revert "Backport JAXB bom and 2.3.2"

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 4ae4d7f19fb6830c89b370be38d50f88dc590911
Author: Jonathan Gallimore 
AuthorDate: Tue Aug 13 21:31:11 2019 +0100

Revert "Backport JAXB bom and 2.3.2"

This reverts commit 57166e9c0c561d650819ddff2f1c8e9d81e6cf11.
---
 boms/jaxb-runtime/pom.xml  | 63 --
 boms/pom.xml   | 41 ---
 container/openejb-jee/pom.xml  | 16 ++--
 examples/groovy-cdi/pom.xml| 12 --
 examples/groovy-jpa/pom.xml| 12 --
 examples/groovy-spock/pom.xml  | 12 --
 examples/simple-stateful-callbacks/pom.xml |  6 ---
 pom.xml| 27 -
 server/openejb-client/pom.xml  | 13 --
 server/openejb-cxf/pom.xml |  9 +++--
 server/openejb-webservices/pom.xml | 13 --
 tomee/apache-tomee/pom.xml | 12 --
 tomee/tomee-webaccess/pom.xml  | 13 --
 13 files changed, 98 insertions(+), 151 deletions(-)

diff --git a/boms/jaxb-runtime/pom.xml b/boms/jaxb-runtime/pom.xml
deleted file mode 100644
index 581561a..000
--- a/boms/jaxb-runtime/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-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/maven-v4_0_0.xsd;>
-
-  
-org.apache.tomee.bom
-boms
-7.1.2-SNAPSHOT
-  
-
-  4.0.0
-  jaxb-runtime
-  pom
-  TomEE :: BOMs :: JAXB Runtime
-
-  
-
-  
-
-  jakarta.xml.bind
-  jakarta.xml.bind-api
-  2.3.2
-
-
-  org.glassfish.jaxb
-  jaxb-runtime
-  2.3.2
-  
- 
-  jakarta.activation
-  jakarta.activation-api
-
-  
-
-  
-
-
-
diff --git a/boms/pom.xml b/boms/pom.xml
deleted file mode 100644
index 615dbdd..000
--- a/boms/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-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/maven-v4_0_0.xsd;>
-
-  
-tomee-project
-org.apache.tomee
-7.1.2-SNAPSHOT
-  
-
-  4.0.0
-  org.apache.tomee.bom
-  boms
-  pom
-  TomEE :: BOMs
-
-  
-jaxb-runtime
-  
-
-
-
diff --git a/container/openejb-jee/pom.xml b/container/openejb-jee/pom.xml
index fd3980f..1c1b14c 100644
--- a/container/openejb-jee/pom.xml
+++ b/container/openejb-jee/pom.xml
@@ -59,9 +59,19 @@
   provided
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  pom
+  javax.xml.bind
+  jaxb-api
+  provided
+
+
+  com.sun.xml.bind
+  jaxb-impl
+  provided
+
+
+  com.sun.xml.bind
+  jaxb-core
+  provided
 
 
   junit
diff --git a/examples/groovy-cdi/pom.xml b/examples/groovy-cdi/pom.xml
index 29aada3..62f2f51 100644
--- a/examples/groovy-cdi/pom.xml
+++ b/examples/groovy-cdi/pom.xml
@@ -80,10 +80,14 @@
   2.4.8
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  7.1.2-SNAPSHOT
-  pom
+  org.apache.geronimo.specs
+  geronimo-jaxb_2.2_spec
+  1.0.1
+
+
+  com.sun.xml.bind
+  jaxb-impl
+  2.2.11
 
 
   junit
diff --git a/examples/groovy-jpa/pom.xml b/examples/groovy-jpa/pom.xml
index 5c97790..98a5b07 100644
--- a/examples/groovy-jpa/pom.xml
+++ b/examples/groovy-jpa/pom.xml
@@ -81,10 +81,14 @@
   2.4.8
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  7.1.2-SNAPSHOT
-  pom
+  org.apache.geronimo.specs
+  geronimo-jaxb_2.2_spec
+  1.0.1
+
+
+  com.sun.xml.bind
+  jaxb-impl
+  2.1.13
 
 
   junit
diff --git a/examples/groovy-spock/pom.xml b/examples/groovy-spock/pom.xml
index 20c4e47..38231ea 100644
--- a/examples/groovy-spock/pom.xml
+++ b/examples/groovy-spock/pom.xml
@@ -90,10 +90,14 @@
   2.4.8
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  7.1.2-SNAPSHOT
-  pom
+  org.apache.geronimo.specs
+  geronimo-jaxb_2.2_spec
+  1.0.1
+
+
+  com.sun.xml.bind
+  jaxb-impl
+  2.1.13
 
 
   junit
diff --git a/examples/simple-stateful-callbacks/pom.xml 
b/examples/simple-stateful-callbacks/pom.xml
index 8e78241..6e158cb 100644
--- a/examples/simple-stateful-callbacks/pom.xml
+++ b/examples/simple-stateful-callbacks/pom.xml
@@ -58,12 +58,6 @@
   provided
 
 
-  org.apache.tomee.bom
-  jaxb-runtime
-  7.1.2-SNAPSHOT
-  pom
-
-
   junit
   junit
   4.12
diff --git a/pom.xml b/pom.xml
index c3c7849..9042eea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -509,7 +509,6 @@
   

[tomee] 02/05: Revert "Fix compile error"

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 90dbea19d77ee80af6b740eafaf901e7d984e8eb
Author: Jonathan Gallimore 
AuthorDate: Tue Aug 13 21:31:01 2019 +0100

Revert "Fix compile error"

This reverts commit ef739785deb5de1279bc3a5905c4c6bed02f8de5.
---
 server/openejb-cxf/pom.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/server/openejb-cxf/pom.xml b/server/openejb-cxf/pom.xml
index 17a3a78..4f16881 100644
--- a/server/openejb-cxf/pom.xml
+++ b/server/openejb-cxf/pom.xml
@@ -127,6 +127,10 @@
   pom
 
 
+  com.sun.xml.bind
+  jaxb-core
+
+
   org.apache.cxf
   cxf-rt-frontend-jaxws
   ${cxf.version}



[tomee] branch tomee-7.0.x updated (2def9c4 -> 31a4704)

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.0.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from 2def9c4  Correcting versions after backport
 new cc1b5f4  Revert "Correcting versions after backport"
 new 90dbea1  Revert "Fix compile error"
 new 4ae4d7f  Revert "Backport JAXB bom and 2.3.2"
 new 0f4002a  Update JAXB to 2.3.1
 new 31a4704  Revert "Update JAXB to 2.3.1"

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 boms/jaxb-runtime/pom.xml  | 63 --
 boms/pom.xml   | 41 ---
 container/openejb-jee/pom.xml  | 16 ++--
 examples/groovy-cdi/pom.xml| 12 --
 examples/groovy-jpa/pom.xml| 12 --
 examples/groovy-spock/pom.xml  | 12 --
 examples/simple-stateful-callbacks/pom.xml |  6 ---
 pom.xml| 27 -
 server/openejb-client/pom.xml  | 13 --
 server/openejb-cxf/pom.xml | 13 --
 server/openejb-webservices/pom.xml | 13 --
 tomee/apache-tomee/pom.xml | 12 --
 tomee/tomee-webaccess/pom.xml  | 13 --
 13 files changed, 102 insertions(+), 151 deletions(-)
 delete mode 100644 boms/jaxb-runtime/pom.xml
 delete mode 100644 boms/pom.xml



[tomee] 01/02: Backport JAXB bom and 2.3.2

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 57166e9c0c561d650819ddff2f1c8e9d81e6cf11
Author: Jonathan Gallimore 
AuthorDate: Tue Aug 13 20:20:50 2019 +0100

Backport JAXB bom and 2.3.2
---
 boms/jaxb-runtime/pom.xml  | 63 ++
 boms/pom.xml   | 41 +++
 container/openejb-jee/pom.xml  | 16 ++--
 examples/groovy-cdi/pom.xml| 12 ++
 examples/groovy-jpa/pom.xml| 12 ++
 examples/groovy-spock/pom.xml  | 12 ++
 examples/simple-stateful-callbacks/pom.xml |  6 +++
 pom.xml| 27 +
 server/openejb-client/pom.xml  | 13 ++
 server/openejb-cxf/pom.xml |  9 ++---
 server/openejb-webservices/pom.xml | 13 ++
 tomee/apache-tomee/pom.xml | 12 ++
 tomee/tomee-webaccess/pom.xml  | 13 ++
 13 files changed, 151 insertions(+), 98 deletions(-)

diff --git a/boms/jaxb-runtime/pom.xml b/boms/jaxb-runtime/pom.xml
new file mode 100644
index 000..581561a
--- /dev/null
+++ b/boms/jaxb-runtime/pom.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+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/maven-v4_0_0.xsd;>
+
+  
+org.apache.tomee.bom
+boms
+7.1.2-SNAPSHOT
+  
+
+  4.0.0
+  jaxb-runtime
+  pom
+  TomEE :: BOMs :: JAXB Runtime
+
+  
+
+  
+
+  jakarta.xml.bind
+  jakarta.xml.bind-api
+  2.3.2
+
+
+  org.glassfish.jaxb
+  jaxb-runtime
+  2.3.2
+  
+ 
+  jakarta.activation
+  jakarta.activation-api
+
+  
+
+  
+
+
+
diff --git a/boms/pom.xml b/boms/pom.xml
new file mode 100644
index 000..615dbdd
--- /dev/null
+++ b/boms/pom.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+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/maven-v4_0_0.xsd;>
+
+  
+tomee-project
+org.apache.tomee
+7.1.2-SNAPSHOT
+  
+
+  4.0.0
+  org.apache.tomee.bom
+  boms
+  pom
+  TomEE :: BOMs
+
+  
+jaxb-runtime
+  
+
+
+
diff --git a/container/openejb-jee/pom.xml b/container/openejb-jee/pom.xml
index 1c1b14c..fd3980f 100644
--- a/container/openejb-jee/pom.xml
+++ b/container/openejb-jee/pom.xml
@@ -59,19 +59,9 @@
   provided
 
 
-  javax.xml.bind
-  jaxb-api
-  provided
-
-
-  com.sun.xml.bind
-  jaxb-impl
-  provided
-
-
-  com.sun.xml.bind
-  jaxb-core
-  provided
+  org.apache.tomee.bom
+  jaxb-runtime
+  pom
 
 
   junit
diff --git a/examples/groovy-cdi/pom.xml b/examples/groovy-cdi/pom.xml
index 62f2f51..29aada3 100644
--- a/examples/groovy-cdi/pom.xml
+++ b/examples/groovy-cdi/pom.xml
@@ -80,14 +80,10 @@
   2.4.8
 
 
-  org.apache.geronimo.specs
-  geronimo-jaxb_2.2_spec
-  1.0.1
-
-
-  com.sun.xml.bind
-  jaxb-impl
-  2.2.11
+  org.apache.tomee.bom
+  jaxb-runtime
+  7.1.2-SNAPSHOT
+  pom
 
 
   junit
diff --git a/examples/groovy-jpa/pom.xml b/examples/groovy-jpa/pom.xml
index 98a5b07..5c97790 100644
--- a/examples/groovy-jpa/pom.xml
+++ b/examples/groovy-jpa/pom.xml
@@ -81,14 +81,10 @@
   2.4.8
 
 
-  org.apache.geronimo.specs
-  geronimo-jaxb_2.2_spec
-  1.0.1
-
-
-  com.sun.xml.bind
-  jaxb-impl
-  2.1.13
+  org.apache.tomee.bom
+  jaxb-runtime
+  7.1.2-SNAPSHOT
+  pom
 
 
   junit
diff --git a/examples/groovy-spock/pom.xml b/examples/groovy-spock/pom.xml
index 38231ea..20c4e47 100644
--- a/examples/groovy-spock/pom.xml
+++ b/examples/groovy-spock/pom.xml
@@ -90,14 +90,10 @@
   2.4.8
 
 
-  org.apache.geronimo.specs
-  geronimo-jaxb_2.2_spec
-  1.0.1
-
-
-  com.sun.xml.bind
-  jaxb-impl
-  2.1.13
+  org.apache.tomee.bom
+  jaxb-runtime
+  7.1.2-SNAPSHOT
+  pom
 
 
   junit
diff --git a/examples/simple-stateful-callbacks/pom.xml 
b/examples/simple-stateful-callbacks/pom.xml
index 6e158cb..8e78241 100644
--- a/examples/simple-stateful-callbacks/pom.xml
+++ b/examples/simple-stateful-callbacks/pom.xml
@@ -58,6 +58,12 @@
   provided
 
 
+  org.apache.tomee.bom
+  jaxb-runtime
+  7.1.2-SNAPSHOT
+  pom
+
+
   junit
   junit
   4.12
diff --git a/pom.xml b/pom.xml
index 9042eea..c3c7849 100644
--- a/pom.xml
+++ b/pom.xml
@@ -509,6 +509,7 @@
 true
   
   
+boms
 itests
 maven
 gradle
@@ -537,6 +5

[tomee] branch tomee-7.0.x updated (b7078ad -> ef73978)

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.0.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from b7078ad  Update CXF and Tomcat to latest versions
 new 57166e9  Backport JAXB bom and 2.3.2
 new ef73978  Fix compile error

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../jaxb-runtime}/pom.xml  | 51 +++---
 {assembly => boms}/pom.xml | 18 +---
 container/openejb-jee/pom.xml  | 16 ++-
 examples/groovy-cdi/pom.xml| 12 ++---
 examples/groovy-jpa/pom.xml| 12 ++---
 examples/groovy-spock/pom.xml  | 12 ++---
 examples/simple-stateful-callbacks/pom.xml |  6 +++
 pom.xml| 27 +---
 server/openejb-client/pom.xml  | 13 ++
 server/openejb-cxf/pom.xml | 13 ++
 server/openejb-webservices/pom.xml | 13 ++
 tomee/apache-tomee/pom.xml | 12 ++---
 tomee/tomee-webaccess/pom.xml  | 13 ++
 13 files changed, 83 insertions(+), 135 deletions(-)
 copy {itests/openejb-itests-web => boms/jaxb-runtime}/pom.xml (61%)
 copy {assembly => boms}/pom.xml (82%)



[tomee] 02/02: Fix compile error

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit ef739785deb5de1279bc3a5905c4c6bed02f8de5
Author: Jonathan Gallimore 
AuthorDate: Tue Aug 13 20:51:00 2019 +0100

Fix compile error
---
 server/openejb-cxf/pom.xml | 4 
 1 file changed, 4 deletions(-)

diff --git a/server/openejb-cxf/pom.xml b/server/openejb-cxf/pom.xml
index 4f16881..17a3a78 100644
--- a/server/openejb-cxf/pom.xml
+++ b/server/openejb-cxf/pom.xml
@@ -127,10 +127,6 @@
   pom
 
 
-  com.sun.xml.bind
-  jaxb-core
-
-
   org.apache.cxf
   cxf-rt-frontend-jaxws
   ${cxf.version}



[tomee] 01/02: Backport JAXB bom and 2.3.2

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 73ef5a7d3ecca2fdd89ccfc0c96bf36bd3cf174b
Author: Jonathan Gallimore 
AuthorDate: Tue Aug 13 20:20:50 2019 +0100

Backport JAXB bom and 2.3.2
---
 boms/jaxb-runtime/pom.xml  | 63 ++
 boms/pom.xml   | 41 +++
 container/openejb-jee/pom.xml  | 16 ++--
 examples/groovy-cdi/pom.xml| 12 ++
 examples/groovy-jpa/pom.xml| 12 ++
 examples/groovy-spock/pom.xml  | 12 ++
 examples/simple-stateful-callbacks/pom.xml |  6 +++
 pom.xml| 27 +
 server/openejb-client/pom.xml  | 13 ++
 server/openejb-cxf/pom.xml |  9 ++---
 server/openejb-webservices/pom.xml | 13 ++
 tomee/apache-tomee/pom.xml | 12 ++
 tomee/tomee-webaccess/pom.xml  | 13 ++
 13 files changed, 151 insertions(+), 98 deletions(-)

diff --git a/boms/jaxb-runtime/pom.xml b/boms/jaxb-runtime/pom.xml
new file mode 100644
index 000..581561a
--- /dev/null
+++ b/boms/jaxb-runtime/pom.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+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/maven-v4_0_0.xsd;>
+
+  
+org.apache.tomee.bom
+boms
+7.1.2-SNAPSHOT
+  
+
+  4.0.0
+  jaxb-runtime
+  pom
+  TomEE :: BOMs :: JAXB Runtime
+
+  
+
+  
+
+  jakarta.xml.bind
+  jakarta.xml.bind-api
+  2.3.2
+
+
+  org.glassfish.jaxb
+  jaxb-runtime
+  2.3.2
+  
+ 
+  jakarta.activation
+  jakarta.activation-api
+
+  
+
+  
+
+
+
diff --git a/boms/pom.xml b/boms/pom.xml
new file mode 100644
index 000..615dbdd
--- /dev/null
+++ b/boms/pom.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+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/maven-v4_0_0.xsd;>
+
+  
+tomee-project
+org.apache.tomee
+7.1.2-SNAPSHOT
+  
+
+  4.0.0
+  org.apache.tomee.bom
+  boms
+  pom
+  TomEE :: BOMs
+
+  
+jaxb-runtime
+  
+
+
+
diff --git a/container/openejb-jee/pom.xml b/container/openejb-jee/pom.xml
index 3e29c1e..1c6c9e1 100644
--- a/container/openejb-jee/pom.xml
+++ b/container/openejb-jee/pom.xml
@@ -59,19 +59,9 @@
   provided
 
 
-  javax.xml.bind
-  jaxb-api
-  provided
-
-
-  com.sun.xml.bind
-  jaxb-impl
-  provided
-
-
-  com.sun.xml.bind
-  jaxb-core
-  provided
+  org.apache.tomee.bom
+  jaxb-runtime
+  pom
 
 
   junit
diff --git a/examples/groovy-cdi/pom.xml b/examples/groovy-cdi/pom.xml
index 07cf891..a87f8bd 100644
--- a/examples/groovy-cdi/pom.xml
+++ b/examples/groovy-cdi/pom.xml
@@ -80,14 +80,10 @@
   2.4.8
 
 
-  org.apache.geronimo.specs
-  geronimo-jaxb_2.2_spec
-  1.0.1
-
-
-  com.sun.xml.bind
-  jaxb-impl
-  2.2.11
+  org.apache.tomee.bom
+  jaxb-runtime
+  7.1.2-SNAPSHOT
+  pom
 
 
   junit
diff --git a/examples/groovy-jpa/pom.xml b/examples/groovy-jpa/pom.xml
index 4f819f7..f51655b 100644
--- a/examples/groovy-jpa/pom.xml
+++ b/examples/groovy-jpa/pom.xml
@@ -81,14 +81,10 @@
   2.4.8
 
 
-  org.apache.geronimo.specs
-  geronimo-jaxb_2.2_spec
-  1.0.1
-
-
-  com.sun.xml.bind
-  jaxb-impl
-  2.1.13
+  org.apache.tomee.bom
+  jaxb-runtime
+  7.1.2-SNAPSHOT
+  pom
 
 
   junit
diff --git a/examples/groovy-spock/pom.xml b/examples/groovy-spock/pom.xml
index 5ea8ba1..578449e 100644
--- a/examples/groovy-spock/pom.xml
+++ b/examples/groovy-spock/pom.xml
@@ -90,14 +90,10 @@
   2.4.8
 
 
-  org.apache.geronimo.specs
-  geronimo-jaxb_2.2_spec
-  1.0.1
-
-
-  com.sun.xml.bind
-  jaxb-impl
-  2.1.13
+  org.apache.tomee.bom
+  jaxb-runtime
+  7.1.2-SNAPSHOT
+  pom
 
 
   junit
diff --git a/examples/simple-stateful-callbacks/pom.xml 
b/examples/simple-stateful-callbacks/pom.xml
index 8e02250..93b5695 100644
--- a/examples/simple-stateful-callbacks/pom.xml
+++ b/examples/simple-stateful-callbacks/pom.xml
@@ -58,6 +58,12 @@
   provided
 
 
+  org.apache.tomee.bom
+  jaxb-runtime
+  7.1.2-SNAPSHOT
+  pom
+
+
   junit
   junit
   4.12
diff --git a/pom.xml b/pom.xml
index 0a70f8b..1e2cc42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -523,6 +523,7 @@
 true
   
   
+boms
 itests
 maven
 gradle
@@ -552,6 +5

[tomee] branch tomee-7.1.x updated (98aaffc -> 608eed2)

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.1.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from 98aaffc  Update CXF and Tomcat to latest versions
 new 73ef5a7  Backport JAXB bom and 2.3.2
 new 608eed2  Fix compile error

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../jaxb-runtime}/pom.xml  | 49 +++---
 {assembly => boms}/pom.xml | 16 ---
 container/openejb-jee/pom.xml  | 16 ++-
 examples/groovy-cdi/pom.xml| 12 ++
 examples/groovy-jpa/pom.xml| 12 ++
 examples/groovy-spock/pom.xml  | 12 ++
 examples/simple-stateful-callbacks/pom.xml |  6 +++
 pom.xml| 27 +---
 server/openejb-client/pom.xml  | 13 ++
 server/openejb-cxf/pom.xml | 13 ++
 server/openejb-webservices/pom.xml | 13 ++
 tomee/apache-tomee/pom.xml | 12 ++
 tomee/tomee-webaccess/pom.xml  | 13 ++
 13 files changed, 81 insertions(+), 133 deletions(-)
 copy {itests/openejb-itests-web => boms/jaxb-runtime}/pom.xml (63%)
 copy {assembly => boms}/pom.xml (84%)



[tomee] 02/02: Fix compile error

2019-08-13 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 608eed2e8edc7c2b6b54666dcb83d9f9df762ac7
Author: Jonathan Gallimore 
AuthorDate: Tue Aug 13 20:51:00 2019 +0100

Fix compile error
---
 server/openejb-cxf/pom.xml | 4 
 1 file changed, 4 deletions(-)

diff --git a/server/openejb-cxf/pom.xml b/server/openejb-cxf/pom.xml
index a73f601..b266650 100644
--- a/server/openejb-cxf/pom.xml
+++ b/server/openejb-cxf/pom.xml
@@ -127,10 +127,6 @@
   pom
 
 
-  com.sun.xml.bind
-  jaxb-core
-
-
   org.apache.cxf
   cxf-rt-frontend-jaxws
   ${cxf.version}



[tomee] annotated tag tomee-7.1.1 created (now 7ccf128)

2019-08-12 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to annotated tag tomee-7.1.1
in repository https://gitbox.apache.org/repos/asf/tomee.git.


  at 7ccf128  (tag)
 tagging 5e12690858aea5623658f24c645bc08d4253551c (commit)
 replaces tomee-7.1.0
  by Jonathan Gallimore
  on Wed Jun 5 21:55:41 2019 +0100

- Log -
[maven-release-plugin] copy for tag tomee-7.1.1
---

No new revisions were added by this update.



[tomee] annotated tag tomee-7.0.6 created (now 4ce8e24)

2019-08-12 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to annotated tag tomee-7.0.6
in repository https://gitbox.apache.org/repos/asf/tomee.git.


  at 4ce8e24  (tag)
 tagging 25195ee9b994b6eb4463597277edf8d07ba891a7 (commit)
 replaces tomee-7.0.5
  by Jonathan Gallimore
  on Thu Jun 6 09:48:30 2019 +0100

- Log -
[maven-release-plugin] copy for tag tomee-7.0.6
---

No new revisions were added by this update.



[tomee] branch master updated: Prevent javamail being included twice

2019-08-05 Thread jgallimore
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 ec078e4  Prevent javamail being included twice
 new e211993  Merge branch 'master' of github.com:apache/tomee
ec078e4 is described below

commit ec078e44f18aba7b186a2b5569c99f1efc5168fb
Author: Jonathan Gallimore 
AuthorDate: Mon Aug 5 14:28:27 2019 +0100

Prevent javamail being included twice
---
 .../tomee-microprofile-webapp/src/main/assembly/war.xml | 2 ++
 tomee/tomee-plume-webapp/src/main/assembly/war.xml  | 2 ++
 tomee/tomee-plus-webapp/src/main/assembly/war.xml   | 2 ++
 3 files changed, 6 insertions(+)

diff --git 
a/tomee/tomee-microprofile/tomee-microprofile-webapp/src/main/assembly/war.xml 
b/tomee/tomee-microprofile/tomee-microprofile-webapp/src/main/assembly/war.xml
index 9a7ba10..9c2b63f 100644
--- 
a/tomee/tomee-microprofile/tomee-microprofile-webapp/src/main/assembly/war.xml
+++ 
b/tomee/tomee-microprofile/tomee-microprofile-webapp/src/main/assembly/war.xml
@@ -77,6 +77,8 @@
 
 *:war
 *:pom
+org.apache.geronimo.specs:geronimo-javamail_1.5_spec
+
org.apache.geronimo.javamail:geronimo-javamail_1.5_mail
   
 
 
diff --git a/tomee/tomee-plume-webapp/src/main/assembly/war.xml 
b/tomee/tomee-plume-webapp/src/main/assembly/war.xml
index a87a364..ca97890 100644
--- a/tomee/tomee-plume-webapp/src/main/assembly/war.xml
+++ b/tomee/tomee-plume-webapp/src/main/assembly/war.xml
@@ -89,6 +89,8 @@
 
 *:war
 *:pom
+org.apache.geronimo.specs:geronimo-javamail_1.5_spec
+
org.apache.geronimo.javamail:geronimo-javamail_1.5_mail
   
 
 
diff --git a/tomee/tomee-plus-webapp/src/main/assembly/war.xml 
b/tomee/tomee-plus-webapp/src/main/assembly/war.xml
index 77ece96..a229ffb 100644
--- a/tomee/tomee-plus-webapp/src/main/assembly/war.xml
+++ b/tomee/tomee-plus-webapp/src/main/assembly/war.xml
@@ -84,6 +84,8 @@
 
 *:war
 *:pom
+org.apache.geronimo.specs:geronimo-javamail_1.5_spec
+
org.apache.geronimo.javamail:geronimo-javamail_1.5_mail
   
 
 



[tomee] branch tomee-7.1.x updated: Update CXF and Tomcat to latest versions

2019-07-25 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.1.x by this push:
 new 98aaffc  Update CXF and Tomcat to latest versions
98aaffc is described below

commit 98aaffc3811672a4d4c57ffecbcf8f4b11466261
Author: Jonathan Gallimore 
AuthorDate: Wed Jul 24 16:41:23 2019 +0100

Update CXF and Tomcat to latest versions
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4e5a10b..0a70f8b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -132,9 +132,9 @@
 2.0.0
 1.2.6
 
-8.5.42
+8.5.43
 
-3.1.17
+3.1.18
 1.2.6
 2.0.0
 1.1.13.Final



[tomee] branch tomee-7.0.x updated: Update CXF and Tomcat to latest versions

2019-07-25 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.0.x by this push:
 new b7078ad  Update CXF and Tomcat to latest versions
b7078ad is described below

commit b7078ad4f8ec448aaa11bf67dd3da26a8d13beb4
Author: Jonathan Gallimore 
AuthorDate: Wed Jul 24 16:41:23 2019 +0100

Update CXF and Tomcat to latest versions
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3fdf508..9042eea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -131,9 +131,9 @@
 2.0.0
 1.2.6
 
-8.5.42
+8.5.43
 
-3.1.17
+3.1.18
 1.2.6
 2.0.0
 1.1.13.Final



[tomee] branch tomee-7.0.x updated: Missed on previous commit

2019-07-24 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.0.x by this push:
 new ca556c4  Missed on previous commit
ca556c4 is described below

commit ca556c421a64afa9ecc215183771924fa2cfbc00
Author: Jonathan Gallimore 
AuthorDate: Wed Jul 24 16:34:58 2019 +0100

Missed on previous commit
---
 .../arquillian/tests/cmp/sample/custom-orm.xml |  6 +--
 .../arquillian/tests/cmp/sample/ejb-jar.xml| 52 +--
 .../openejb/arquillian/tests/cmp/sample/web.xml|  4 +-
 arquillian/arquillian-tomee-tests/pom.xml  | 58 ++
 4 files changed, 89 insertions(+), 31 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
index 22dbae5..2605550 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
@@ -16,7 +16,7 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-http://java.sun.com/xml/ns/persistence/orm; 
version="1.0">
+http://java.sun.com/xml/ns/persistence/orm; 
version="2.0">
 
 CustomOrmXmlTest#MovieBean
 
@@ -31,7 +31,7 @@
 
 
 
-
+
 
 
 
@@ -47,7 +47,7 @@
 
 
 
-
+
 
 
 
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
index 8b39053..9e32d43 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
@@ -21,31 +21,31 @@
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd;>
   RosterJAR
   
-
-  RosterBean
-  
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessHome
-  
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusiness
-  
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessBean
-  Stateless
-  Container
-  
-ejb/Actor
-Entity
-
org.apache.openejb.arquillian.tests.cmp.sample.LocalActorHome
-
org.apache.openejb.arquillian.tests.cmp.sample.LocalActor
-ActorBean
-  
-  
-ejb/Movie
-Entity
-
org.apache.openejb.arquillian.tests.cmp.sample.LocalMovieHome
-
org.apache.openejb.arquillian.tests.cmp.sample.LocalMovie
-MovieBean
-  
-  
-
-  
-
+  
+MoviesBean
+
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessHome
+
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusiness
+
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessBean
+Stateless
+Container
+
+  ejb/Actor
+  Entity
+  
org.apache.openejb.arquillian.tests.cmp.sample.LocalActorHome
+  org.apache.openejb.arquillian.tests.cmp.sample.LocalActor
+  ActorBean
+
+
+  ejb/Movie
+  Entity
+  
org.apache.openejb.arquillian.tests.cmp.sample.LocalMovieHome
+  org.apache.openejb.arquillian.tests.cmp.sample.LocalMovie
+  MovieBean
+
+
+  
+
+  
 
   MovieBean
   
org.apache.openejb.arquillian.tests.cmp.sample.LocalMovieHome
@@ -138,7 +138,7 @@
   
 
   
-RosterBean
+MoviesBean
 Remote
 *
   
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
index 68cbacb..03de133 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofil

[tomee] branch tomee-7.1.x updated: Changes missed on previous commit

2019-07-24 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.1.x by this push:
 new 9e2c27e  Changes missed on previous commit
9e2c27e is described below

commit 9e2c27e0f3ab99481102987bcb85938cd0712a3f
Author: Jonathan Gallimore 
AuthorDate: Wed Jul 24 16:17:35 2019 +0100

Changes missed on previous commit
---
 .../arquillian/tests/cmp/sample/custom-orm.xml |  6 +--
 .../arquillian/tests/cmp/sample/ejb-jar.xml| 52 +--
 .../openejb/arquillian/tests/cmp/sample/web.xml|  4 +-
 arquillian/arquillian-tomee-tests/pom.xml  | 58 ++
 4 files changed, 89 insertions(+), 31 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
index 22dbae5..2605550 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
@@ -16,7 +16,7 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-http://java.sun.com/xml/ns/persistence/orm; 
version="1.0">
+http://java.sun.com/xml/ns/persistence/orm; 
version="2.0">
 
 CustomOrmXmlTest#MovieBean
 
@@ -31,7 +31,7 @@
 
 
 
-
+
 
 
 
@@ -47,7 +47,7 @@
 
 
 
-
+
 
 
 
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
index 8b39053..9e32d43 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
@@ -21,31 +21,31 @@
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd;>
   RosterJAR
   
-
-  RosterBean
-  
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessHome
-  
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusiness
-  
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessBean
-  Stateless
-  Container
-  
-ejb/Actor
-Entity
-
org.apache.openejb.arquillian.tests.cmp.sample.LocalActorHome
-
org.apache.openejb.arquillian.tests.cmp.sample.LocalActor
-ActorBean
-  
-  
-ejb/Movie
-Entity
-
org.apache.openejb.arquillian.tests.cmp.sample.LocalMovieHome
-
org.apache.openejb.arquillian.tests.cmp.sample.LocalMovie
-MovieBean
-  
-  
-
-  
-
+  
+MoviesBean
+
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessHome
+
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusiness
+
org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessBean
+Stateless
+Container
+
+  ejb/Actor
+  Entity
+  
org.apache.openejb.arquillian.tests.cmp.sample.LocalActorHome
+  org.apache.openejb.arquillian.tests.cmp.sample.LocalActor
+  ActorBean
+
+
+  ejb/Movie
+  Entity
+  
org.apache.openejb.arquillian.tests.cmp.sample.LocalMovieHome
+  org.apache.openejb.arquillian.tests.cmp.sample.LocalMovie
+  MovieBean
+
+
+  
+
+  
 
   MovieBean
   
org.apache.openejb.arquillian.tests.cmp.sample.LocalMovieHome
@@ -138,7 +138,7 @@
   
 
   
-RosterBean
+MoviesBean
 Remote
 *
   
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
index 68cbacb..03de133 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tome

[tomee] branch tomee-7.0.x updated: Checkstyle

2019-07-24 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.0.x by this push:
 new f9e3813  Checkstyle
f9e3813 is described below

commit f9e381377f2645b1eb1d56b30404ba06cca6324c
Author: Jonathan Gallimore 
AuthorDate: Wed Jul 24 14:08:35 2019 +0100

Checkstyle
---
 .../src/main/java/org/apache/openejb/config/CmpJpaConversion.java| 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
index 0e9d067..7c68a2f 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
@@ -77,7 +77,6 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Properties;
 import java.util.Set;
 import java.util.TreeMap;



[tomee] branch tomee-7.0.x updated: Tweaking for Java 7

2019-07-24 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.0.x by this push:
 new 4a81bd3  Tweaking for Java 7
4a81bd3 is described below

commit 4a81bd34fe84f76deaf6f0ab8c51bf13950a7242
Author: Jonathan Gallimore 
AuthorDate: Wed Jul 24 12:12:08 2019 +0100

Tweaking for Java 7
---
 .../src/main/java/org/apache/openejb/config/CmpJpaConversion.java | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
index 71ea091..0e9d067 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
@@ -78,7 +78,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
-import java.util.Optional;
 import java.util.Properties;
 import java.util.Set;
 import java.util.TreeMap;
@@ -110,7 +109,7 @@ class CmpJpaConversion implements DynamicDeployer {
 
 try {
 final URL url = new ResourceFinder("", 
appModule.getClassLoader()).getResource(location);
-if (Objects.isNull(url)) {
+if (url == null) {
 return null;
 }
 return (EntityMappings) JaxbJavaee.unmarshal(EntityMappings.class, 
IO.read(url));
@@ -275,11 +274,12 @@ class CmpJpaConversion implements DynamicDeployer {
 
 private String getPersistenceModuleId(final AppModule appModule) {
 if (appModule.getModuleId() != null) {
-return 
Optional.ofNullable(appModule.getModuleUri().toString()).orElse(appModule.getModuleId());
+return appModule.getModuleUri() != null ? 
appModule.getModuleUri().toString() : appModule.getModuleId();
 }
+
 for (final EjbModule ejbModule : appModule.getEjbModules()) {
 if (ejbModule.getModuleId() != null) {
-return 
Optional.ofNullable(ejbModule.getModuleUri().toString()).orElse(ejbModule.getModuleId());
+return ejbModule.getModuleUri() != null ? 
ejbModule.getModuleUri().toString() : ejbModule.getModuleId();
 }
 }
 throw new IllegalStateException("Comp must be in an ejb module, this 
one has none: " + appModule);



[tomee] branch tomee-7.1.x updated: Syncing CMP/JPA code up with master

2019-07-24 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.1.x by this push:
 new b9081e4  Syncing CMP/JPA code up with master
b9081e4 is described below

commit b9081e46f93322e8badedd936717789701533af5
Author: Jonathan Gallimore 
AuthorDate: Wed Jul 24 11:01:46 2019 +0100

Syncing CMP/JPA code up with master
---
 .../tests/cmp/sample/CustomOrmXmlCastTest.java |  76 +++
 .../tests/cmp/sample/CustomOrmXmlEarTest.java  |  90 +
 .../cmp/sample/CustomOrmXmlHibernateEarTest.java   | 106 +
 .../tests/cmp/sample/MoviesServlet2.java   |  89 +
 .../arquillian/tests/cmp/sample/application.xml|  12 +++
 .../tests/cmp/sample/persistence-hibernate.xml |  32 +++
 .../apache/openejb/config/CmpJpaConversion.java| 106 -
 7 files changed, 464 insertions(+), 47 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
new file mode 100644
index 000..af88bd9
--- /dev/null
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.arquillian.tests.cmp.sample;
+
+import org.apache.ziplock.IO;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+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 java.net.URL;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@RunWith(Arquillian.class)
+public class CustomOrmXmlCastTest {
+
+@ArquillianResource
+private URL url;
+
+@Deployment(testable = false)
+public static WebArchive createDeployment() {
+final WebArchive archive = ShrinkWrap.create(WebArchive.class, 
CustomOrmXmlCastTest.class.getSimpleName() + ".war")
+.addClasses(ActorBean.class, ActorDetails.class, 
LocalActor.class, LocalActorHome.class,
+LocalMovie.class, LocalMovieHome.class, 
MovieBean.class, MovieDetails.class,
+MoviesBusiness.class, MoviesBusinessBean.class, 
MoviesBusinessHome.class, MoviesServlet.class,
+MoviesServlet2.class)
+.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"),
 "META-INF/custom-orm.xml")
+.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"),
 "META-INF/persistence.xml")
+.addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"),
 "openejb-jar.xml")
+.addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), 
"ejb-jar.xml")
+.addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/web.xml"), 
"web.xml");
+
+System.out.println(archive.toString(true));
+return archive;
+}
+
+@Test
+@RunAsClient
+public void checkCmpJpaEntityORMMappings() throws Exception {
+final String output = IO.slurp(new URL(url.toExternalForm()));
+System.out.println(output);
+
+Assert.assertTrue(output.contains("TABLE_NAME: ACTOR, COLU

[tomee] branch tomee-7.0.x updated: Syncing CMP/JPA code up with master

2019-07-24 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/tomee-7.0.x by this push:
 new 02b9b4e  Syncing CMP/JPA code up with master
02b9b4e is described below

commit 02b9b4e201d9e69975649b7385a1b6a2b5ec73c4
Author: Jonathan Gallimore 
AuthorDate: Wed Jul 24 11:01:46 2019 +0100

Syncing CMP/JPA code up with master
---
 .../tests/cmp/sample/CustomOrmXmlCastTest.java |  76 +++
 .../tests/cmp/sample/CustomOrmXmlEarTest.java  |  90 +
 .../cmp/sample/CustomOrmXmlHibernateEarTest.java   | 106 +
 .../tests/cmp/sample/MoviesServlet2.java   |  89 +
 .../arquillian/tests/cmp/sample/application.xml|  12 +++
 .../tests/cmp/sample/persistence-hibernate.xml |  32 +++
 .../apache/openejb/config/CmpJpaConversion.java|  75 ---
 7 files changed, 448 insertions(+), 32 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
new file mode 100644
index 000..af88bd9
--- /dev/null
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.arquillian.tests.cmp.sample;
+
+import org.apache.ziplock.IO;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+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 java.net.URL;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@RunWith(Arquillian.class)
+public class CustomOrmXmlCastTest {
+
+@ArquillianResource
+private URL url;
+
+@Deployment(testable = false)
+public static WebArchive createDeployment() {
+final WebArchive archive = ShrinkWrap.create(WebArchive.class, 
CustomOrmXmlCastTest.class.getSimpleName() + ".war")
+.addClasses(ActorBean.class, ActorDetails.class, 
LocalActor.class, LocalActorHome.class,
+LocalMovie.class, LocalMovieHome.class, 
MovieBean.class, MovieDetails.class,
+MoviesBusiness.class, MoviesBusinessBean.class, 
MoviesBusinessHome.class, MoviesServlet.class,
+MoviesServlet2.class)
+.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"),
 "META-INF/custom-orm.xml")
+.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"),
 "META-INF/persistence.xml")
+.addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"),
 "openejb-jar.xml")
+.addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), 
"ejb-jar.xml")
+.addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/web.xml"), 
"web.xml");
+
+System.out.println(archive.toString(true));
+return archive;
+}
+
+@Test
+@RunAsClient
+public void checkCmpJpaEntityORMMappings() throws Exception {
+final String output = IO.slurp(new URL(url.toExternalForm()));
+System.out.println(output);
+
+Assert.assertTrue(output.contains("TABLE_NAME: ACTOR, COLUMN_NAME: 
ACT

[tomee] branch master updated: Simplifying this code

2019-07-24 Thread jgallimore
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 76463ff  Simplifying this code
76463ff is described below

commit 76463ffb883ef7648b5efab8d28ff42cee03f00b
Author: Jonathan Gallimore 
AuthorDate: Tue Jul 23 23:03:57 2019 +0100

Simplifying this code
---
 .../tests/cmp/sample/CustomOrmXmlTest.java |   2 +-
 .../apache/openejb/config/CmpJpaConversion.java|   3 +-
 .../openejb/config/EntityMappingURLFinder.java | 112 -
 3 files changed, 3 insertions(+), 114 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index 97bb17d..d48d27e 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -46,7 +46,7 @@ public class CustomOrmXmlTest {
 LocalMovie.class, LocalMovieHome.class, 
MovieBean.class, MovieDetails.class,
 MoviesBusiness.class, MoviesBusinessBean.class, 
MoviesBusinessHome.class,
 MoviesServlet.class)
-.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"),
 "META-INF/openejb-cmp-generated-orm.xml")
+.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"),
 "META-INF/custom-orm.xml")
 .addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"),
 "META-INF/persistence.xml")
 .addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"),
 "openejb-jar.xml")
 .addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), 
"ejb-jar.xml")
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
index 1acac8a..96d1bc2 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
@@ -64,6 +64,7 @@ import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 import org.apache.openejb.util.Strings;
+import org.apache.xbean.finder.ResourceFinder;
 
 import javax.ejb.EJBLocalObject;
 import java.lang.reflect.Field;
@@ -108,7 +109,7 @@ class CmpJpaConversion implements DynamicDeployer {
 private static EntityMappings readEntityMappings(final String location, 
final AppModule appModule) {
 
 try {
-URL url = EntityMappingURLFinder.INSTANCE.apply(location, 
appModule);
+final URL url = new ResourceFinder("", 
appModule.getClassLoader()).getResource(location);
 if (Objects.isNull(url)) {
 return null;
 }
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/config/EntityMappingURLFinder.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/config/EntityMappingURLFinder.java
deleted file mode 100644
index 46a2e98..000
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/config/EntityMappingURLFinder.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.openejb.config;
-
-import org.

[tomee] branch master updated: Rename file for custom-orm

2019-07-23 Thread jgallimore
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 ef646f8  Rename file for custom-orm
ef646f8 is described below

commit ef646f8bf699a1aebb1011b34e2558f695af4b8e
Author: Jonathan Gallimore 
AuthorDate: Tue Jul 23 16:00:30 2019 +0100

Rename file for custom-orm
---
 .../openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java   | 2 +-
 .../apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlEarTest.java | 2 +-
 .../arquillian/tests/cmp/sample/CustomOrmXmlHibernateEarTest.java   | 2 +-
 .../openejb/arquillian/tests/cmp/sample/persistence-hibernate.xml   | 2 +-
 .../org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
index 6aa5d6e..af88bd9 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlCastTest.java
@@ -46,7 +46,7 @@ public class CustomOrmXmlCastTest {
 LocalMovie.class, LocalMovieHome.class, 
MovieBean.class, MovieDetails.class,
 MoviesBusiness.class, MoviesBusinessBean.class, 
MoviesBusinessHome.class, MoviesServlet.class,
 MoviesServlet2.class)
-.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"),
 "META-INF/openejb-cmp-generated-orm.xml")
+.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"),
 "META-INF/custom-orm.xml")
 .addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"),
 "META-INF/persistence.xml")
 .addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"),
 "openejb-jar.xml")
 .addAsWebInfResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), 
"ejb-jar.xml")
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlEarTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlEarTest.java
index 550f9ad..da042bc 100644
--- 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlEarTest.java
+++ 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlEarTest.java
@@ -51,7 +51,7 @@ public class CustomOrmXmlEarTest {
 
 final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, 
"ejb-jar.jar")
 .addClasses(ActorBean.class, MovieBean.class, 
MovieDetails.class, MoviesBusinessBean.class)
-.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"),
 "META-INF/openejb-cmp-generated-orm.xml")
+.addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"),
 "META-INF/custom-orm.xml")
 .addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"),
 "META-INF/persistence.xml")
 .addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"),
 "META-INF/openejb-jar.xml")
 .addAsResource(new 
ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), 
"META-INF/ejb-jar.xml");
diff --git 
a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlHibernateEarTest.java
 
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlHibernateEarTest.java
index 2eb9302..c6a4b2b 100644
--- 
a/arquillian/arquillian-tomee-tests/arquill

[tomee] branch tomee8-java11 updated (e378d75 -> 5884acc)

2019-07-23 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee8-java11
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from e378d75  more fixes in the build for Java 11
 add 26f624f  Provide some detail on configuring XA datasources
 add 1a0397d  Merge remote-tracking branch 'apache/master' into xa-docs
 add 78872a6  Adding sample XA config for popular databases
 add 5884acc  Merge remote-tracking branch 'origin/master' into 
tomee8-java11

No new revisions were added by this update.

Summary of changes:
 docs/configuring-datasources-xa.adoc | 349 +++
 1 file changed, 349 insertions(+)
 create mode 100644 docs/configuring-datasources-xa.adoc



[tomee] 02/04: Unit test for ManagedConnection behaviour

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit a53aa5f3a3a1fed49c95a4825b16b3acf9e27a68
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 4 21:58:06 2019 +0100

Unit test for ManagedConnection behaviour
---
 .../jdbc/ManagedConnectionBehaviorTest.java| 72 +-
 1 file changed, 69 insertions(+), 3 deletions(-)

diff --git 
a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/ManagedConnectionBehaviorTest.java
 
b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/ManagedConnectionBehaviorTest.java
index a5e65cd..c17bdfe 100644
--- 
a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/ManagedConnectionBehaviorTest.java
+++ 
b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/ManagedConnectionBehaviorTest.java
@@ -19,10 +19,13 @@ package org.apache.openejb.resource.jdbc;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.openejb.resource.GeronimoTransactionManagerFactory;
 import org.apache.openejb.resource.TransactionManagerWrapper;
+import org.apache.openejb.resource.jdbc.managed.local.ManagedConnection;
 import org.apache.openejb.resource.jdbc.managed.local.ManagedDataSource;
 import org.junit.Test;
 
 import java.io.PrintWriter;
+import java.lang.reflect.Field;
+import java.lang.reflect.Proxy;
 import java.sql.Array;
 import java.sql.Blob;
 import java.sql.CallableStatement;
@@ -51,9 +54,7 @@ import javax.sql.DataSource;
 import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 public class ManagedConnectionBehaviorTest {
 @Test
@@ -123,7 +124,72 @@ public class ManagedConnectionBehaviorTest {
 assertTrue(myDs.connections.iterator().next().commit);
 myDs.connections.clear();
 }
+{ // 2 connections, same TX
+mgr.begin();
+final Connection connection1 = ds.getConnection();
+
+assertTrue(myDs.connections.isEmpty()); // not yet needed
+connection1.createBlob(); // just to call something
+
+// second connection should be the same as it comes from the tx 
registry
+final Connection connection2 = ds.getConnection();
+connection2.createBlob(); // just to call something
+
+assertEquals(connection1, connection2);
+
+for (final MyConn conn : myDs.connections) {
+assertFalse(conn.closed);
+}
+
+mgr.commit();
+
+for (final MyConn conn : myDs.connections) {
+assertTrue(conn.closed);
+assertTrue(conn.commit);
+assertFalse(conn.rollback);
+}
+
+myDs.connections.clear();
+}
+{ // 2 connections, same TX
+final Connection connection1 = ds.getConnection();
+final Connection connection2 = ds.getConnection();
+
+assertNotEquals(connection1, connection2);
+
+mgr.begin();
+assertTrue(myDs.connections.isEmpty()); // not yet needed
+connection1.createBlob(); // just to call something
+connection2.createBlob(); // just to call something
+
+for (final MyConn conn : myDs.connections) {
+assertFalse(conn.closed);
+}
+
+final ManagedConnection mc1 = (ManagedConnection) 
Proxy.getInvocationHandler(connection1);
+final ManagedConnection mc2 = (ManagedConnection) 
Proxy.getInvocationHandler(connection2);
+
+assertEquals(getFieldValue(mc1, "xaConnection"), 
getFieldValue(mc2, "xaConnection"));
+assertEquals(getFieldValue(mc1, "xaResource"), getFieldValue(mc2, 
"xaResource"));
+assertEquals(getFieldValue(mc1, "delegate"), getFieldValue(mc2, 
"delegate"));
+
+mgr.commit();
+
+for (final MyConn conn : myDs.connections) {
+assertTrue(conn.closed);
+assertTrue(conn.commit);
+assertFalse(conn.rollback);
+}
+
+myDs.connections.clear();
+}
+
+}
 
+private Object getFieldValue(final Object object, final String fieldName) 
throws NoSuchFieldException, IllegalAccessException {
+final Field xaConnectionField = 
object.getClass().getDeclaredField(fieldName);
+xaConnectionField.setAccessible(true);
+return xaConnectionField.get(object);
 }
 
 public static class MyDs implements DataSource {



[tomee] 04/04: Unused code

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 471b818dde6d44eecaec87837f19ab8ab2f9f511
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 4 21:38:09 2019 +0100

Unused code
---
 .../apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java   | 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
index 42013c7..c111874 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
@@ -18,8 +18,6 @@
 package org.apache.openejb.resource.jdbc.managed.xa;
 
 import org.apache.openejb.resource.jdbc.managed.local.ManagedDataSource;
-import org.apache.openejb.util.LogCategory;
-import org.apache.openejb.util.Logger;
 
 import java.lang.reflect.Proxy;
 import java.sql.Connection;
@@ -30,7 +28,6 @@ import javax.transaction.TransactionSynchronizationRegistry;
 
 public class ManagedXADataSource extends ManagedDataSource {
 
-private static final Logger LOGGER = 
Logger.getInstance(LogCategory.OPENEJB_RESOURCE_JDBC, 
ManagedXADataSource.class);
 private static final Class[] CONNECTION_CLASS = new 
Class[]{Connection.class};
 
 private final TransactionManager txMgr;



[tomee] 01/04: Attempting to avoid edge case with using multiple connections from the same datasource in the same transaction

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 012d92e3eb1ac8e4d2bf0158ef992d7e2161721b
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 4 15:21:17 2019 +0100

Attempting to avoid edge case with using multiple connections from the
same datasource in the same transaction
---
 .../openejb/resource/jdbc/managed/local/Key.java   | 81 ++
 .../jdbc/managed/local/ManagedConnection.java  | 62 +
 .../jdbc/managed/local/ManagedDataSource.java  | 34 +++--
 .../jdbc/managed/xa/ManagedXADataSource.java   | 12 
 4 files changed, 142 insertions(+), 47 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/Key.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/Key.java
new file mode 100644
index 000..87351c7
--- /dev/null
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/Key.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openejb.resource.jdbc.managed.local;
+
+import javax.sql.CommonDataSource;
+import java.util.Objects;
+
+public class Key {
+private final CommonDataSource ds;
+private final String user;
+private final String pwd;
+private final int hash;
+
+public Key(final CommonDataSource ds, final String user, final String pwd) 
{
+this.ds = ds;
+this.user = user;
+this.pwd = pwd;
+
+int result = ds.hashCode();
+result = 31 * result + (user != null ? user.hashCode() : 0);
+result = 31 * result + (pwd != null ? pwd.hashCode() : 0);
+hash = result;
+}
+
+public CommonDataSource getDs() {
+return ds;
+}
+
+public String getUser() {
+return user;
+}
+
+public String getPwd() {
+return pwd;
+}
+
+@Override
+public boolean equals(final Object o) {
+if (this == o) {
+return true;
+}
+if (o == null || getClass() != o.getClass()) {
+return false;
+}
+
+Key key = Key.class.cast(o);
+return (ds == key.ds || ds.equals(key.ds)) &&
+Objects.equals(user, key.user) &&
+Objects.equals(pwd, key.pwd);
+}
+
+@Override
+public String toString() {
+return "Key{" +
+"ds=" + ds +
+", user='" + user + '\'' +
+", pwd='*'" +
+", hash=" + hash +
+'}';
+}
+
+@Override
+public int hashCode() {
+return hash;
+}
+}
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/ManagedConnection.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/ManagedConnection.java
index 3d35b7d..ae0c9a5 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/ManagedConnection.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/ManagedConnection.java
@@ -142,7 +142,7 @@ public class ManagedConnection implements InvocationHandler 
{
 throw new SQLException("Unable to enlist connection 
the transaction", e);
 }
 
-registry.putResource(key, delegate);
+registry.putResource(key, proxy);
 transaction.registerSynchronization(new 
ClosingSynchronization());
 
 if (xaConnection == null) {
@@ -158,8 +158,19 @@ public class ManagedConnection implements 
InvocationHandler {
 }
 }
 }
-} else if (delegate == null) { // shouldn't happen
-delegate = connection;
+} else if (delegate == null) {
+// this happens if the caller obtains subsequent 
conne

[tomee] 03/04: Checkstyle

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit f17af06b27d5e5bcd3d3e4c10346d18460ef37b2
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 4 21:06:55 2019 +0100

Checkstyle
---
 .../apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java  | 4 
 1 file changed, 4 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
index 341cf23..42013c7 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
@@ -17,8 +17,6 @@
 
 package org.apache.openejb.resource.jdbc.managed.xa;
 
-import org.apache.openejb.resource.jdbc.managed.local.Key;
-import org.apache.openejb.resource.jdbc.managed.local.ManagedConnection;
 import org.apache.openejb.resource.jdbc.managed.local.ManagedDataSource;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
@@ -27,8 +25,6 @@ import java.lang.reflect.Proxy;
 import java.sql.Connection;
 import java.sql.SQLException;
 import javax.sql.CommonDataSource;
-import javax.transaction.SystemException;
-import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 import javax.transaction.TransactionSynchronizationRegistry;
 



[tomee] branch tomee-7.0.x updated (279a7b0 -> 471b818)

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.0.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from 279a7b0  Adding sample XA config for popular databases
 new 012d92e  Attempting to avoid edge case with using multiple connections 
from the same datasource in the same transaction
 new a53aa5f  Unit test for ManagedConnection behaviour
 new f17af06  Checkstyle
 new 471b818  Unused code

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../openejb/resource/jdbc/managed/local/Key.java   | 81 ++
 .../jdbc/managed/local/ManagedConnection.java  | 62 +
 .../jdbc/managed/local/ManagedDataSource.java  | 34 +++--
 .../jdbc/managed/xa/ManagedXADataSource.java   |  5 ++
 .../jdbc/ManagedConnectionBehaviorTest.java| 72 ++-
 5 files changed, 204 insertions(+), 50 deletions(-)
 create mode 100644 
container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/Key.java



[tomee] 02/04: Unit test for ManagedConnection behaviour

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit e5019c9e9fc7bd3b9249eb77d13e5361373bbf63
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 4 21:58:06 2019 +0100

Unit test for ManagedConnection behaviour
---
 .../jdbc/ManagedConnectionBehaviorTest.java| 72 +-
 1 file changed, 69 insertions(+), 3 deletions(-)

diff --git 
a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/ManagedConnectionBehaviorTest.java
 
b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/ManagedConnectionBehaviorTest.java
index a5e65cd..c17bdfe 100644
--- 
a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/ManagedConnectionBehaviorTest.java
+++ 
b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/ManagedConnectionBehaviorTest.java
@@ -19,10 +19,13 @@ package org.apache.openejb.resource.jdbc;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.openejb.resource.GeronimoTransactionManagerFactory;
 import org.apache.openejb.resource.TransactionManagerWrapper;
+import org.apache.openejb.resource.jdbc.managed.local.ManagedConnection;
 import org.apache.openejb.resource.jdbc.managed.local.ManagedDataSource;
 import org.junit.Test;
 
 import java.io.PrintWriter;
+import java.lang.reflect.Field;
+import java.lang.reflect.Proxy;
 import java.sql.Array;
 import java.sql.Blob;
 import java.sql.CallableStatement;
@@ -51,9 +54,7 @@ import javax.sql.DataSource;
 import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 public class ManagedConnectionBehaviorTest {
 @Test
@@ -123,7 +124,72 @@ public class ManagedConnectionBehaviorTest {
 assertTrue(myDs.connections.iterator().next().commit);
 myDs.connections.clear();
 }
+{ // 2 connections, same TX
+mgr.begin();
+final Connection connection1 = ds.getConnection();
+
+assertTrue(myDs.connections.isEmpty()); // not yet needed
+connection1.createBlob(); // just to call something
+
+// second connection should be the same as it comes from the tx 
registry
+final Connection connection2 = ds.getConnection();
+connection2.createBlob(); // just to call something
+
+assertEquals(connection1, connection2);
+
+for (final MyConn conn : myDs.connections) {
+assertFalse(conn.closed);
+}
+
+mgr.commit();
+
+for (final MyConn conn : myDs.connections) {
+assertTrue(conn.closed);
+assertTrue(conn.commit);
+assertFalse(conn.rollback);
+}
+
+myDs.connections.clear();
+}
+{ // 2 connections, same TX
+final Connection connection1 = ds.getConnection();
+final Connection connection2 = ds.getConnection();
+
+assertNotEquals(connection1, connection2);
+
+mgr.begin();
+assertTrue(myDs.connections.isEmpty()); // not yet needed
+connection1.createBlob(); // just to call something
+connection2.createBlob(); // just to call something
+
+for (final MyConn conn : myDs.connections) {
+assertFalse(conn.closed);
+}
+
+final ManagedConnection mc1 = (ManagedConnection) 
Proxy.getInvocationHandler(connection1);
+final ManagedConnection mc2 = (ManagedConnection) 
Proxy.getInvocationHandler(connection2);
+
+assertEquals(getFieldValue(mc1, "xaConnection"), 
getFieldValue(mc2, "xaConnection"));
+assertEquals(getFieldValue(mc1, "xaResource"), getFieldValue(mc2, 
"xaResource"));
+assertEquals(getFieldValue(mc1, "delegate"), getFieldValue(mc2, 
"delegate"));
+
+mgr.commit();
+
+for (final MyConn conn : myDs.connections) {
+assertTrue(conn.closed);
+assertTrue(conn.commit);
+assertFalse(conn.rollback);
+}
+
+myDs.connections.clear();
+}
+
+}
 
+private Object getFieldValue(final Object object, final String fieldName) 
throws NoSuchFieldException, IllegalAccessException {
+final Field xaConnectionField = 
object.getClass().getDeclaredField(fieldName);
+xaConnectionField.setAccessible(true);
+return xaConnectionField.get(object);
 }
 
 public static class MyDs implements DataSource {



[tomee] branch tomee-7.1.x updated (099bac0 -> a9a9cfb)

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.1.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from 099bac0  Merge branch 'tomee-7.1.x' of github.com:jgallimore/tomee 
into tomee-7.1.x
 new 2c789fc  Attempting to avoid edge case with using multiple connections 
from the same datasource in the same transaction
 new e5019c9  Unit test for ManagedConnection behaviour
 new a039449  Checkstyle
 new a9a9cfb  Unused code

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../openejb/resource/jdbc/managed/local/Key.java   | 81 ++
 .../jdbc/managed/local/ManagedConnection.java  | 62 +
 .../jdbc/managed/local/ManagedDataSource.java  | 34 +++--
 .../jdbc/managed/xa/ManagedXADataSource.java   |  5 ++
 .../jdbc/ManagedConnectionBehaviorTest.java| 72 ++-
 5 files changed, 204 insertions(+), 50 deletions(-)
 create mode 100644 
container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/Key.java



[tomee] 03/04: Checkstyle

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit a039449d96c6f0c13fb2b60b53f320ca6911ee2b
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 4 21:06:55 2019 +0100

Checkstyle
---
 .../apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java  | 4 
 1 file changed, 4 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
index 341cf23..42013c7 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
@@ -17,8 +17,6 @@
 
 package org.apache.openejb.resource.jdbc.managed.xa;
 
-import org.apache.openejb.resource.jdbc.managed.local.Key;
-import org.apache.openejb.resource.jdbc.managed.local.ManagedConnection;
 import org.apache.openejb.resource.jdbc.managed.local.ManagedDataSource;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
@@ -27,8 +25,6 @@ import java.lang.reflect.Proxy;
 import java.sql.Connection;
 import java.sql.SQLException;
 import javax.sql.CommonDataSource;
-import javax.transaction.SystemException;
-import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 import javax.transaction.TransactionSynchronizationRegistry;
 



[tomee] 04/04: Unused code

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit a9a9cfb04d10584450028e914fd0d8239cd22fa1
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 4 21:38:09 2019 +0100

Unused code
---
 .../apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java   | 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
index 42013c7..c111874 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/xa/ManagedXADataSource.java
@@ -18,8 +18,6 @@
 package org.apache.openejb.resource.jdbc.managed.xa;
 
 import org.apache.openejb.resource.jdbc.managed.local.ManagedDataSource;
-import org.apache.openejb.util.LogCategory;
-import org.apache.openejb.util.Logger;
 
 import java.lang.reflect.Proxy;
 import java.sql.Connection;
@@ -30,7 +28,6 @@ import javax.transaction.TransactionSynchronizationRegistry;
 
 public class ManagedXADataSource extends ManagedDataSource {
 
-private static final Logger LOGGER = 
Logger.getInstance(LogCategory.OPENEJB_RESOURCE_JDBC, 
ManagedXADataSource.class);
 private static final Class[] CONNECTION_CLASS = new 
Class[]{Connection.class};
 
 private final TransactionManager txMgr;



[tomee] 01/04: Attempting to avoid edge case with using multiple connections from the same datasource in the same transaction

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 2c789fc27123041332095d33ee57ab6d8135fc81
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 4 15:21:17 2019 +0100

Attempting to avoid edge case with using multiple connections from the
same datasource in the same transaction
---
 .../openejb/resource/jdbc/managed/local/Key.java   | 81 ++
 .../jdbc/managed/local/ManagedConnection.java  | 62 +
 .../jdbc/managed/local/ManagedDataSource.java  | 34 +++--
 .../jdbc/managed/xa/ManagedXADataSource.java   | 12 
 4 files changed, 142 insertions(+), 47 deletions(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/Key.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/Key.java
new file mode 100644
index 000..87351c7
--- /dev/null
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/Key.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openejb.resource.jdbc.managed.local;
+
+import javax.sql.CommonDataSource;
+import java.util.Objects;
+
+public class Key {
+private final CommonDataSource ds;
+private final String user;
+private final String pwd;
+private final int hash;
+
+public Key(final CommonDataSource ds, final String user, final String pwd) 
{
+this.ds = ds;
+this.user = user;
+this.pwd = pwd;
+
+int result = ds.hashCode();
+result = 31 * result + (user != null ? user.hashCode() : 0);
+result = 31 * result + (pwd != null ? pwd.hashCode() : 0);
+hash = result;
+}
+
+public CommonDataSource getDs() {
+return ds;
+}
+
+public String getUser() {
+return user;
+}
+
+public String getPwd() {
+return pwd;
+}
+
+@Override
+public boolean equals(final Object o) {
+if (this == o) {
+return true;
+}
+if (o == null || getClass() != o.getClass()) {
+return false;
+}
+
+Key key = Key.class.cast(o);
+return (ds == key.ds || ds.equals(key.ds)) &&
+Objects.equals(user, key.user) &&
+Objects.equals(pwd, key.pwd);
+}
+
+@Override
+public String toString() {
+return "Key{" +
+"ds=" + ds +
+", user='" + user + '\'' +
+", pwd='*'" +
+", hash=" + hash +
+'}';
+}
+
+@Override
+public int hashCode() {
+return hash;
+}
+}
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/ManagedConnection.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/ManagedConnection.java
index 3d35b7d..ae0c9a5 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/ManagedConnection.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/managed/local/ManagedConnection.java
@@ -142,7 +142,7 @@ public class ManagedConnection implements InvocationHandler 
{
 throw new SQLException("Unable to enlist connection 
the transaction", e);
 }
 
-registry.putResource(key, delegate);
+registry.putResource(key, proxy);
 transaction.registerSynchronization(new 
ClosingSynchronization());
 
 if (xaConnection == null) {
@@ -158,8 +158,19 @@ public class ManagedConnection implements 
InvocationHandler {
 }
 }
 }
-} else if (delegate == null) { // shouldn't happen
-delegate = connection;
+} else if (delegate == null) {
+// this happens if the caller obtains subsequent 
conne

[tomee] 02/02: Adding sample XA config for popular databases

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 279a7b0b3869f200a4a12e0d2a83efe5880c9a45
Author: Jonathan Gallimore 
AuthorDate: Mon Jul 22 13:56:49 2019 +0100

Adding sample XA config for popular databases
---
 docs/configuring-datasources-xa.adoc | 200 +--
 1 file changed, 194 insertions(+), 6 deletions(-)

diff --git a/docs/configuring-datasources-xa.adoc 
b/docs/configuring-datasources-xa.adoc
index 8619806..bbc58df 100644
--- a/docs/configuring-datasources-xa.adoc
+++ b/docs/configuring-datasources-xa.adoc
@@ -71,7 +71,7 @@ XA datasource using the `XaDataSource` attribute.
 TestWhileIdle true
 TimeBetweenEvictionRuns 1 minute
 MaxWaitTime 0 seconds
-ValidationQuery select null from dual
+ValidationQuery select 1
   
 ```
 
@@ -93,7 +93,7 @@ And finally, a non-JTA managed datasource as well:
 TestWhileIdle true
 TimeBetweenEvictionRuns 1 minute
 MaxWaitTime 0 seconds
-ValidationQuery select null from dual
+ValidationQuery select 1
   
 ```
 
@@ -120,7 +120,7 @@ And finally, a non-JTA managed datasource as well:
 MaxWaitTime 0 seconds
 PoolPreparedStatements true
 MaxOpenPreparedStatements 1024
-ValidationQuery select null from dual
+ValidationQuery select 1 from dual
   
 
   
@@ -144,18 +144,206 @@ And finally, a non-JTA managed datasource as well:
 MaxWaitTime 0 seconds
 PoolPreparedStatements true
 MaxOpenPreparedStatements 1024
-ValidationQuery select null from dual
+ValidationQuery select 1 from dual
   
 ```
 
+=== Microsoft SQL Server
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  com.microsoft.sqlserver.jdbc.SQLServerDriver
+JdbcUrl jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+username sa
+password my-secret-pw1
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select 1
+  
 
+  
+URL jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+  
 
-=== Microsoft SQL Server
+  
+JdbcDriver com.microsoft.sqlserver.jdbc.SQLServerDriver
+JdbcUrl jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+UserName sa
+password my-secret-pw1
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select 1
+  
+```
+
+Please note that using XA with Microsoft SQL Server requires the MS DTC to be 
configured correctly, and sqljdbc_xa.dll to be installed. For instructions, 
please see this Microsoft article: 
https://docs.microsoft.com/en-us/sql/connect/jdbc/understanding-xa-transactions?view=sql-server-2017
 
 === MySQL
 
+```
+  
+
+  XaDataSource demo/jdbc/XADataSourceXA
+  JdbcDriver  com.mysql.cj.jdbc.Driver
+  JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+  username root
+  password my-secret-pw
+  JtaManaged true
+  InitialSize 10
+  MaxActive 128
+  MaxIdle 25
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  ValidationQuery select 1
+
+
+  Url jdbc:mysql://192.168.37.202:3306/movie
+
+
+
+  JdbcDriver com.mysql.cj.jdbc.Driver
+  JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+  UserName root
+  password my-secret-pw
+  JtaManaged false
+  InitialSize 10
+  MaxActive 100
+  MaxIdle 50
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  ValidationQuery select 1
+
+  
+```
+
 === PostgreSQL
 
+```
+  
+
+  XaDataSource demo/jdbc/XADataSourceXA
+  JdbcDriver org.postgresql.Driver 
+  JdbcUrl jdbc:postgresql://192.168.37.200:5432/movie
+  username postgres
+  password mysecretpassword
+  JtaManaged true
+  InitialSize 10
+  MaxActive 128
+  MaxIdle 25
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  PoolPreparedStatements true
+  MaxOpenPreparedStatements 1024
+  ValidationQuery select 1
+
+
+
+  URL

[tomee] 01/02: Provide some detail on configuring XA datasources

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit c3ec7fa0d06eb3d70183bae19ee3324934c17cd5
Author: Jonathan Gallimore 
AuthorDate: Fri Jul 12 16:44:21 2019 +0100

Provide some detail on configuring XA datasources
---
 docs/configuring-datasources-xa.adoc | 161 +++
 1 file changed, 161 insertions(+)

diff --git a/docs/configuring-datasources-xa.adoc 
b/docs/configuring-datasources-xa.adoc
new file mode 100644
index 000..8619806
--- /dev/null
+++ b/docs/configuring-datasources-xa.adoc
@@ -0,0 +1,161 @@
+= XA DataSource Configuration
+:index-group: Datasource
+:jbake-date: 2019-07-12
+:jbake-type: page
+:jbake-status: published
+
+== Introduction
+
+XA datasources are able to participate in global transactions involving
+more than one resource - for example, scenarios where a transaction needs 
+to encompass connections to two different databases,, or a database and
+a JMS resource. 
+
+The global transaction manager will provide a two phase commit for all
+the resources enlisted in the transaction - if any of the commit
+operations fail, then all the resources in the global transaction will
+be rolled back.
+
+JTA can still be used with non-XA datasources, however the datasource will
+use a local transaction as opposed to a global transaction.
+
+JDBC drivers providing XA capabilities provide an implementation of
+`javax.sql.XADataSource`. This makes them a little more tricky to configure
+than non-XA datasources. The general technique is to configure an instance
+of the vendor-provided `XADataSource` implementation, and to then point
+the usual non-XA resource at this instance. Sounds complex? Let's walk
+through an example. We'll also provide tested example configs for a number
+of well known databases at the end of this document.
+
+== Example
+
+In this example, we'll look at MySQL. First off, download the MySQL driver
+from: https://dev.mysql.com/downloads/connector/j/. Once you have the .jar
+file, add it to the TomEE `lib` directory. This driver provides the 
+`com.mysql.cj.jdbc.MysqlXADataSource` class. The properties that need to 
+be configured vary between datasources, so we'll need to get a list of the
+properties and work out the values to set.
+
+From the TomEE bin directory, execute the following command:
+`./tomee.sh setters -c com.mysql.cj.jdbc.MysqlXADataSource` on *nix systems,
+or 
+
+`tomee.bat setters -c com.mysql.cj.jdbc.MysqlXADataSource` on Windows systems.
+
+This will give a complete list of paramaters that are available for the XA 
+datasource. We'll simply use the `URL` paramater for the datasource.
+
+```
+  
+Url jdbc:mysql://192.168.37.202:3306/movie
+  
+```
+
+Next, we create a JtaManaged datasource as we normally would, and point it to 
the
+XA datasource using the `XaDataSource` attribute.
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  com.mysql.cj.jdbc.Driver
+JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+username root
+password my-secret-pw
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+ValidationQuery select null from dual
+  
+```
+
+And finally, a non-JTA managed datasource as well:
+
+```
+  
+JdbcDriver com.mysql.cj.jdbc.Driver
+JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+UserName root
+password my-secret-pw
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+ValidationQuery select null from dual
+  
+```
+
+== Sample configs
+
+=== Oracle
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  oracle.jdbc.OracleDriver
+JdbcUrl jdbc:oracle:thin:@//192.168.37.214:1521/XE
+username system
+password my-cool-password
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select null from dual
+  
+
+  
+Url jdbc:oracle:thin:@//192.168.37.214:1521/XE
+  
+
+  
+JdbcDriver oracle.jdbc.OracleDriver
+JdbcUrl jdbc:oracle:thin:@//192.168.37.214:1521/XE
+UserName system
+password my-cool-password
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1

[tomee] branch tomee-7.0.x updated (eb355a3 -> 279a7b0)

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.0.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from eb355a3  Fix build - s/SHAPSHOT/SNAPSHOT
 new c3ec7fa  Provide some detail on configuring XA datasources
 new 279a7b0  Adding sample XA config for popular databases

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/configuring-datasources-xa.adoc | 349 +++
 1 file changed, 349 insertions(+)
 create mode 100644 docs/configuring-datasources-xa.adoc



[tomee] 01/03: Provide some detail on configuring XA datasources

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 3d7b1e7a13e4f4f0d662ae6a240a55b94413176e
Author: Jonathan Gallimore 
AuthorDate: Fri Jul 12 16:44:21 2019 +0100

Provide some detail on configuring XA datasources
---
 docs/configuring-datasources-xa.adoc | 161 +++
 1 file changed, 161 insertions(+)

diff --git a/docs/configuring-datasources-xa.adoc 
b/docs/configuring-datasources-xa.adoc
new file mode 100644
index 000..8619806
--- /dev/null
+++ b/docs/configuring-datasources-xa.adoc
@@ -0,0 +1,161 @@
+= XA DataSource Configuration
+:index-group: Datasource
+:jbake-date: 2019-07-12
+:jbake-type: page
+:jbake-status: published
+
+== Introduction
+
+XA datasources are able to participate in global transactions involving
+more than one resource - for example, scenarios where a transaction needs 
+to encompass connections to two different databases,, or a database and
+a JMS resource. 
+
+The global transaction manager will provide a two phase commit for all
+the resources enlisted in the transaction - if any of the commit
+operations fail, then all the resources in the global transaction will
+be rolled back.
+
+JTA can still be used with non-XA datasources, however the datasource will
+use a local transaction as opposed to a global transaction.
+
+JDBC drivers providing XA capabilities provide an implementation of
+`javax.sql.XADataSource`. This makes them a little more tricky to configure
+than non-XA datasources. The general technique is to configure an instance
+of the vendor-provided `XADataSource` implementation, and to then point
+the usual non-XA resource at this instance. Sounds complex? Let's walk
+through an example. We'll also provide tested example configs for a number
+of well known databases at the end of this document.
+
+== Example
+
+In this example, we'll look at MySQL. First off, download the MySQL driver
+from: https://dev.mysql.com/downloads/connector/j/. Once you have the .jar
+file, add it to the TomEE `lib` directory. This driver provides the 
+`com.mysql.cj.jdbc.MysqlXADataSource` class. The properties that need to 
+be configured vary between datasources, so we'll need to get a list of the
+properties and work out the values to set.
+
+From the TomEE bin directory, execute the following command:
+`./tomee.sh setters -c com.mysql.cj.jdbc.MysqlXADataSource` on *nix systems,
+or 
+
+`tomee.bat setters -c com.mysql.cj.jdbc.MysqlXADataSource` on Windows systems.
+
+This will give a complete list of paramaters that are available for the XA 
+datasource. We'll simply use the `URL` paramater for the datasource.
+
+```
+  
+Url jdbc:mysql://192.168.37.202:3306/movie
+  
+```
+
+Next, we create a JtaManaged datasource as we normally would, and point it to 
the
+XA datasource using the `XaDataSource` attribute.
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  com.mysql.cj.jdbc.Driver
+JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+username root
+password my-secret-pw
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+ValidationQuery select null from dual
+  
+```
+
+And finally, a non-JTA managed datasource as well:
+
+```
+  
+JdbcDriver com.mysql.cj.jdbc.Driver
+JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+UserName root
+password my-secret-pw
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+ValidationQuery select null from dual
+  
+```
+
+== Sample configs
+
+=== Oracle
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  oracle.jdbc.OracleDriver
+JdbcUrl jdbc:oracle:thin:@//192.168.37.214:1521/XE
+username system
+password my-cool-password
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select null from dual
+  
+
+  
+Url jdbc:oracle:thin:@//192.168.37.214:1521/XE
+  
+
+  
+JdbcDriver oracle.jdbc.OracleDriver
+JdbcUrl jdbc:oracle:thin:@//192.168.37.214:1521/XE
+UserName system
+password my-cool-password
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1

[tomee] 02/03: Adding sample XA config for popular databases

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 81876790b458ef9686e9c62f885e0ed38a9a42b8
Author: Jonathan Gallimore 
AuthorDate: Mon Jul 22 13:56:49 2019 +0100

Adding sample XA config for popular databases
---
 docs/configuring-datasources-xa.adoc | 200 +--
 1 file changed, 194 insertions(+), 6 deletions(-)

diff --git a/docs/configuring-datasources-xa.adoc 
b/docs/configuring-datasources-xa.adoc
index 8619806..bbc58df 100644
--- a/docs/configuring-datasources-xa.adoc
+++ b/docs/configuring-datasources-xa.adoc
@@ -71,7 +71,7 @@ XA datasource using the `XaDataSource` attribute.
 TestWhileIdle true
 TimeBetweenEvictionRuns 1 minute
 MaxWaitTime 0 seconds
-ValidationQuery select null from dual
+ValidationQuery select 1
   
 ```
 
@@ -93,7 +93,7 @@ And finally, a non-JTA managed datasource as well:
 TestWhileIdle true
 TimeBetweenEvictionRuns 1 minute
 MaxWaitTime 0 seconds
-ValidationQuery select null from dual
+ValidationQuery select 1
   
 ```
 
@@ -120,7 +120,7 @@ And finally, a non-JTA managed datasource as well:
 MaxWaitTime 0 seconds
 PoolPreparedStatements true
 MaxOpenPreparedStatements 1024
-ValidationQuery select null from dual
+ValidationQuery select 1 from dual
   
 
   
@@ -144,18 +144,206 @@ And finally, a non-JTA managed datasource as well:
 MaxWaitTime 0 seconds
 PoolPreparedStatements true
 MaxOpenPreparedStatements 1024
-ValidationQuery select null from dual
+ValidationQuery select 1 from dual
   
 ```
 
+=== Microsoft SQL Server
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  com.microsoft.sqlserver.jdbc.SQLServerDriver
+JdbcUrl jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+username sa
+password my-secret-pw1
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select 1
+  
 
+  
+URL jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+  
 
-=== Microsoft SQL Server
+  
+JdbcDriver com.microsoft.sqlserver.jdbc.SQLServerDriver
+JdbcUrl jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+UserName sa
+password my-secret-pw1
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select 1
+  
+```
+
+Please note that using XA with Microsoft SQL Server requires the MS DTC to be 
configured correctly, and sqljdbc_xa.dll to be installed. For instructions, 
please see this Microsoft article: 
https://docs.microsoft.com/en-us/sql/connect/jdbc/understanding-xa-transactions?view=sql-server-2017
 
 === MySQL
 
+```
+  
+
+  XaDataSource demo/jdbc/XADataSourceXA
+  JdbcDriver  com.mysql.cj.jdbc.Driver
+  JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+  username root
+  password my-secret-pw
+  JtaManaged true
+  InitialSize 10
+  MaxActive 128
+  MaxIdle 25
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  ValidationQuery select 1
+
+
+  Url jdbc:mysql://192.168.37.202:3306/movie
+
+
+
+  JdbcDriver com.mysql.cj.jdbc.Driver
+  JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+  UserName root
+  password my-secret-pw
+  JtaManaged false
+  InitialSize 10
+  MaxActive 100
+  MaxIdle 50
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  ValidationQuery select 1
+
+  
+```
+
 === PostgreSQL
 
+```
+  
+
+  XaDataSource demo/jdbc/XADataSourceXA
+  JdbcDriver org.postgresql.Driver 
+  JdbcUrl jdbc:postgresql://192.168.37.200:5432/movie
+  username postgres
+  password mysecretpassword
+  JtaManaged true
+  InitialSize 10
+  MaxActive 128
+  MaxIdle 25
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  PoolPreparedStatements true
+  MaxOpenPreparedStatements 1024
+  ValidationQuery select 1
+
+
+
+  URL

[tomee] branch tomee-7.1.x updated (039e454 -> 099bac0)

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch tomee-7.1.x
in repository https://gitbox.apache.org/repos/asf/tomee.git.


from 039e454  Use javaagent-7.1.2-SNAPSHOT
 new 3d7b1e7  Provide some detail on configuring XA datasources
 new 8187679  Adding sample XA config for popular databases
 new 099bac0  Merge branch 'tomee-7.1.x' of github.com:jgallimore/tomee 
into tomee-7.1.x

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/configuring-datasources-xa.adoc | 349 +++
 1 file changed, 349 insertions(+)
 create mode 100644 docs/configuring-datasources-xa.adoc



[tomee] 03/03: Merge branch 'tomee-7.1.x' of github.com:jgallimore/tomee into tomee-7.1.x

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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

commit 099bac067a45d353bc150c3d5a971609cfbdaf79
Merge: 8187679 039e454
Author: Jonathan Gallimore 
AuthorDate: Mon Jul 22 14:02:39 2019 +0100

Merge branch 'tomee-7.1.x' of github.com:jgallimore/tomee into tomee-7.1.x

 docs/java-compatibility.adoc   |   6 +
 examples/mp-config-example/README.adoc |  67 ++
 examples/mp-config-example/README_es.adoc  |  70 ++
 examples/mp-config-example/README_pt.adoc  |  71 ++
 examples/mp-config-example/pom.xml | 104 +
 .../java/org/superbiz/config/PropertiesRest.java   |  80 +++
 .../src/main/resources/META-INF/beans.xml  |   0
 .../META-INF/microprofile-config.properties|   3 +
 .../org/superbiz/config/PropertiesRestTest.java|  53 +
 .../src/test/resources/arquillian.xml  |  30 +++
 examples/mp-config-source-database/README.adoc |  14 ++
 examples/mp-config-source-database/pom.xml | 146 
 .../config/source/database/ApplicationBean.java|  47 
 .../source/database/DatabaseConfigSource.java  |  93 
 ...rg.eclipse.microprofile.config.spi.ConfigSource |  17 ++
 .../src/main/tomee/conf/tomee.xml  |  21 ++
 .../tomee/lib/import-config-source-database.sql|  19 ++
 .../source/database/DatabaseConfigSourceTest.java  |  55 +
 .../src/test/resources/arquillian.xml  |  37 +++
 examples/mp-faulttolerance-fallback/README.adoc| 125 ++
 examples/mp-faulttolerance-fallback/README_es.adoc | 125 ++
 examples/mp-faulttolerance-fallback/pom.xml| 119 ++
 .../rest/WeatherDayStatusFallbackHandler.java  |  36 +++
 .../java/org/superbiz/rest/WeatherException.java   |  20 ++
 .../java/org/superbiz/rest/WeatherService.java |  60 +
 .../java/org/superbiz/rest/WeatherServiceTest.java |  74 ++
 .../src/test/resources/arquillian.xml  |  30 +++
 .../src/test/resources/beans.xml   |   7 +
 examples/mp-faulttolerance-retry/README.adoc   | 255 +
 examples/mp-faulttolerance-retry/pom.xml   | 105 +
 .../java/org/superbiz/rest/WeatherGateway.java | 115 ++
 .../rest/WeatherGatewayBusyServiceException.java   |  20 ++
 .../rest/WeatherGatewayTimeoutException.java   |  21 ++
 .../java/org/superbiz/rest/WeatherService.java |  73 ++
 .../java/org/superbiz/rest/WeatherServiceTest.java |  94 
 .../src/test/resources/arquillian.xml  |  30 +++
 .../src/test/resources/beans.xml   |   7 +
 examples/mp-faulttolerance-timeout/README.adoc | 108 +
 examples/mp-faulttolerance-timeout/pom.xml | 107 +
 .../java/org/superbiz/rest/WeatherGateway.java |  49 
 .../java/org/superbiz/rest/WeatherService.java |  39 
 .../java/org/superbiz/rest/WeatherServiceTest.java |  66 ++
 .../src/test/resources/arquillian.xml  |  30 +++
 .../src/test/resources/beans.xml   |   7 +
 examples/mp-opentracing-traced/README.adoc |  63 +
 examples/mp-opentracing-traced/pom.xml | 105 +
 .../src/test/resources/arquillian.xml  |  30 +++
 examples/pom.xml   |   5 +
 examples/simple-cmp2/pom.xml   |   2 +-
 pom.xml|   2 +-
 50 files changed, 2860 insertions(+), 2 deletions(-)



[tomee] 02/03: Merge remote-tracking branch 'apache/master' into xa-docs

2019-07-22 Thread jgallimore
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

commit 1a0397d93533c9584307cf423832807a6d4f02e8
Merge: 26f624f bbaeef7
Author: Jonathan Gallimore 
AuthorDate: Thu Jul 18 11:33:32 2019 +0100

Merge remote-tracking branch 'apache/master' into xa-docs

 README.adoc|   4 +-
 .../applicationcomposer-jaxws-cdi/README_pt.adoc   | 231 
 examples/arquillian-jpa/README_pt.adoc | 170 
 examples/cdi-application-scope/README_pt.adoc  | 135 ++
 examples/cdi-interceptors/README_pt.adoc   | 221 +++
 examples/cdi-produces-disposes/README_pt.adoc  | 297 +
 examples/cdi-produces-field/README_pt.adoc | 295 
 examples/cdi-qualifier/README_pt.adoc  |  99 +++
 examples/cdi-realm/README.adoc |   4 +-
 examples/cdi-realm/{README.adoc => README_pt.adoc} |  49 ++--
 examples/cdi-request-scope/README_pt.adoc  | 161 +++
 examples/cdi-session-scope/README.adoc |  15 +-
 .../{README.adoc => README_pt.adoc}|  39 +--
 examples/change-jaxws-url/README.adoc  |  20 +-
 .../{README.adoc => README_pt.adoc}|  25 +-
 examples/cloud-tomee-azure/README.adoc |   8 +-
 examples/cloud-tomee-azure/README_pt.adoc  | 110 
 examples/jsf-cdi-and-ejb/README.adoc   |   6 +-
 .../{README.adoc => README_pt.adoc}|  62 ++---
 .../rest/MoviesMPJWTConfigurationProvider.java |   2 +-
 .../tomee/microprofile/jwt/ConstraintAdapter.java  |  16 ++
 .../microprofile/jwt/JsonWebTokenValidator.java|  16 +-
 .../apache/tomee/microprofile/jwt/MPJWTFilter.java |  17 +-
 .../tomee/microprofile/jwt/MPJWTInitializer.java   |   2 +-
 .../jwt/config/JWTAuthConfiguration.java   |  26 +-
 .../jwt/config/JWTAuthConfigurationProperties.java |  12 +-
 .../jwt/JsonWebTokenValidatorTest.java |  16 ++
 .../jwt/bval/ValidationConstraintsTest.java|  16 ++
 .../jwt/bval/ValidationGeneratorTest.java  |  16 ++
 .../tck/jwt/JWTAuthContextInfoProvider.java|   2 +-
 .../tck/jwt/jwk/PublicKeyAsJWKSTest.java   |   2 +-
 31 files changed, 1953 insertions(+), 141 deletions(-)



[tomee] branch master updated (bbaeef7 -> 78872a6)

2019-07-22 Thread jgallimore
This is an automated email from the ASF dual-hosted git repository.

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


from bbaeef7  Merge pull request #520 from gabrielferreirapro/TOMEE-2579
 new 26f624f  Provide some detail on configuring XA datasources
 new 1a0397d  Merge remote-tracking branch 'apache/master' into xa-docs
 new 78872a6  Adding sample XA config for popular databases

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/configuring-datasources-xa.adoc | 349 +++
 1 file changed, 349 insertions(+)
 create mode 100644 docs/configuring-datasources-xa.adoc



[tomee] 03/03: Adding sample XA config for popular databases

2019-07-22 Thread jgallimore
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

commit 78872a64dd5de569ebf1cdee4dd72d0df2d8982a
Author: Jonathan Gallimore 
AuthorDate: Mon Jul 22 13:56:49 2019 +0100

Adding sample XA config for popular databases
---
 docs/configuring-datasources-xa.adoc | 200 +--
 1 file changed, 194 insertions(+), 6 deletions(-)

diff --git a/docs/configuring-datasources-xa.adoc 
b/docs/configuring-datasources-xa.adoc
index 8619806..bbc58df 100644
--- a/docs/configuring-datasources-xa.adoc
+++ b/docs/configuring-datasources-xa.adoc
@@ -71,7 +71,7 @@ XA datasource using the `XaDataSource` attribute.
 TestWhileIdle true
 TimeBetweenEvictionRuns 1 minute
 MaxWaitTime 0 seconds
-ValidationQuery select null from dual
+ValidationQuery select 1
   
 ```
 
@@ -93,7 +93,7 @@ And finally, a non-JTA managed datasource as well:
 TestWhileIdle true
 TimeBetweenEvictionRuns 1 minute
 MaxWaitTime 0 seconds
-ValidationQuery select null from dual
+ValidationQuery select 1
   
 ```
 
@@ -120,7 +120,7 @@ And finally, a non-JTA managed datasource as well:
 MaxWaitTime 0 seconds
 PoolPreparedStatements true
 MaxOpenPreparedStatements 1024
-ValidationQuery select null from dual
+ValidationQuery select 1 from dual
   
 
   
@@ -144,18 +144,206 @@ And finally, a non-JTA managed datasource as well:
 MaxWaitTime 0 seconds
 PoolPreparedStatements true
 MaxOpenPreparedStatements 1024
-ValidationQuery select null from dual
+ValidationQuery select 1 from dual
   
 ```
 
+=== Microsoft SQL Server
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  com.microsoft.sqlserver.jdbc.SQLServerDriver
+JdbcUrl jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+username sa
+password my-secret-pw1
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select 1
+  
 
+  
+URL jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+  
 
-=== Microsoft SQL Server
+  
+JdbcDriver com.microsoft.sqlserver.jdbc.SQLServerDriver
+JdbcUrl jdbc:sqlserver://yourserver.database.windows.net:1433;database=test
+UserName sa
+password my-secret-pw1
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select 1
+  
+```
+
+Please note that using XA with Microsoft SQL Server requires the MS DTC to be 
configured correctly, and sqljdbc_xa.dll to be installed. For instructions, 
please see this Microsoft article: 
https://docs.microsoft.com/en-us/sql/connect/jdbc/understanding-xa-transactions?view=sql-server-2017
 
 === MySQL
 
+```
+  
+
+  XaDataSource demo/jdbc/XADataSourceXA
+  JdbcDriver  com.mysql.cj.jdbc.Driver
+  JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+  username root
+  password my-secret-pw
+  JtaManaged true
+  InitialSize 10
+  MaxActive 128
+  MaxIdle 25
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  ValidationQuery select 1
+
+
+  Url jdbc:mysql://192.168.37.202:3306/movie
+
+
+
+  JdbcDriver com.mysql.cj.jdbc.Driver
+  JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+  UserName root
+  password my-secret-pw
+  JtaManaged false
+  InitialSize 10
+  MaxActive 100
+  MaxIdle 50
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  ValidationQuery select 1
+
+  
+```
+
 === PostgreSQL
 
+```
+  
+
+  XaDataSource demo/jdbc/XADataSourceXA
+  JdbcDriver org.postgresql.Driver 
+  JdbcUrl jdbc:postgresql://192.168.37.200:5432/movie
+  username postgres
+  password mysecretpassword
+  JtaManaged true
+  InitialSize 10
+  MaxActive 128
+  MaxIdle 25
+  MinIdle 10
+  AccessToUnderlyingConnectionAllowed true
+  TestOnBorrow false
+  TestWhileIdle true
+  TimeBetweenEvictionRuns 1 minute
+  MaxWaitTime 0 seconds
+  PoolPreparedStatements true
+  MaxOpenPreparedStatements 1024
+  ValidationQuery select 1
+
+
+
+  URL jdbc:postgresql

[tomee] 01/03: Provide some detail on configuring XA datasources

2019-07-22 Thread jgallimore
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

commit 26f624ffe87221e7206e497550db4c3e9789e39d
Author: Jonathan Gallimore 
AuthorDate: Fri Jul 12 16:44:21 2019 +0100

Provide some detail on configuring XA datasources
---
 docs/configuring-datasources-xa.adoc | 161 +++
 1 file changed, 161 insertions(+)

diff --git a/docs/configuring-datasources-xa.adoc 
b/docs/configuring-datasources-xa.adoc
new file mode 100644
index 000..8619806
--- /dev/null
+++ b/docs/configuring-datasources-xa.adoc
@@ -0,0 +1,161 @@
+= XA DataSource Configuration
+:index-group: Datasource
+:jbake-date: 2019-07-12
+:jbake-type: page
+:jbake-status: published
+
+== Introduction
+
+XA datasources are able to participate in global transactions involving
+more than one resource - for example, scenarios where a transaction needs 
+to encompass connections to two different databases,, or a database and
+a JMS resource. 
+
+The global transaction manager will provide a two phase commit for all
+the resources enlisted in the transaction - if any of the commit
+operations fail, then all the resources in the global transaction will
+be rolled back.
+
+JTA can still be used with non-XA datasources, however the datasource will
+use a local transaction as opposed to a global transaction.
+
+JDBC drivers providing XA capabilities provide an implementation of
+`javax.sql.XADataSource`. This makes them a little more tricky to configure
+than non-XA datasources. The general technique is to configure an instance
+of the vendor-provided `XADataSource` implementation, and to then point
+the usual non-XA resource at this instance. Sounds complex? Let's walk
+through an example. We'll also provide tested example configs for a number
+of well known databases at the end of this document.
+
+== Example
+
+In this example, we'll look at MySQL. First off, download the MySQL driver
+from: https://dev.mysql.com/downloads/connector/j/. Once you have the .jar
+file, add it to the TomEE `lib` directory. This driver provides the 
+`com.mysql.cj.jdbc.MysqlXADataSource` class. The properties that need to 
+be configured vary between datasources, so we'll need to get a list of the
+properties and work out the values to set.
+
+From the TomEE bin directory, execute the following command:
+`./tomee.sh setters -c com.mysql.cj.jdbc.MysqlXADataSource` on *nix systems,
+or 
+
+`tomee.bat setters -c com.mysql.cj.jdbc.MysqlXADataSource` on Windows systems.
+
+This will give a complete list of paramaters that are available for the XA 
+datasource. We'll simply use the `URL` paramater for the datasource.
+
+```
+  
+Url jdbc:mysql://192.168.37.202:3306/movie
+  
+```
+
+Next, we create a JtaManaged datasource as we normally would, and point it to 
the
+XA datasource using the `XaDataSource` attribute.
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  com.mysql.cj.jdbc.Driver
+JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+username root
+password my-secret-pw
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+ValidationQuery select null from dual
+  
+```
+
+And finally, a non-JTA managed datasource as well:
+
+```
+  
+JdbcDriver com.mysql.cj.jdbc.Driver
+JdbcUrl jdbc:mysql://192.168.37.202:3306/movie
+UserName root
+password my-secret-pw
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+ValidationQuery select null from dual
+  
+```
+
+== Sample configs
+
+=== Oracle
+
+```
+  
+XaDataSource demo/jdbc/XADataSourceXA
+JdbcDriver  oracle.jdbc.OracleDriver
+JdbcUrl jdbc:oracle:thin:@//192.168.37.214:1521/XE
+username system
+password my-cool-password
+JtaManaged true
+InitialSize 10
+MaxActive 128
+MaxIdle 25
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1 minute
+MaxWaitTime 0 seconds
+PoolPreparedStatements true
+MaxOpenPreparedStatements 1024
+ValidationQuery select null from dual
+  
+
+  
+Url jdbc:oracle:thin:@//192.168.37.214:1521/XE
+  
+
+  
+JdbcDriver oracle.jdbc.OracleDriver
+JdbcUrl jdbc:oracle:thin:@//192.168.37.214:1521/XE
+UserName system
+password my-cool-password
+JtaManaged false
+InitialSize 10
+MaxActive 100
+MaxIdle 50
+MinIdle 10
+AccessToUnderlyingConnectionAllowed true
+TestOnBorrow false
+TestWhileIdle true
+TimeBetweenEvictionRuns 1

svn commit: r1862833 - in /tomee/site/trunk/content: master/docs/index.html tomee-8.0/docs/index.html

2019-07-09 Thread jgallimore
Author: jgallimore
Date: Tue Jul  9 20:20:44 2019
New Revision: 1862833

URL: http://svn.apache.org/viewvc?rev=1862833=rev
Log:
Adding link for log4j2 config to index pages

Modified:
tomee/site/trunk/content/master/docs/index.html
tomee/site/trunk/content/tomee-8.0/docs/index.html

Modified: tomee/site/trunk/content/master/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/master/docs/index.html?rev=1862833=1862832=1862833=diff
==
--- tomee/site/trunk/content/master/docs/index.html (original)
+++ tomee/site/trunk/content/master/docs/index.html Tue Jul  9 20:20:44 2019
@@ -221,21 +221,22 @@
   Changing 
JMS Implementations
   Clients
   Configuring 
DataSources in tomee.xml
+  Configuring 
JavaMail
 
   
   
 
-  Configuring 
JavaMail
   Containers 
and Resources
   Deployments
   EJB over SSL
   JavaMailSession Configuration
+  JMS 
Resources and MDB Container
+  JNDI Names
 
   
   
 
-  JMS 
Resources and MDB Container
-  JNDI Names
+  Log4j2 
Configuration
   ORB Configuration
   Security
   System 
Properties

Modified: tomee/site/trunk/content/tomee-8.0/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/docs/index.html?rev=1862833=1862832=1862833=diff
==
--- tomee/site/trunk/content/tomee-8.0/docs/index.html (original)
+++ tomee/site/trunk/content/tomee-8.0/docs/index.html Tue Jul  9 20:20:44 2019
@@ -221,21 +221,22 @@
   Changing 
JMS Implementations
   Clients
   Configuring 
DataSources in tomee.xml
+  Configuring 
JavaMail
 
   
   
 
-  Configuring 
JavaMail
   Containers 
and Resources
   Deployments
   EJB over SSL
   JavaMailSession Configuration
+  JMS 
Resources and MDB Container
+  JNDI Names
 
   
   
 
-  JMS 
Resources and MDB Container
-  JNDI Names
+  Log4j2 
Configuration
   ORB Configuration
   Security
   System 
Properties




svn commit: r1862825 - in /tomee/site/trunk/content: latest/docs/admin/configuration/ latest/javadoc/org/apache/openejb/resource/jdbc/managed/local/ master/javadoc/org/apache/openejb/resource/jdbc/man

2019-07-09 Thread jgallimore
Author: jgallimore
Date: Tue Jul  9 17:09:58 2019
New Revision: 1862825

URL: http://svn.apache.org/viewvc?rev=1862825=rev
Log:
Syncing with site generator

Added:
tomee/site/trunk/content/latest/docs/admin/configuration/log4j2.html

tomee/site/trunk/content/latest/javadoc/org/apache/openejb/resource/jdbc/managed/local/Key.html

tomee/site/trunk/content/master/javadoc/org/apache/openejb/resource/jdbc/managed/local/Key.html

tomee/site/trunk/content/tomee-8.0/javadoc/org/apache/openejb/resource/jdbc/managed/local/Key.html

Added: tomee/site/trunk/content/latest/docs/admin/configuration/log4j2.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/docs/admin/configuration/log4j2.html?rev=1862825=auto
==
--- tomee/site/trunk/content/latest/docs/admin/configuration/log4j2.html (added)
+++ tomee/site/trunk/content/latest/docs/admin/configuration/log4j2.html Tue 
Jul  9 17:09:58 2019
@@ -0,0 +1,276 @@
+
+
+
+
+   
+   
+   
+   Apache TomEE
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+
+   
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-2717626-1']);
+  _gaq.push(['_setDomainName', 'apache.org']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? '<a  rel="nofollow" href="https://ssl">https://ssl</a>' : 
'<a  rel="nofollow" href="http://www">http://www</a>') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+  })();
+
+
+
+
+
+
+   
+   
+   
+   
+   
+
+   
+   
+   
+   Toggle 
navigation
+   
+   
+   
+   
+   
+   
+
+   
+
+
+
+
+   Apache TomEE
+
+   
+   
+   
+   
+   Documentation
+   Community
+   Security
+   Downloads
+   
+   
+   
+  
+   
+   
+   
+
+
+
+
+  
+
+  
+  
+
+ Download as PDF
+
+  
+  
+  Log4j2 Configuration
+
+  
+
+
+
+
+
+
+
+Title: Log4j2 with TomEE
+
+
+Out of the box, TomEE is uses a Java-Util-Logging (JUL) based logging 
system, which is configured using conf/logging.properties.
+
+
+Occassionally, users may wish to swap over to using Log4j2. These 
instructions detail how to do this with the latest TomEE versions.
+These instructions have been tested with TomEE 7.x and TomEE 8 SNAPSHOT 
(master) on July 9th, 2019.
+
+
+
+
+Setup
+
+
+Youll need to obtain the following jars: log4j-core, log4j-api and 
log4j-jul. These instructions were tested with the 2.12.0 versions:
+
+
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.0/log4j-core-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.0/log4j-core-2.12.0.jar
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.12.0/log4j-jul-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.12.0/log4j-jul-2.12.0.jar
+
+
+Add these to the TomEE bin directory. Add the following to setenv.sh on 
*nix:
+
+
+
+JAVA_OPTS="$JAVA_OPTS 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+LOGGING_CONFIG="-DnoOp"
+
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+
CLASSPATH=".:$CATALINA_BASE/bin:$CATALINA_BASE/bin/log4j-core-2.12.0.jar:$CATALINA_BASE/bin/log4j-a

svn commit: r1862824 - in /tomee/site/trunk/content: master/docs/admin/configuration/index.html tomee-8.0/docs/admin/configuration/index.html

2019-07-09 Thread jgallimore
Author: jgallimore
Date: Tue Jul  9 17:03:27 2019
New Revision: 1862824

URL: http://svn.apache.org/viewvc?rev=1862824=rev
Log:
Add links to log4j2 doc

Modified:
tomee/site/trunk/content/master/docs/admin/configuration/index.html
tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/index.html

Modified: tomee/site/trunk/content/master/docs/admin/configuration/index.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/master/docs/admin/configuration/index.html?rev=1862824=1862823=1862824=diff
==
--- tomee/site/trunk/content/master/docs/admin/configuration/index.html 
(original)
+++ tomee/site/trunk/content/master/docs/admin/configuration/index.html Tue Jul 
 9 17:03:27 2019
@@ -120,6 +120,9 @@ However for convenience it also provides
 
 Containers
 
+
+Using log4j2
+
 
 
 

Modified: tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/index.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/index.html?rev=1862824=1862823=1862824=diff
==
--- tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/index.html 
(original)
+++ tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/index.html Tue 
Jul  9 17:03:27 2019
@@ -120,6 +120,9 @@ However for convenience it also provides
 
 Containers
 
+
+Using log4j2
+
 
 
 




[tomee] branch master updated: Adding links to new doc for log4j2

2019-07-09 Thread jgallimore
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 ddd8962  Adding links to new doc for log4j2
ddd8962 is described below

commit ddd8962e290a6ba8c2e522b0699af55210ac0e75
Author: Jonathan Gallimore 
AuthorDate: Tue Jul 9 17:38:40 2019 +0100

Adding links to new doc for log4j2
---
 docs/admin/configuration/index.adoc  | 1 +
 docs/admin/configuration/log4j2.adoc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/docs/admin/configuration/index.adoc 
b/docs/admin/configuration/index.adoc
index 3f588a4..3c2f39c 100644
--- a/docs/admin/configuration/index.adoc
+++ b/docs/admin/configuration/index.adoc
@@ -13,6 +13,7 @@ However for convenience it also provides a hybrid XML 
alternative a.k.a. `conf/t
 - link:server.html[Server Configuration: Properties].
 - link:resources.html[Resources]
 - link:containers.html[Containers]
+- link:log4j2.html[Using log4j2]
 
 == Application
 
diff --git a/docs/admin/configuration/log4j2.adoc 
b/docs/admin/configuration/log4j2.adoc
index a341665..bd6cb6b 100644
--- a/docs/admin/configuration/log4j2.adoc
+++ b/docs/admin/configuration/log4j2.adoc
@@ -1,4 +1,5 @@
 = Log4j2 Configuration
+:index-group: Configuration
 :jbake-date: 2019-07-09
 :jbake-type: page
 :jbake-status: published



svn commit: r1862816 - /tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/log4j2.html

2019-07-09 Thread jgallimore
Author: jgallimore
Date: Tue Jul  9 14:42:24 2019
New Revision: 1862816

URL: http://svn.apache.org/viewvc?rev=1862816=rev
Log:
Adding log4j2 doc

Added:
tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/log4j2.html

Added: tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/log4j2.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/log4j2.html?rev=1862816=auto
==
--- tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/log4j2.html 
(added)
+++ tomee/site/trunk/content/tomee-8.0/docs/admin/configuration/log4j2.html Tue 
Jul  9 14:42:24 2019
@@ -0,0 +1,276 @@
+
+
+
+
+   
+   
+   
+   Apache TomEE
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+
+   
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-2717626-1']);
+  _gaq.push(['_setDomainName', 'apache.org']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? '<a  rel="nofollow" href="https://ssl">https://ssl</a>' : 
'<a  rel="nofollow" href="http://www">http://www</a>') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+  })();
+
+
+
+
+
+
+   
+   
+   
+   
+   
+
+   
+   
+   
+   Toggle 
navigation
+   
+   
+   
+   
+   
+   
+
+   
+
+
+
+
+   Apache TomEE
+
+   
+   
+   
+   
+   Documentation
+   Community
+   Security
+   Downloads
+   
+   
+   
+  
+   
+   
+   
+
+
+
+
+  
+
+  
+  
+
+ Download as PDF
+
+  
+  
+  Log4j2 Configuration
+
+  
+
+
+
+
+
+
+
+Title: Log4j2 with TomEE
+
+
+Out of the box, TomEE is uses a Java-Util-Logging (JUL) based logging 
system, which is configured using conf/logging.properties.
+
+
+Occassionally, users may wish to swap over to using Log4j2. These 
instructions detail how to do this with the latest TomEE versions.
+These instructions have been tested with TomEE 7.x and TomEE 8 SNAPSHOT 
(master) on July 9th, 2019.
+
+
+
+
+Setup
+
+
+Youll need to obtain the following jars: log4j-core, log4j-api and 
log4j-jul. These instructions were tested with the 2.12.0 versions:
+
+
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.0/log4j-core-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.0/log4j-core-2.12.0.jar
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.12.0/log4j-jul-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.12.0/log4j-jul-2.12.0.jar
+
+
+Add these to the TomEE bin directory. Add the following to setenv.sh on 
*nix:
+
+
+
+JAVA_OPTS="$JAVA_OPTS 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+LOGGING_CONFIG="-DnoOp"
+
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+
CLASSPATH=".:$CATALINA_BASE/bin:$CATALINA_BASE/bin/log4j-core-2.12.0.jar:$CATALINA_BASE/bin/log4j-api-2.12.0.jar:$CATALINA_BASE/bin/log4j-jul-2.12.0.jar"
+
+
+
+or add the following to setenv.bat on Windows:
+
+
+
+@echo off
+set "JAVA_OPTS=%JAVA_OPTS% 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
+set LOGGING_CONFIG=-DnoOpp
+set 
LOGGING_MANAGER=

svn commit: r1862815 - /tomee/site/trunk/content/master/docs/admin/configuration/log4j2.html

2019-07-09 Thread jgallimore
Author: jgallimore
Date: Tue Jul  9 14:40:59 2019
New Revision: 1862815

URL: http://svn.apache.org/viewvc?rev=1862815=rev
Log:
Add log4j2 doc

Added:
tomee/site/trunk/content/master/docs/admin/configuration/log4j2.html

Added: tomee/site/trunk/content/master/docs/admin/configuration/log4j2.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/master/docs/admin/configuration/log4j2.html?rev=1862815=auto
==
--- tomee/site/trunk/content/master/docs/admin/configuration/log4j2.html (added)
+++ tomee/site/trunk/content/master/docs/admin/configuration/log4j2.html Tue 
Jul  9 14:40:59 2019
@@ -0,0 +1,276 @@
+
+
+
+
+   
+   
+   
+   Apache TomEE
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+
+   
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-2717626-1']);
+  _gaq.push(['_setDomainName', 'apache.org']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? '<a  rel="nofollow" href="https://ssl">https://ssl</a>' : 
'<a  rel="nofollow" href="http://www">http://www</a>') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+  })();
+
+
+
+
+
+
+   
+   
+   
+   
+   
+
+   
+   
+   
+   Toggle 
navigation
+   
+   
+   
+   
+   
+   
+
+   
+
+
+
+
+   Apache TomEE
+
+   
+   
+   
+   
+   Documentation
+   Community
+   Security
+   Downloads
+   
+   
+   
+  
+   
+   
+   
+
+
+
+
+  
+
+  
+  
+
+ Download as PDF
+
+  
+  
+  Log4j2 Configuration
+
+  
+
+
+
+
+
+
+
+Title: Log4j2 with TomEE
+
+
+Out of the box, TomEE is uses a Java-Util-Logging (JUL) based logging 
system, which is configured using conf/logging.properties.
+
+
+Occassionally, users may wish to swap over to using Log4j2. These 
instructions detail how to do this with the latest TomEE versions.
+These instructions have been tested with TomEE 7.x and TomEE 8 SNAPSHOT 
(master) on July 9th, 2019.
+
+
+
+
+Setup
+
+
+Youll need to obtain the following jars: log4j-core, log4j-api and 
log4j-jul. These instructions were tested with the 2.12.0 versions:
+
+
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.0/log4j-core-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.0/log4j-core-2.12.0.jar
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.12.0/log4j-jul-2.12.0.jar;
 
class="bare">https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.12.0/log4j-jul-2.12.0.jar
+
+
+Add these to the TomEE bin directory. Add the following to setenv.sh on 
*nix:
+
+
+
+JAVA_OPTS="$JAVA_OPTS 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+LOGGING_CONFIG="-DnoOp"
+
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+
CLASSPATH=".:$CATALINA_BASE/bin:$CATALINA_BASE/bin/log4j-core-2.12.0.jar:$CATALINA_BASE/bin/log4j-api-2.12.0.jar:$CATALINA_BASE/bin/log4j-jul-2.12.0.jar"
+
+
+
+or add the following to setenv.bat on Windows:
+
+
+
+@echo off
+set "JAVA_OPTS=%JAVA_OPTS% 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
+set LOGGING_CONFIG=-DnoOpp
+set 
LOGGING_MANAGER=-Djava.util.logging

[tomee] branch master updated: Adding log4j2 doc

2019-07-09 Thread jgallimore
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 68ae283  Adding log4j2 doc
 new 3c5fed7  Merge branch 'master' of https://github.com/jgallimore/tomee
68ae283 is described below

commit 68ae28312528cbc7b008372b43a0e24a418bed25
Author: Jonathan Gallimore 
AuthorDate: Tue Jul 9 15:27:02 2019 +0100

Adding log4j2 doc
---
 docs/admin/configuration/log4j2.adoc | 70 
 1 file changed, 70 insertions(+)

diff --git a/docs/admin/configuration/log4j2.adoc 
b/docs/admin/configuration/log4j2.adoc
new file mode 100644
index 000..a341665
--- /dev/null
+++ b/docs/admin/configuration/log4j2.adoc
@@ -0,0 +1,70 @@
+= Log4j2 Configuration
+:jbake-date: 2019-07-09
+:jbake-type: page
+:jbake-status: published
+:jbake-tomeepdf:
+
+Title: Log4j2 with TomEE
+
+Out of the box, TomEE is uses a Java-Util-Logging (JUL) based logging system, 
which is configured using conf/logging.properties.
+
+Occassionally, users may wish to swap over to using Log4j2. These instructions 
detail how to do this with the latest TomEE versions.
+These instructions have been tested with TomEE 7.x and TomEE 8 SNAPSHOT 
(master) on July 9th, 2019.
+
+== Setup
+
+You'll need to obtain the following jars: log4j-core, log4j-api and log4j-jul. 
These instructions were tested with the 2.12.0 versions:
+
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.0/log4j-core-2.12.0.jar
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar
+https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.12.0/log4j-jul-2.12.0.jar
+
+Add these to the TomEE bin directory. Add the following to setenv.sh on *nix:
+
+```
+JAVA_OPTS="$JAVA_OPTS 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+LOGGING_CONFIG="-DnoOp"
+
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+
CLASSPATH=".:$CATALINA_BASE/bin:$CATALINA_BASE/bin/log4j-core-2.12.0.jar:$CATALINA_BASE/bin/log4j-api-2.12.0.jar:$CATALINA_BASE/bin/log4j-jul-2.12.0.jar"
+```
+
+or add the following to setenv.bat on Windows:
+
+```
+@echo off
+set "JAVA_OPTS=%JAVA_OPTS% 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
+set LOGGING_CONFIG=-DnoOpp
+set 
LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
+set 
"CLASSPATH=.;%CATALINA_BASE%\bin;%CATALINA_BASE%\bin\log4j-core-2.12.0.jar;%CATALINA_BASE%\bin\log4j-api-2.12.0.jar;%CATALINA_BASE%\bin\log4j-jul-2.12.0.jar"
+```
+
+Take care to match the jar filenames if you have downloaded jars for a 
slightly different version of log4j2.
+
+== Configuration
+
+Add your log4j2.xml config in the `bin` directory.  Here's a simple config you 
can use to help you get started:
+
+```
+
+
+
+
+
+
+
+
+%d %p %c{1.} [%t] %m%n
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
\ No newline at end of file



[tomee-site-generator] branch master updated: Revert "Adding information on running with log4j2"

2019-07-09 Thread jgallimore
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-site-generator.git


The following commit(s) were added to refs/heads/master by this push:
 new c3d6993  Revert "Adding information on running with log4j2"
c3d6993 is described below

commit c3d699308d75abaa3c857ae88cd3c948613a2545
Author: Jonathan Gallimore 
AuthorDate: Tue Jul 9 14:29:46 2019 +

Revert "Adding information on running with log4j2"

This reverts commit 9b7132336910891dcb4d643d53bc8bc53b50e791.
---
 src/main/jbake/content/log4j2.md | 67 
 1 file changed, 67 deletions(-)

diff --git a/src/main/jbake/content/log4j2.md b/src/main/jbake/content/log4j2.md
deleted file mode 100644
index fde2757..000
--- a/src/main/jbake/content/log4j2.md
+++ /dev/null
@@ -1,67 +0,0 @@
-Title: Log4j2 with TomEE
-
-Out of the box, TomEE is uses a Java-Util-Logging (JUL) based logging system, 
which is configured using conf/logging.properties.
-
-Occassionally, users may wish to swap over to using Log4j2. These instructions 
detail how to do this with the latest TomEE versions.
-These instructions have been tested with XX on July 9th, 2019.
-
-###Setup
-
-You'll need to obtain the following jars: log4j-core, log4j-api and log4j-jul. 
These instructions were tested with the 2.12.0 versions:
-
-https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.0/log4j-core-2.12.0.jar
-https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar
-https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.12.0/log4j-jul-2.12.0.jar
-
-Add these to the TomEE bin directory. Add the following to setenv.sh on *nix:
-
-```
-JAVA_OPTS="$JAVA_OPTS 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
-LOGGING_CONFIG="-DnoOp"
-
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
-
CLASSPATH=".:$CATALINA_BASE/bin:$CATALINA_BASE/bin/log4j-core-2.12.0.jar:$CATALINA_BASE/bin/log4j-api-2.12.0.jar:$CATALINA_BASE/bin/log4j-jul-2.12.0.jar"
-```
-
-or add the following to setenv.bat on Windows:
-
-```
-@echo off
-set "JAVA_OPTS=%JAVA_OPTS% 
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
-set LOGGING_CONFIG=-DnoOpp
-set 
LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
-set 
"CLASSPATH=.;%CATALINA_BASE%\bin;%CATALINA_BASE%\bin\log4j-core-2.12.0.jar;%CATALINA_BASE%\bin\log4j-api-2.12.0.jar;%CATALINA_BASE%\bin\log4j-jul-2.12.0.jar"
-```
-
-Take care to match the jar filenames if you have downloaded jars for a 
slightly different version of log4j2.
-
-###Configuration
-
-Add your log4j2.xml config in the `bin` directory.  Here's a simple config you 
can use to help you get started:
-
-```
-
-
-
-
-
-
-
-
-%d %p %c{1.} [%t] %m%n
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-
-



<    5   6   7   8   9   10   11   12   13   14   >