Jenkins build is still unstable: ActiveMQ-Java8 #1057

2017-08-24 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : ActiveMQ-Java8 » ActiveMQ :: STOMP Protocol #1057

2017-08-24 Thread Apache Jenkins Server
See 




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

2017-08-24 Thread Apache Jenkins Server
See 




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

2017-08-24 Thread Apache Jenkins Server
See 


Changes:

[clebertsuconic] ARTEMIS-1367 Moving CriticalAnalyzerPolicy

--
[...truncated 1.87 MB...]
[main] 22:26:56,610 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testRemoveTail3()...
#test testRemoveTail3
[main] 22:26:56,619 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testRemoveTail3()...
[main] 22:26:56,619 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testRemoveInTurn()...
#test testRemoveInTurn
[main] 22:26:56,633 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testRemoveInTurn()...
[main] 22:26:56,634 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testRemoveMiddle()...
#test testRemoveMiddle
[main] 22:26:56,642 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testRemoveMiddle()...
[main] 22:26:56,642 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testAddHeadAndRemove()...
#test testAddHeadAndRemove
Jumping 500
[main] 22:26:56,649 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:26:56,860 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:26:56,865 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testAddHeadAndRemove()...
[main] 22:26:56,866 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testMultipleIterators1()...
#test testMultipleIterators1
[main] 22:26:56,875 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testMultipleIterators1()...
[main] 22:26:56,875 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testMultipleIterators2()...
#test testMultipleIterators2
[main] 22:26:56,884 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testMultipleIterators2()...
[main] 22:26:56,884 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testResizing()...
#test testResizing
[main] 22:26:56,898 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testResizing()...
[main] 22:26:56,898 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testRepeatAndRemove()...
#test testRepeatAndRemove
[main] 22:26:56,908 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testRepeatAndRemove()...
[main] 22:26:56,910 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testIterateNoElements()...
#test testIterateNoElements
[main] 22:26:56,918 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Finished test: testIterateNoElements()...
[main] 22:26:56,919 INFO  [org.apache.activemq.artemis.core.server] #*#*# 
Starting test: testAddAndRemove()...
#test testAddAndRemove
[main] 22:26:56,928 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:26:57,045 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:26:57,450 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:26:58,877 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:26:58,877 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:26:59,314 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:26:59,314 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:26:59,583 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:26:59,583 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:26:59,745 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:26:59,745 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:26:59,967 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:27:05,435 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:27:05,694 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:27:06,009 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:27:06,844 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:27:06,844 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:27:07,082 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:27:07,363 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:27:08,174 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC Done 
[main] 22:27:08,174 INFO  
[org.apache.activemq.artemis.utils.ThreadLeakCheckRule] #test forceGC
[main] 22:27:08,437 INFO  
[org.apache

activemq-artemis git commit: ARTEMIS-1367 Moving CriticalAnalyzerPolicy

2017-08-24 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master fcce3bac2 -> f2d74e7a4


ARTEMIS-1367 Moving CriticalAnalyzerPolicy


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

Branch: refs/heads/master
Commit: f2d74e7a43f6eae5d49081c92a03b73ad853c4dc
Parents: fcce3ba
Author: Clebert Suconic 
Authored: Thu Aug 24 18:08:01 2017 -0400
Committer: Clebert Suconic 
Committed: Thu Aug 24 18:08:01 2017 -0400

--
 .../utils/critical/CriticalAnalyzerPolicy.java  | 22 
 .../config/ActiveMQDefaultConfiguration.java|  1 +
 .../api/config/CriticalAnalyzerPolicy.java  | 22 
 .../artemis/core/config/Configuration.java  |  2 +-
 .../core/config/impl/ConfigurationImpl.java |  2 +-
 .../deployers/impl/FileConfigurationParser.java |  2 +-
 .../core/server/impl/ActiveMQServerImpl.java|  2 +-
 .../core/config/impl/FileConfigurationTest.java |  2 +-
 .../critical/CriticalSimpleTest.java|  2 +-
 9 files changed, 29 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f2d74e7a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerPolicy.java
--
diff --git 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerPolicy.java
 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerPolicy.java
new file mode 100644
index 000..8a343e5
--- /dev/null
+++ 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerPolicy.java
@@ -0,0 +1,22 @@
+/**
+ * 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.artemis.utils.critical;
+
+public enum CriticalAnalyzerPolicy {
+   HALT, SHUTDOWN, LOG;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f2d74e7a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
--
diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
index 226ccc4..069616a 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
@@ -22,6 +22,7 @@ import org.apache.activemq.artemis.ArtemisConstants;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.server.DivertConfigurationRoutingType;
 import org.apache.activemq.artemis.api.core.RoutingType;
+import org.apache.activemq.artemis.utils.critical.CriticalAnalyzerPolicy;
 
 /**
  * Default values of ActiveMQ Artemis configuration parameters.

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f2d74e7a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/CriticalAnalyzerPolicy.java
--
diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/CriticalAnalyzerPolicy.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/CriticalAnalyzerPolicy.java
deleted file mode 100644
index d577bd6..000
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/CriticalAnalyzerPolicy.java
+++ /dev/null
@@ -1,22 +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 additi

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

2017-08-24 Thread Apache Jenkins Server
See 




activemq git commit: AMQ-6798 - Clean up store usage object on Queue stop

2017-08-24 Thread cshannon
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.15.x 8e9f80e7d -> eca72dc81


AMQ-6798 - Clean up store usage object on Queue stop

When queues are stopped the StoreUsage object needs to be stopped so it
will be removed from the parent StoreUsage.  This allows the object to
be garbage collected and prevents a memory leak.

(cherry picked from commit 35bd3ad938f5c378b17a34980d2f3480bf3bbfc3)


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

Branch: refs/heads/activemq-5.15.x
Commit: eca72dc81ad8113e31fadf161580bf5e2b93e27a
Parents: 8e9f80e
Author: Christopher L. Shannon (cshannon) 
Authored: Thu Aug 24 09:23:17 2017 -0400
Committer: Christopher L. Shannon (cshannon) 
Committed: Thu Aug 24 09:25:13 2017 -0400

--
 .../apache/activemq/broker/region/Queue.java|   3 +
 .../QueueMemoryAndStoreUsageCleanupTest.java| 103 +++
 2 files changed, 106 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/eca72dc8/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
--
diff --git 
a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java 
b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
index 612aeeb..49dd5a2 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
@@ -1026,6 +1026,9 @@ public class Queue extends BaseDestination implements 
Task, UsageListener, Index
 if (memoryUsage != null) {
 memoryUsage.stop();
 }
+if (systemUsage.getStoreUsage() != null) {
+systemUsage.getStoreUsage().stop();
+}
 if (store != null) {
 store.stop();
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/eca72dc8/activemq-unit-tests/src/test/java/org/apache/activemq/usage/QueueMemoryAndStoreUsageCleanupTest.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/usage/QueueMemoryAndStoreUsageCleanupTest.java
 
b/activemq-unit-tests/src/test/java/org/apache/activemq/usage/QueueMemoryAndStoreUsageCleanupTest.java
new file mode 100644
index 000..3259f40
--- /dev/null
+++ 
b/activemq-unit-tests/src/test/java/org/apache/activemq/usage/QueueMemoryAndStoreUsageCleanupTest.java
@@ -0,0 +1,103 @@
+/**
+ * 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.usage;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.lang.reflect.Field;
+import java.util.List;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.region.Destination;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Test for AMQ-6798
+ */
+public class QueueMemoryAndStoreUsageCleanupTest {
+protected static final Logger LOG = LoggerFactory
+.getLogger(QueueMemoryAndStoreUsageCleanupTest.class);
+
+@Rule
+public TemporaryFolder dataFileDir = new TemporaryFolder(new 
File("target"));
+private BrokerService broker;
+private SystemUsage systemUsage;
+
+@Before
+public void setUpBroker() throws Exception {
+broker = new BrokerService();
+broker.setPersistent(true);
+broker.setDataDirectoryFile(dataFileDir.getRoot());
+broker.setDeleteAllMessagesOnStartup(true);
+systemUsage = broker.getSystemUsage();
+startBroker();
+}
+
+prot

activemq git commit: AMQ-6798 - Clean up store usage object on Queue stop

2017-08-24 Thread cshannon
Repository: activemq
Updated Branches:
  refs/heads/master c7291f1ec -> 35bd3ad93


AMQ-6798 - Clean up store usage object on Queue stop

When queues are stopped the StoreUsage object needs to be stopped so it
will be removed from the parent StoreUsage.  This allows the object to
be garbage collected and prevents a memory leak.


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

Branch: refs/heads/master
Commit: 35bd3ad938f5c378b17a34980d2f3480bf3bbfc3
Parents: c7291f1
Author: Christopher L. Shannon (cshannon) 
Authored: Thu Aug 24 09:23:17 2017 -0400
Committer: Christopher L. Shannon (cshannon) 
Committed: Thu Aug 24 09:24:36 2017 -0400

--
 .../apache/activemq/broker/region/Queue.java|   3 +
 .../QueueMemoryAndStoreUsageCleanupTest.java| 103 +++
 2 files changed, 106 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/35bd3ad9/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
--
diff --git 
a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java 
b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
index 612aeeb..49dd5a2 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
@@ -1026,6 +1026,9 @@ public class Queue extends BaseDestination implements 
Task, UsageListener, Index
 if (memoryUsage != null) {
 memoryUsage.stop();
 }
+if (systemUsage.getStoreUsage() != null) {
+systemUsage.getStoreUsage().stop();
+}
 if (store != null) {
 store.stop();
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/35bd3ad9/activemq-unit-tests/src/test/java/org/apache/activemq/usage/QueueMemoryAndStoreUsageCleanupTest.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/usage/QueueMemoryAndStoreUsageCleanupTest.java
 
b/activemq-unit-tests/src/test/java/org/apache/activemq/usage/QueueMemoryAndStoreUsageCleanupTest.java
new file mode 100644
index 000..3259f40
--- /dev/null
+++ 
b/activemq-unit-tests/src/test/java/org/apache/activemq/usage/QueueMemoryAndStoreUsageCleanupTest.java
@@ -0,0 +1,103 @@
+/**
+ * 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.usage;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.lang.reflect.Field;
+import java.util.List;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.region.Destination;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Test for AMQ-6798
+ */
+public class QueueMemoryAndStoreUsageCleanupTest {
+protected static final Logger LOG = LoggerFactory
+.getLogger(QueueMemoryAndStoreUsageCleanupTest.class);
+
+@Rule
+public TemporaryFolder dataFileDir = new TemporaryFolder(new 
File("target"));
+private BrokerService broker;
+private SystemUsage systemUsage;
+
+@Before
+public void setUpBroker() throws Exception {
+broker = new BrokerService();
+broker.setPersistent(true);
+broker.setDataDirectoryFile(dataFileDir.getRoot());
+broker.setDeleteAllMessagesOnStartup(true);
+systemUsage = broker.getSystemUsage();
+startBroker();
+}
+
+protected void startBroker() throws Exception {
+broker.start();
+broker.wai

activemq git commit: https://issues.apache.org/jira/browse/AMQ-6799 - IOExceptionHandler during the startup

2017-08-24 Thread dejanb
Repository: activemq
Updated Branches:
  refs/heads/master 4c986d102 -> c7291f1ec


https://issues.apache.org/jira/browse/AMQ-6799 - IOExceptionHandler during the 
startup


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

Branch: refs/heads/master
Commit: c7291f1ecfefec7aad6fcf168e298e2ef0af8ed7
Parents: 4c986d1
Author: Dejan Bosanac 
Authored: Thu Aug 24 14:04:28 2017 +0200
Committer: Dejan Bosanac 
Committed: Thu Aug 24 14:04:36 2017 +0200

--
 .../util/DefaultIOExceptionHandler.java |  6 ++-
 .../util/DefaultIOExceptionHandlerTest.java |  5 +++
 .../store/jdbc/LeaseDatabaseLocker.java |  2 +-
 .../jdbc/JDBCIOExceptionHandlerMockeryTest.java |  2 +
 .../store/jdbc/JDBCIOExceptionHandlerTest.java  | 43 
 5 files changed, 55 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/c7291f1e/activemq-broker/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
--
diff --git 
a/activemq-broker/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
 
b/activemq-broker/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
index 7668364..022707d 100644
--- 
a/activemq-broker/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
+++ 
b/activemq-broker/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
@@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory;
 
 @Override
 public void handle(IOException exception) {
-if (ignoreAllErrors) {
+if (!broker.isStarted() || ignoreAllErrors) {
 allowIOResumption();
 LOG.info("Ignoring IO exception, " + exception, exception);
 return;
@@ -167,7 +167,9 @@ import org.slf4j.LoggerFactory;
 
 protected void allowIOResumption() {
 try {
-broker.getPersistenceAdapter().allowIOResumption();
+if (broker.getPersistenceAdapter() != null) {
+broker.getPersistenceAdapter().allowIOResumption();
+}
 } catch (IOException e) {
 LOG.warn("Failed to allow IO resumption", e);
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/c7291f1e/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
--
diff --git 
a/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
 
b/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
index ea46809..f8d1ee9 100644
--- 
a/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
+++ 
b/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
@@ -49,6 +49,11 @@ public class DefaultIOExceptionHandlerTest {
 underTest.setSystemExitOnShutdown(exitPlease);
 underTest.setBrokerService(new BrokerService() {
 @Override
+public boolean isStarted() {
+return true;
+}
+
+@Override
 public void stop() throws Exception {
 shutdownOnExitSet.set(isSystemExitOnShutdown());
 stopCalled.countDown();

http://git-wip-us.apache.org/repos/asf/activemq/blob/c7291f1e/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/LeaseDatabaseLocker.java
--
diff --git 
a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/LeaseDatabaseLocker.java
 
b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/LeaseDatabaseLocker.java
index cbbc73d..f6e7f2a 100644
--- 
a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/LeaseDatabaseLocker.java
+++ 
b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/LeaseDatabaseLocker.java
@@ -91,7 +91,7 @@ public class LeaseDatabaseLocker extends AbstractJDBCLocker {
 + e, e);
 }
 if (handleStartException) {
-
lockable.getBrokerService().handleIOException(IOExceptionSupport.create(e));
+throw e;
 }
 } finally {
 close(statement);

http://git-wip-us.apache.org/repos/asf/activemq/blob/c7291f1e/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerMockeryTest.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org

activemq-artemis git commit: Revert "Changing the way to interact with JGroups in the ResourceAdapter"

2017-08-24 Thread martyntaylor
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 16eca68bf -> fcce3bac2


Revert "Changing the way to interact with JGroups in the ResourceAdapter"

This reverts commit 2493158d1168bd6a93cafbecab68ba6c19901061.

This is causing some problems with the classloader used in the RA,
resulting in NPEs.  Reverting this.  We can revist when we have a more
stable solution.


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

Branch: refs/heads/master
Commit: fcce3bac2a78fe57775d56e38425354f5ca7f0c9
Parents: 16eca68
Author: Martyn Taylor 
Authored: Thu Aug 24 10:24:40 2017 +0100
Committer: Martyn Taylor 
Committed: Thu Aug 24 10:26:37 2017 +0100

--
 .../apache/activemq/artemis/ra/ActiveMQRaUtils.java | 16 
 .../artemis/ra/ActiveMQResourceAdapter.java |  8 ++--
 2 files changed, 14 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcce3bac/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java
--
diff --git 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java
index 47c95bf..bc2b42f 100644
--- 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java
+++ 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java
@@ -27,7 +27,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import org.apache.activemq.artemis.api.core.BroadcastEndpointFactory;
+import org.jgroups.JChannel;
 
 /**
  * Various utility functions
@@ -236,19 +236,19 @@ public final class ActiveMQRaUtils {
 
/**
 * Within AS7 the RA is loaded by JCA. properties can only be passed in 
String form. However if
-* RA is configured using jgroups stack, we need to pass a 
BroadcastEndpointFactory object. As is impossible with
-* JCA, we use this method to allow a BroadcastEndpointFactory object to be 
located.
+* RA is configured using jgroups stack, we need to pass a Channel object. 
As is impossible with
+* JCA, we use this method to allow a JChannel object to be located.
 */
-   public static BroadcastEndpointFactory locateBroadcastEndpointFactory(final 
String locatorClass, final String name) {
-  return AccessController.doPrivileged(new 
PrivilegedAction() {
+   public static JChannel locateJGroupsChannel(final String locatorClass, 
final String name) {
+  return AccessController.doPrivileged(new PrivilegedAction() {
  @Override
- public BroadcastEndpointFactory run() {
+ public JChannel run() {
 try {
ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
Class aClass = loader.loadClass(locatorClass);
Object o = aClass.newInstance();
-   Method m = aClass.getMethod("locateBroadcastEndpointFactory", 
new Class[]{String.class});
-   return (BroadcastEndpointFactory) m.invoke(o, name);
+   Method m = aClass.getMethod("locateChannel", new 
Class[]{String.class});
+   return (JChannel) m.invoke(o, name);
 } catch (Throwable e) {
ActiveMQRALogger.LOGGER.debug(e.getMessage(), e);
return null;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcce3bac/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
--
diff --git 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
index 9812980..bd4b8c9 100644
--- 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
+++ 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
@@ -42,6 +42,7 @@ import java.util.regex.Pattern;
 
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.BroadcastEndpointFactory;
+import org.apache.activemq.artemis.api.core.ChannelBroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
 import 
org.apache.activemq.artemis.api.core.JGroupsFileBroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.core.Pair;
@@ -60,6 +61,7 @@ import 
org.apache.activemq.artemis.service.extensions.ServiceUtils;
 import 
org.apache.activemq.artemis.service.exte