Jenkins build is still unstable: ActiveMQ-Java8-5.14.x » ActiveMQ :: Unit Tests #38

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8-5.14.x » ActiveMQ :: Karaf Integration Tests #38

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8-5.14.x » ActiveMQ :: MQTT Protocol #38

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8-5.14.x #38

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 » ActiveMQ :: MQTT Protocol #961

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : ActiveMQ-Java8 » ActiveMQ :: Unit Tests #961

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : ActiveMQ-Java8 » ActiveMQ :: HTTP Protocol Support #961

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 #961

2017-02-28 Thread Apache Jenkins Server
See 




activemq git commit: [AMQ-6603] ensure failover does not track consumer creation that fails with an exception, fix and test. Thanks for the test Tadayoshi Sato

2017-02-28 Thread gtully
Repository: activemq
Updated Branches:
  refs/heads/master b6521e292 -> 864192855


[AMQ-6603] ensure failover does not track consumer creation that fails with an 
exception, fix and test. Thanks for the test Tadayoshi Sato


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/86419285
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/86419285
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/86419285

Branch: refs/heads/master
Commit: 8641928553e0f1d97416fd010c2f7d6f165b3660
Parents: b6521e2
Author: gtully 
Authored: Tue Feb 28 17:17:18 2017 +
Committer: gtully 
Committed: Tue Feb 28 17:17:18 2017 +

--
 .../activemq/state/ConnectionStateTracker.java  |  18 ++
 activemq-pool/pom.xml   |   5 +
 .../activemq/pool/PooledConsumerTest.java   | 223 +++
 3 files changed, 246 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/86419285/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
--
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
 
b/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
index 8fdcd77..2caab8f 100644
--- 
a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
@@ -108,6 +108,21 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 }
 }
 
+private final class ExceptionResponseCheckAction implements 
ResponseHandler {
+private final ConsumerInfo info;
+
+public ExceptionResponseCheckAction(ConsumerInfo info) {
+this.info = info;
+}
+
+@Override
+public void onResponse(Command response) {
+if (ExceptionResponse.DATA_STRUCTURE_TYPE == 
response.getDataStructureType()) {
+processRemoveConsumer(info.getConsumerId(), 0l);
+}
+}
+}
+
 private class PrepareReadonlyTransactionAction extends 
RemoveTransactionAction {
 public PrepareReadonlyTransactionAction(TransactionInfo info) {
 super(info);
@@ -415,6 +430,9 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 SessionState ss = cs.getSessionState(sessionId);
 if (ss != null) {
 ss.addConsumer(info);
+if (info.isResponseRequired()) {
+return new Tracked(new 
ExceptionResponseCheckAction(info));
+}
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/86419285/activemq-pool/pom.xml
--
diff --git a/activemq-pool/pom.xml b/activemq-pool/pom.xml
index edb2286..305bf0c 100644
--- a/activemq-pool/pom.xml
+++ b/activemq-pool/pom.xml
@@ -104,6 +104,11 @@
   log4j
   test
 
+
+  ${project.groupId}
+  activemq-jaas
+  test
+
   
   
   

http://git-wip-us.apache.org/repos/asf/activemq/blob/86419285/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConsumerTest.java
--
diff --git 
a/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConsumerTest.java 
b/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConsumerTest.java
new file mode 100644
index 000..4311f8e
--- /dev/null
+++ 
b/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConsumerTest.java
@@ -0,0 +1,223 @@
+/**
+ * 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.activemq.pool;
+
+import com.google.common.base.Strings;
+import org.apache.activemq.broker.BrokerPlugin;
+import 

[1/2] activemq-artemis git commit: ARTEMIS-919 JMS reloader reading core queues

2017-02-28 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 52d25431f -> fc1d05dae


ARTEMIS-919 JMS reloader reading core queues

(cherry picked from commit b58252401702b80a8ffa67f4252803ec09ea4fc5)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/cd6ce0f9
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/cd6ce0f9
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/cd6ce0f9

Branch: refs/heads/master
Commit: cd6ce0f951031be21c248af4c0586bd805a5ef31
Parents: 52d2543
Author: Justin Bertram 
Authored: Tue Feb 28 13:55:03 2017 -0600
Committer: Justin Bertram 
Committed: Tue Feb 28 14:02:40 2017 -0600

--
 .../artemis/jms/server/impl/JMSServerManagerImpl.java| 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cd6ce0f9/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
--
diff --git 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index b537e80..2fa7108 100644
--- 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -97,6 +97,7 @@ import org.apache.activemq.artemis.utils.TypedProperties;
 import org.apache.activemq.artemis.utils.XMLUtil;
 import org.jboss.logging.Logger;
 import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
 
 /**
  * A Deployer used to create and add to Bindings queues, topics and connection
@@ -1718,11 +1719,13 @@ public class JMSServerManagerImpl implements 
JMSServerManager, ActivateCallback
  Element e = XMLUtil.stringToElement(xml);
 
  if (config instanceof FileJMSConfiguration) {
-((FileJMSConfiguration) config).parse(e, url);
-
-JMSServerManagerImpl.this.deploy();
+NodeList children = e.getElementsByTagName("jms");
+//if the "jms" element exists then parse it
+if (children.getLength() > 0) {
+   ((FileJMSConfiguration) config).parse((Element) 
children.item(0), url);
+   JMSServerManagerImpl.this.deploy();
+}
  }
-
   }
}
 



activemq git commit: AMQ-6603 Stop tracking producer if creation failed

2017-02-28 Thread tabish
Repository: activemq
Updated Branches:
  refs/heads/master 864192855 -> 90b808ab9


AMQ-6603 Stop tracking producer if creation failed

Track the message producer create and ensure it is not recreated on
failover if the creation resulted in an error response.  Add failover
level tests to cover consumer and producer failed create tracking.

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/90b808ab
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/90b808ab
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/90b808ab

Branch: refs/heads/master
Commit: 90b808ab98b760f06885a5f45628353c9d2224f2
Parents: 8641928
Author: Timothy Bish 
Authored: Tue Feb 28 16:17:32 2017 -0500
Committer: Timothy Bish 
Committed: Tue Feb 28 16:17:32 2017 -0500

--
 .../activemq/state/ConnectionStateTracker.java  |  19 +-
 .../failover/FailoverStateTrackingTest.java | 260 +++
 2 files changed, 273 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/90b808ab/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
--
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
 
b/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
index 2caab8f..d79df89 100644
--- 
a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
@@ -61,7 +61,7 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 
 private static final Tracked TRACKED_RESPONSE_MARKER = new Tracked(null);
 private static final int MESSAGE_PULL_SIZE = 400;
-protected final ConcurrentMap 
connectionStates = new ConcurrentHashMap();
+protected final ConcurrentMap 
connectionStates = new ConcurrentHashMap<>();
 
 private boolean trackTransactions;
 private boolean restoreSessions = true;
@@ -109,16 +109,20 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 }
 
 private final class ExceptionResponseCheckAction implements 
ResponseHandler {
-private final ConsumerInfo info;
+private final Command tracked;
 
-public ExceptionResponseCheckAction(ConsumerInfo info) {
-this.info = info;
+public ExceptionResponseCheckAction(Command tracked) {
+this.tracked = tracked;
 }
 
 @Override
 public void onResponse(Command response) {
 if (ExceptionResponse.DATA_STRUCTURE_TYPE == 
response.getDataStructureType()) {
-processRemoveConsumer(info.getConsumerId(), 0l);
+if (tracked.getDataStructureType() == 
ConsumerInfo.DATA_STRUCTURE_TYPE) {
+processRemoveConsumer(((ConsumerInfo) 
tracked).getConsumerId(), 0l);
+} else if (tracked.getDataStructureType() == 
ProducerInfo.DATA_STRUCTURE_TYPE) {
+processRemoveProducer(((ProducerInfo) 
tracked).getProducerId());
+}
 }
 }
 }
@@ -218,7 +222,7 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 }
 
 private void restoreTransactions(Transport transport, ConnectionState 
connectionState) throws IOException {
-Vector toRollback = new Vector();
+Vector toRollback = new Vector<>();
 for (TransactionState transactionState : 
connectionState.getTransactionStates()) {
 if (LOG.isDebugEnabled()) {
 LOG.debug("tx: " + transactionState.getId());
@@ -390,6 +394,9 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 SessionState ss = cs.getSessionState(sessionId);
 if (ss != null) {
 ss.addProducer(info);
+if (info.isResponseRequired()) {
+return new Tracked(new 
ExceptionResponseCheckAction(info));
+}
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/90b808ab/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverStateTrackingTest.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverStateTrackingTest.java
 
b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverStateTrackingTest.java
new 

[2/2] activemq-artemis git commit: This closes #1056

2017-02-28 Thread clebertsuconic
This closes #1056


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/75ed0bf7
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/75ed0bf7
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/75ed0bf7

Branch: refs/heads/1.x
Commit: 75ed0bf7bbf72086b917f05969de0585b8c740f8
Parents: fbdac0c b582524
Author: Clebert Suconic 
Authored: Tue Feb 28 15:06:12 2017 -0500
Committer: Clebert Suconic 
Committed: Tue Feb 28 15:06:12 2017 -0500

--
 .../artemis/jms/server/impl/JMSServerManagerImpl.java| 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--




[1/2] activemq-artemis git commit: ARTEMIS-919 JMS reloader reading core queues

2017-02-28 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x fbdac0c97 -> 75ed0bf7b


ARTEMIS-919 JMS reloader reading core queues


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b5825240
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b5825240
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b5825240

Branch: refs/heads/1.x
Commit: b58252401702b80a8ffa67f4252803ec09ea4fc5
Parents: fbdac0c
Author: Justin Bertram 
Authored: Tue Feb 28 13:55:03 2017 -0600
Committer: Justin Bertram 
Committed: Tue Feb 28 13:55:27 2017 -0600

--
 .../artemis/jms/server/impl/JMSServerManagerImpl.java| 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b5825240/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
--
diff --git 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 36b4d8b..b5bc701 100644
--- 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -102,6 +102,7 @@ import org.apache.activemq.artemis.utils.TypedProperties;
 import org.apache.activemq.artemis.utils.XMLUtil;
 import org.jboss.logging.Logger;
 import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
 
 /**
  * A Deployer used to create and add to Bindings queues, topics and connection
@@ -1748,11 +1749,13 @@ public class JMSServerManagerImpl implements 
JMSServerManager, ActivateCallback
  Element e = XMLUtil.stringToElement(xml);
 
  if (config instanceof FileJMSConfiguration) {
-((FileJMSConfiguration) config).parse(e, url);
-
-JMSServerManagerImpl.this.deploy();
+NodeList children = e.getElementsByTagName("jms");
+//if the "jms" element exists then parse it
+if (children.getLength() > 0) {
+   ((FileJMSConfiguration) config).parse((Element) 
children.item(0), url);
+   JMSServerManagerImpl.this.deploy();
+}
  }
-
   }
}
 



[2/2] activemq-artemis git commit: ARTEMIS-1003: Fix code example in User Guide for Large Messages

2017-02-28 Thread jbertram
ARTEMIS-1003: Fix code example in User Guide for Large Messages


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/03ba5301
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/03ba5301
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/03ba5301

Branch: refs/heads/master
Commit: 03ba53017f72a3eb031bf4b92820ec7affc01335
Parents: fc1d05d
Author: Sande Gilda 
Authored: Mon Feb 27 13:15:47 2017 -0500
Committer: Justin Bertram 
Committed: Tue Feb 28 15:20:38 2017 -0600

--
 docs/user-manual/en/large-messages.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/03ba5301/docs/user-manual/en/large-messages.md
--
diff --git a/docs/user-manual/en/large-messages.md 
b/docs/user-manual/en/large-messages.md
index 0904cb7..0ae1573 100644
--- a/docs/user-manual/en/large-messages.md
+++ b/docs/user-manual/en/large-messages.md
@@ -196,7 +196,7 @@ msg.saveOutputStream(someOutputStream);
 ClientMessage msg2 = consumer.receive(...);
 
 // This will not wait the transfer to finish
-msg.setOutputStream(someOtherOutputStream);
+msg2.setOutputStream(someOtherOutputStream);
 ```
 
 Set the input stream when sending a core message:



[2/2] activemq git commit: AMQ-6603 Stop tracking producer if creation failed

2017-02-28 Thread tabish
AMQ-6603 Stop tracking producer if creation failed

Track the message producer create and ensure it is not recreated on
failover if the creation resulted in an error response.  Add failover
level tests to cover consumer and producer failed create tracking.
(cherry picked from commit 90b808ab98b760f06885a5f45628353c9d2224f2)


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/4c5a7042
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/4c5a7042
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/4c5a7042

Branch: refs/heads/activemq-5.14.x
Commit: 4c5a70421c2ed39d0faeb78593728ac170812343
Parents: 5a52bf2
Author: Timothy Bish 
Authored: Tue Feb 28 16:17:32 2017 -0500
Committer: Timothy Bish 
Committed: Tue Feb 28 16:20:19 2017 -0500

--
 .../activemq/state/ConnectionStateTracker.java  |  19 +-
 .../failover/FailoverStateTrackingTest.java | 260 +++
 2 files changed, 273 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/4c5a7042/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
--
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
 
b/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
index 2caab8f..d79df89 100755
--- 
a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
@@ -61,7 +61,7 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 
 private static final Tracked TRACKED_RESPONSE_MARKER = new Tracked(null);
 private static final int MESSAGE_PULL_SIZE = 400;
-protected final ConcurrentMap 
connectionStates = new ConcurrentHashMap();
+protected final ConcurrentMap 
connectionStates = new ConcurrentHashMap<>();
 
 private boolean trackTransactions;
 private boolean restoreSessions = true;
@@ -109,16 +109,20 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 }
 
 private final class ExceptionResponseCheckAction implements 
ResponseHandler {
-private final ConsumerInfo info;
+private final Command tracked;
 
-public ExceptionResponseCheckAction(ConsumerInfo info) {
-this.info = info;
+public ExceptionResponseCheckAction(Command tracked) {
+this.tracked = tracked;
 }
 
 @Override
 public void onResponse(Command response) {
 if (ExceptionResponse.DATA_STRUCTURE_TYPE == 
response.getDataStructureType()) {
-processRemoveConsumer(info.getConsumerId(), 0l);
+if (tracked.getDataStructureType() == 
ConsumerInfo.DATA_STRUCTURE_TYPE) {
+processRemoveConsumer(((ConsumerInfo) 
tracked).getConsumerId(), 0l);
+} else if (tracked.getDataStructureType() == 
ProducerInfo.DATA_STRUCTURE_TYPE) {
+processRemoveProducer(((ProducerInfo) 
tracked).getProducerId());
+}
 }
 }
 }
@@ -218,7 +222,7 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 }
 
 private void restoreTransactions(Transport transport, ConnectionState 
connectionState) throws IOException {
-Vector toRollback = new Vector();
+Vector toRollback = new Vector<>();
 for (TransactionState transactionState : 
connectionState.getTransactionStates()) {
 if (LOG.isDebugEnabled()) {
 LOG.debug("tx: " + transactionState.getId());
@@ -390,6 +394,9 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 SessionState ss = cs.getSessionState(sessionId);
 if (ss != null) {
 ss.addProducer(info);
+if (info.isResponseRequired()) {
+return new Tracked(new 
ExceptionResponseCheckAction(info));
+}
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/4c5a7042/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverStateTrackingTest.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverStateTrackingTest.java
 
b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverStateTrackingTest.java
new file 

[1/2] activemq git commit: [AMQ-6603] ensure failover does not track consumer creation that fails with an exception, fix and test. Thanks for the test Tadayoshi Sato

2017-02-28 Thread tabish
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.14.x 6d848c440 -> 4c5a70421


[AMQ-6603] ensure failover does not track consumer creation that fails with an 
exception, fix and test. Thanks for the test Tadayoshi Sato

(cherry picked from commit 8641928553e0f1d97416fd010c2f7d6f165b3660)


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/5a52bf2a
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/5a52bf2a
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/5a52bf2a

Branch: refs/heads/activemq-5.14.x
Commit: 5a52bf2a51909bcb2b4a7e5301e4bddf5aadb0c4
Parents: 6d848c4
Author: gtully 
Authored: Tue Feb 28 17:17:18 2017 +
Committer: Timothy Bish 
Committed: Tue Feb 28 16:20:08 2017 -0500

--
 .../activemq/state/ConnectionStateTracker.java  |  18 ++
 activemq-pool/pom.xml   |   5 +
 .../activemq/pool/PooledConsumerTest.java   | 223 +++
 3 files changed, 246 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/5a52bf2a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
--
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
 
b/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
index 8fdcd77..2caab8f 100755
--- 
a/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
@@ -108,6 +108,21 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 }
 }
 
+private final class ExceptionResponseCheckAction implements 
ResponseHandler {
+private final ConsumerInfo info;
+
+public ExceptionResponseCheckAction(ConsumerInfo info) {
+this.info = info;
+}
+
+@Override
+public void onResponse(Command response) {
+if (ExceptionResponse.DATA_STRUCTURE_TYPE == 
response.getDataStructureType()) {
+processRemoveConsumer(info.getConsumerId(), 0l);
+}
+}
+}
+
 private class PrepareReadonlyTransactionAction extends 
RemoveTransactionAction {
 public PrepareReadonlyTransactionAction(TransactionInfo info) {
 super(info);
@@ -415,6 +430,9 @@ public class ConnectionStateTracker extends 
CommandVisitorAdapter {
 SessionState ss = cs.getSessionState(sessionId);
 if (ss != null) {
 ss.addConsumer(info);
+if (info.isResponseRequired()) {
+return new Tracked(new 
ExceptionResponseCheckAction(info));
+}
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/5a52bf2a/activemq-pool/pom.xml
--
diff --git a/activemq-pool/pom.xml b/activemq-pool/pom.xml
index 76a94cb..6f956c6 100755
--- a/activemq-pool/pom.xml
+++ b/activemq-pool/pom.xml
@@ -104,6 +104,11 @@
   log4j
   test
 
+
+  ${project.groupId}
+  activemq-jaas
+  test
+
   
   
   

http://git-wip-us.apache.org/repos/asf/activemq/blob/5a52bf2a/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConsumerTest.java
--
diff --git 
a/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConsumerTest.java 
b/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConsumerTest.java
new file mode 100644
index 000..4311f8e
--- /dev/null
+++ 
b/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConsumerTest.java
@@ -0,0 +1,223 @@
+/**
+ * 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.activemq.pool;
+
+import 

[1/2] activemq-artemis git commit: This closes #1054

2017-02-28 Thread jbertram
Repository: activemq-artemis
Updated Branches:
  refs/heads/master fc1d05dae -> 87d6c3500


This closes #1054


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/87d6c350
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/87d6c350
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/87d6c350

Branch: refs/heads/master
Commit: 87d6c3500f10fd8be260ddedba848702c3b7a4bc
Parents: fc1d05d 03ba530
Author: Justin Bertram 
Authored: Tue Feb 28 15:20:38 2017 -0600
Committer: Justin Bertram 
Committed: Tue Feb 28 15:20:38 2017 -0600

--
 docs/user-manual/en/large-messages.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--




Build failed in Jenkins: ActiveMQ-Artemis-Master #888

2017-02-28 Thread Apache Jenkins Server
See 


Changes:

[clebertsuconic] ARTEMIS-1006: JDBC should log proper warns with stack traces on

--
[...truncated 48.72 KB...]
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
 [surefire-booter-2.18.1.jar:2.18.1]
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) 
[surefire-booter-2.18.1.jar:2.18.1]

[Network-Checker-0 (NetworkChecker-1957502751)] 02:03:14,619 WARN  
[org.apache.activemq.artemis.core.server.NetworkHealthCheck] Connection refused 
(Connection refused): java.net.ConnectException: Connection refused (Connection 
refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) 
[rt.jar:1.8.0_121]
at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 
[rt.jar:1.8.0_121]
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
 [rt.jar:1.8.0_121]
at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 
[rt.jar:1.8.0_121]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
[rt.jar:1.8.0_121]
at java.net.Socket.connect(Socket.java:589) [rt.jar:1.8.0_121]
at java.net.Socket.connect(Socket.java:538) [rt.jar:1.8.0_121]
at sun.net.NetworkClient.doConnect(NetworkClient.java:180) 
[rt.jar:1.8.0_121]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) 
[rt.jar:1.8.0_121]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) 
[rt.jar:1.8.0_121]
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:781) 
[rt.jar:1.8.0_121]
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647) 
[rt.jar:1.8.0_121]
at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)
 [rt.jar:1.8.0_121]
at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
 [rt.jar:1.8.0_121]
at 
org.apache.activemq.artemis.core.server.NetworkHealthCheck.check(NetworkHealthCheck.java:392)
 [:]
at 
org.apache.activemq.artemis.core.server.NetworkHealthCheck.check(NetworkHealthCheck.java:312)
 [:]
at 
org.apache.activemq.artemis.core.server.NetworkHealthCheck.run(NetworkHealthCheck.java:273)
 [:]
at 
org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent$2.run(ActiveMQScheduledComponent.java:189)
 [:]
at 
org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent$3.run(ActiveMQScheduledComponent.java:199)
 [:]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[rt.jar:1.8.0_121]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
[rt.jar:1.8.0_121]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 [rt.jar:1.8.0_121]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 [rt.jar:1.8.0_121]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[rt.jar:1.8.0_121]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[rt.jar:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]

[Network-Checker-0 (NetworkChecker-1957502751)] 02:03:14,624 INFO  
[org.apache.activemq.artemis.core.server.NetworkHealthCheck] Network is 
unhealthy, stopping service 
org.apache.activemq.artemis.utils.NetworkHealthTest$1@e720b71
[Network-Checker-0 (NetworkChecker-1957502751)] 02:03:14,732 INFO  
[org.apache.activemq.artemis.core.server.NetworkHealthCheck] Network is 
healthy, starting service 
org.apache.activemq.artemis.utils.NetworkHealthTest$1@e720b71
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.799 sec - in 
org.apache.activemq.artemis.utils.NetworkHealthTest
Running org.apache.activemq.artemis.utils.PairTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec - in 
org.apache.activemq.artemis.utils.PairTest
Running org.apache.activemq.artemis.utils.ReferenceCounterTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.627 sec - in 
org.apache.activemq.artemis.utils.ReferenceCounterTest
Running org.apache.activemq.artemis.utils.SimpleFutureTest
*
LEAKING THREADS
=
Thread Thread[Thread-408,5,main] is still alive with the following stackTrace:
sun.misc.Unsafe.unpark(Native Method)
java.util.concurrent.locks.LockSupport.unpark(LockSupport.java:141)
java.util.concurrent.locks.AbstractQueuedSynchronizer.unparkSuccessor(AbstractQueuedSynchronizer.java:662)

activemq-artemis git commit: ARTEMIS-1006: JDBC should log proper warns with stack traces on SQLExceptions

2017-02-28 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x 75ed0bf7b -> 9e137add6


ARTEMIS-1006: JDBC should log proper warns with stack traces on SQLExceptions

(cherry picked from commit 70721dcd5c689c14e5df328471518d43db42)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/9e137add
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/9e137add
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/9e137add

Branch: refs/heads/1.x
Commit: 9e137add673e1f9b338a79c4d8d05e772eb65f9e
Parents: 75ed0bf
Author: Clebert Suconic 
Authored: Tue Feb 28 20:18:41 2017 -0500
Committer: Clebert Suconic 
Committed: Tue Feb 28 20:24:17 2017 -0500

--
 .../activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9e137add/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
--
diff --git 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
index dbab0e6..eb7cda1 100644
--- 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
+++ 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
@@ -198,6 +198,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver 
implements Journal {
 }
  }
   } catch (SQLException e) {
+ logger.warn(e.getMessage(), e);
  executeCallbacks(recordRef, success);
  return 0;
   }
@@ -212,6 +213,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver 
implements Journal {
  connection.commit();
  success = true;
   } catch (SQLException e) {
+ logger.warn(e.getMessage(), e);
  performRollback(recordRef);
   }
 
@@ -276,6 +278,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver 
implements Journal {
 }
  }
   } catch (Exception sqlE) {
+ logger.warn(sqlE.getMessage(), sqlE);
  ActiveMQJournalLogger.LOGGER.error("Error performing rollback", sqlE);
   }
}
@@ -670,6 +673,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver 
implements Journal {
  rs.next();
  count = rs.getInt(1);
   } catch (SQLException e) {
+ logger.warn(e.getMessage(), e);
  return -1;
   }
   return count;



activemq-artemis git commit: ARTEMIS-1006: JDBC should log proper warns with stack traces on SQLExceptions

2017-02-28 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 87d6c3500 -> 70721dcd5


ARTEMIS-1006: JDBC should log proper warns with stack traces on SQLExceptions


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/70721dcd
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/70721dcd
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/70721dcd

Branch: refs/heads/master
Commit: 70721dcd5c689c14e5df328471518d43db42
Parents: 87d6c35
Author: Clebert Suconic 
Authored: Tue Feb 28 20:18:41 2017 -0500
Committer: Clebert Suconic 
Committed: Tue Feb 28 20:23:54 2017 -0500

--
 .../activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/70721dcd/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
--
diff --git 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
index dbab0e6..eb7cda1 100644
--- 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
+++ 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
@@ -198,6 +198,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver 
implements Journal {
 }
  }
   } catch (SQLException e) {
+ logger.warn(e.getMessage(), e);
  executeCallbacks(recordRef, success);
  return 0;
   }
@@ -212,6 +213,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver 
implements Journal {
  connection.commit();
  success = true;
   } catch (SQLException e) {
+ logger.warn(e.getMessage(), e);
  performRollback(recordRef);
   }
 
@@ -276,6 +278,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver 
implements Journal {
 }
  }
   } catch (Exception sqlE) {
+ logger.warn(sqlE.getMessage(), sqlE);
  ActiveMQJournalLogger.LOGGER.error("Error performing rollback", sqlE);
   }
}
@@ -670,6 +673,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver 
implements Journal {
  rs.next();
  count = rs.getInt(1);
   } catch (SQLException e) {
+ logger.warn(e.getMessage(), e);
  return -1;
   }
   return count;



Jenkins build became unstable: ActiveMQ-Java8 » ActiveMQ :: HTTP Protocol Support #963

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 #963

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 » ActiveMQ :: Unit Tests #963

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 » ActiveMQ :: MQTT Protocol #963

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8-All-UnitTests #638

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build became unstable: ActiveMQ-Java8 » ActiveMQ :: Unit Tests #962

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 » ActiveMQ :: MQTT Protocol #962

2017-02-28 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 #962

2017-02-28 Thread Apache Jenkins Server
See