activemq git commit: https://issues.apache.org/jira/browse/AMQ-6089 - support TMNOFLAGS as a scan end to allow looping calls to recover to terminate

2016-01-06 Thread gtully
Repository: activemq
Updated Branches:
  refs/heads/master e3df09b9d -> 16bc0f0d7


https://issues.apache.org/jira/browse/AMQ-6089 - support TMNOFLAGS as a scan 
end to allow looping calls to recover to terminate


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

Branch: refs/heads/master
Commit: 16bc0f0d75053064695ba20f6a736704271c
Parents: e3df09b
Author: gtully 
Authored: Wed Jan 6 12:54:20 2016 +
Committer: gtully 
Committed: Wed Jan 6 12:54:20 2016 +

--
 .../org/apache/activemq/TransactionContext.java | 40 +++-
 .../activemq/broker/XARecoveryBrokerTest.java   | 16 
 2 files changed, 39 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/16bc0f0d/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
--
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java 
b/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
index 6bd7402..77826b1 100755
--- a/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
+++ b/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
@@ -672,26 +672,32 @@ public class TransactionContext implements XAResource {
 @Override
 public Xid[] recover(int flag) throws XAException {
 LOG.debug("recover({})", flag);
+XATransactionId[] answer;
 
-TransactionInfo info = new TransactionInfo(getConnectionId(), null, 
TransactionInfo.RECOVER);
-try {
-this.connection.checkClosedOrFailed();
-this.connection.ensureConnectionInfoSent();
-
-DataArrayResponse receipt = 
(DataArrayResponse)this.connection.syncSendPacket(info);
-DataStructure[] data = receipt.getData();
-XATransactionId[] answer;
-if (data instanceof XATransactionId[]) {
-answer = (XATransactionId[])data;
-} else {
-answer = new XATransactionId[data.length];
-System.arraycopy(data, 0, answer, 0, data.length);
+if (XAResource.TMNOFLAGS == flag) {
+// signal next in cursor scan, which for us is always the end b/c 
we don't maintain any cursor state
+// allows looping scan to complete
+answer = new XATransactionId[0];
+} else {
+TransactionInfo info = new TransactionInfo(getConnectionId(), 
null, TransactionInfo.RECOVER);
+try {
+this.connection.checkClosedOrFailed();
+this.connection.ensureConnectionInfoSent();
+
+DataArrayResponse receipt = (DataArrayResponse) 
this.connection.syncSendPacket(info);
+DataStructure[] data = receipt.getData();
+if (data instanceof XATransactionId[]) {
+answer = (XATransactionId[]) data;
+} else {
+answer = new XATransactionId[data.length];
+System.arraycopy(data, 0, answer, 0, data.length);
+}
+} catch (JMSException e) {
+throw toXAException(e);
 }
-LOG.debug("recover({})={}", flag, answer);
-return answer;
-} catch (JMSException e) {
-throw toXAException(e);
 }
+LOG.debug("recover({})={}", flag, answer);
+return answer;
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/activemq/blob/16bc0f0d/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
 
b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
index 2c41673..9660ef0 100755
--- 
a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
+++ 
b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
@@ -16,7 +16,9 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.Arrays;
 import java.util.HashSet;
+import java.util.LinkedList;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
@@ -24,7 +26,11 @@ import javax.jms.JMSException;
 import javax.management.InstanceNotFoundException;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
 import 

[2/2] activemq git commit: https://issues.apache.org/jira/browse/AMQ-6106

2016-01-06 Thread cshannon
https://issues.apache.org/jira/browse/AMQ-6106

Merging in new JUnit Rule for ActiveMQ unit testing

Patch applied with thanks to Quinn Stevenson

This closes #163


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

Branch: refs/heads/master
Commit: 8317208a1b6cbbd8ebda645a801bb309b73e99ad
Parents: 16bc0f0 da3b138
Author: Christopher L. Shannon (cshannon) 
Authored: Wed Jan 6 15:10:22 2016 +
Committer: Christopher L. Shannon (cshannon) 
Committed: Wed Jan 6 15:10:55 2016 +

--
 activemq-tooling/activemq-junit/pom.xml |  70 
 .../activemq/junit/EmbeddedActiveMQBroker.java  | 404 +++
 .../junit/EmbeddedActiveMQBrokerConfigTest.java | 110 +
 .../junit/EmbeddedActiveMQBrokerRuleTest.java   |  43 ++
 ...mbeddedActiveMQBrokerXbeanUriConfigTest.java | 108 +
 .../MultipleEmbeddedActiveMQBrokerRuleTest.java |  60 +++
 .../src/test/resources/activemq-simple.xml  |  28 ++
 activemq-tooling/pom.xml|   1 +
 8 files changed, 824 insertions(+)
--




[1/2] activemq git commit: Initial Version of activemq-junit

2016-01-06 Thread cshannon
Repository: activemq
Updated Branches:
  refs/heads/master 16bc0f0d7 -> 8317208a1


Initial Version of activemq-junit

Added configure method to EmbeddedActiveMQBroker

Added support for XBean configuration


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

Branch: refs/heads/master
Commit: da3b1380234c5d1745094f883778f19e58fe9cee
Parents: 16bc0f0
Author: Quinn Stevenson 
Authored: Wed Dec 23 13:29:06 2015 -0700
Committer: Christopher L. Shannon (cshannon) 
Committed: Wed Jan 6 15:10:02 2016 +

--
 activemq-tooling/activemq-junit/pom.xml |  70 
 .../activemq/junit/EmbeddedActiveMQBroker.java  | 404 +++
 .../junit/EmbeddedActiveMQBrokerConfigTest.java | 110 +
 .../junit/EmbeddedActiveMQBrokerRuleTest.java   |  43 ++
 ...mbeddedActiveMQBrokerXbeanUriConfigTest.java | 108 +
 .../MultipleEmbeddedActiveMQBrokerRuleTest.java |  60 +++
 .../src/test/resources/activemq-simple.xml  |  28 ++
 activemq-tooling/pom.xml|   1 +
 8 files changed, 824 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/da3b1380/activemq-tooling/activemq-junit/pom.xml
--
diff --git a/activemq-tooling/activemq-junit/pom.xml 
b/activemq-tooling/activemq-junit/pom.xml
new file mode 100644
index 000..33f8366
--- /dev/null
+++ b/activemq-tooling/activemq-junit/pom.xml
@@ -0,0 +1,70 @@
+
+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;>
+
+  4.0.0
+
+  
+org.apache.activemq.tooling
+activemq-tooling
+5.14-SNAPSHOT
+  
+
+  activemq-junit
+  ActiveMQ :: JUnit Rule
+
+  JUnit Rule for Embedded ActiveMQ Brokers
+
+  
+
+  org.apache.activemq
+  activemq-broker
+  ${project.version}
+  provided
+
+
+  org.springframework
+  spring-context
+  provided
+
+
+  org.apache.activemq
+  activemq-spring
+  ${project.version}
+  provided
+
+
+  org.apache.activemq
+  activemq-pool
+  ${project.version}
+  provided
+
+
+  junit
+  junit
+  provided
+
+
+
+  org.slf4j
+  slf4j-simple
+  ${slf4j-version}
+  test
+
+  
+
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/da3b1380/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java
--
diff --git 
a/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java
 
b/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java
new file mode 100644
index 000..3e328e8
--- /dev/null
+++ 
b/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java
@@ -0,0 +1,404 @@
+/*
+ * 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.junit;
+
+import java.net.URI;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.broker.BrokerFactory;
+import org.apache.activemq.broker.BrokerPlugin;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.region.Destination;
+import org.apache.activemq.broker.region.Queue;
+import org.apache.activemq.broker.region.Topic;
+import org.apache.activemq.broker.region.policy.PolicyEntry;
+import org.apache.activemq.broker.region.policy.PolicyMap;
+import org.apache.activemq.plugin.StatisticsBrokerPlugin;
+import org.apache.activemq.pool.PooledConnectionFactory;
+import org.junit.rules.ExternalResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A JUnit Rule 

activemq git commit: https://issues.apache.org/jira/browse/AMQ-6100

2016-01-06 Thread cshannon
Repository: activemq
Updated Branches:
  refs/heads/master 8317208a1 -> b7db97d8e


https://issues.apache.org/jira/browse/AMQ-6100

Adding missing LICENSE header


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

Branch: refs/heads/master
Commit: b7db97d8e215ba16a812b5f8577f2e8d91fc7787
Parents: 8317208
Author: Christopher L. Shannon (cshannon) 
Authored: Wed Jan 6 15:49:50 2016 +
Committer: Christopher L. Shannon (cshannon) 
Committed: Wed Jan 6 15:49:50 2016 +

--
 .../broker/virtual/virtual-topic-network-test.xml  | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/b7db97d8/activemq-unit-tests/src/test/resources/org/apache/activemq/broker/virtual/virtual-topic-network-test.xml
--
diff --git 
a/activemq-unit-tests/src/test/resources/org/apache/activemq/broker/virtual/virtual-topic-network-test.xml
 
b/activemq-unit-tests/src/test/resources/org/apache/activemq/broker/virtual/virtual-topic-network-test.xml
index 0c2b1ec..6b6199c 100644
--- 
a/activemq-unit-tests/src/test/resources/org/apache/activemq/broker/virtual/virtual-topic-network-test.xml
+++ 
b/activemq-unit-tests/src/test/resources/org/apache/activemq/broker/virtual/virtual-topic-network-test.xml
@@ -1,4 +1,21 @@
+
 
+
 http://www.springframework.org/schema/beans; 
xmlns:amq="http://activemq.apache.org/schema/core;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xmlns:jms="http://www.springframework.org/schema/jms;



Jenkins build is back to stable : ActiveMQ-Java7 » ActiveMQ :: Runtime Configuration #908

2016-01-06 Thread Apache Jenkins Server
See 




Jenkins build became unstable: ActiveMQ-Java7 » ActiveMQ :: LevelDB Store #908

2016-01-06 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java7 #908

2016-01-06 Thread Apache Jenkins Server
See 



Jenkins build is back to stable : ActiveMQ-Java7 » ActiveMQ :: RA #908

2016-01-06 Thread Apache Jenkins Server
See 




Jenkins build became unstable: ActiveMQ-Java7 » ActiveMQ :: Unit Tests #908

2016-01-06 Thread Apache Jenkins Server
See 




activemq-artemis git commit: Support using the cli.Artemis to boot up a broker without using the boot.Artemis class.

2016-01-06 Thread chirino
Repository: activemq-artemis
Updated Branches:
  refs/heads/master bd6cd0d13 -> 3e6dcd05e


Support using the cli.Artemis to boot up a broker without using the 
boot.Artemis class.

This is handy for when you want to start Artemis in an IDE where it's not in 
the distro packaging and the classpath is being managed by the IDE.

It just needed to handle using the artemis.instance system prop.

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

Branch: refs/heads/master
Commit: 3e6dcd05e138e9cc0c42933bc9244ae04d487eb1
Parents: bd6cd0d
Author: Hiram Chirino 
Authored: Wed Jan 6 11:59:56 2016 -0500
Committer: Hiram Chirino 
Committed: Wed Jan 6 11:59:56 2016 -0500

--
 .../org/apache/activemq/artemis/cli/Artemis.java | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3e6dcd05/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
--
diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
index 681a745..8cdf02f 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
@@ -40,10 +40,23 @@ import 
org.apache.activemq.artemis.cli.commands.tools.PrintData;
 import org.apache.activemq.artemis.cli.commands.tools.XmlDataExporter;
 import org.apache.activemq.artemis.cli.commands.tools.XmlDataImporter;
 
+/**
+ * Artemis is the main CLI entry point for managing/running a broker.
+ *
+ * Want to start or debug a broker from an IDE?  This is probably the best 
class to
+ * run.  Make sure set the -Dartemis.instance=path/to/instance system property.
+ * You should also use the 'apache-artemis' module for the class path since 
that
+ * includes all artemis modules.
+ */
 public class Artemis {
 
public static void main(String... args) throws Exception {
-  execute(null, null, args);
+  String home = System.getProperty("artemis.home");
+  File fileHome = home != null ? new File(home) : null;
+  String instance = System.getProperty("artemis.instance");
+  File fileInstance = instance != null ? new File(instance) : null;
+
+  execute(fileHome, fileInstance, args);
}
 
public static Object internalExecute(String... args) throws Exception {



activemq-artemis git commit: ARTEMIS-332 - fix openwire after exceptions change

2016-01-06 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master a5a993ed9 -> 0dab0552d


ARTEMIS-332 - fix openwire after exceptions change


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

Branch: refs/heads/master
Commit: 0dab0552dcf9b8f54f87f9dc9d7317fece8fca5d
Parents: a5a993e
Author: Clebert Suconic 
Authored: Wed Jan 6 19:58:15 2016 -0500
Committer: Clebert Suconic 
Committed: Wed Jan 6 19:58:15 2016 -0500

--
 .../openwire/amq/AMQServerConsumer.java | 36 
 1 file changed, 15 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0dab0552/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
--
diff --git 
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
 
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
index 625adcd..865146e 100644
--- 
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
+++ 
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
@@ -126,30 +126,24 @@ public class AMQServerConsumer extends ServerConsumerImpl 
{
}
 
public void amqPutBackToDeliveringList(final List refs) {
-  try {
- synchronized (this.deliveringRefs) {
-for (MessageReference ref : refs) {
-   ref.incrementDeliveryCount();
-   deliveringRefs.add(ref);
-}
-//adjust the order. Suppose deliveringRefs has 2 existing
-//refs m1, m2, and refs has 3 m3, m4, m5
-//new order must be m3, m4, m5, m1, m2
-if (refs.size() > 0) {
-   long first = refs.get(0).getMessage().getMessageID();
-   MessageReference m = deliveringRefs.peek();
-   while (m.getMessage().getMessageID() != first) {
-  deliveringRefs.poll();
-  deliveringRefs.add(m);
-  m = deliveringRefs.peek();
-   }
+  synchronized (this.deliveringRefs) {
+ for (MessageReference ref : refs) {
+ref.incrementDeliveryCount();
+deliveringRefs.add(ref);
+ }
+ //adjust the order. Suppose deliveringRefs has 2 existing
+ //refs m1, m2, and refs has 3 m3, m4, m5
+ //new order must be m3, m4, m5, m1, m2
+ if (refs.size() > 0) {
+long first = refs.get(0).getMessage().getMessageID();
+MessageReference m = deliveringRefs.peek();
+while (m.getMessage().getMessageID() != first) {
+   deliveringRefs.poll();
+   deliveringRefs.add(m);
+   m = deliveringRefs.peek();
 }
  }
   }
-  catch (ActiveMQException e) {
- // TODO: what to do here?
- throw new IllegalStateException(e.getMessage(), e);
-  }
}
 
public void moveToDeadLetterAddress(long mid, Throwable cause) throws 
Exception {



activemq-artemis git commit: ARTEMIS-332 - test added / better dealing with critical errors on paging

2016-01-06 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master d4dd07023 -> a5a993ed9


ARTEMIS-332 - test added / better dealing with critical errors on paging


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

Branch: refs/heads/master
Commit: a5a993ed9d67e47e97a0a8198d75600188df2eae
Parents: d4dd070
Author: Clebert Suconic 
Authored: Wed Jan 6 15:45:19 2016 -0500
Committer: Clebert Suconic 
Committed: Wed Jan 6 19:42:45 2016 -0500

--
 .../artemis/core/paging/PagingStore.java|   2 -
 .../core/paging/cursor/PageCursorProvider.java  |   5 +-
 .../core/paging/cursor/PageSubscription.java|   5 +-
 .../core/paging/cursor/PagedReference.java  |   3 +-
 .../core/paging/cursor/PagedReferenceImpl.java  |  17 +-
 .../cursor/impl/PageCursorProviderImpl.java |  10 +-
 .../cursor/impl/PageSubscriptionImpl.java   | 102 +++--
 .../core/paging/impl/PagingStoreImpl.java   |   6 -
 .../artemis/core/server/MessageReference.java   |   4 +-
 .../activemq/artemis/core/server/Queue.java |   2 +-
 .../core/server/impl/LastValueQueue.java|  79 ++-
 .../artemis/core/server/impl/QueueImpl.java |  63 +++---
 .../artemis/core/server/impl/RefsOperation.java |  37 ++--
 .../tests/extras/byteman/PagingOMETest.java | 206 +++
 .../storage/PersistMultiThreadTest.java |   4 -
 15 files changed, 320 insertions(+), 225 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a5a993ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
--
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
index c8808b3..e831966 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
@@ -47,8 +47,6 @@ public interface PagingStore extends ActiveMQComponent {
 
int getNumberOfPages();
 
-   void criticalException(Throwable e);
-
/**
 * Returns the page id of the current page in which the system is writing 
files.
 */

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a5a993ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCursorProvider.java
--
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCursorProvider.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCursorProvider.java
index c8404ba..951b83c 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCursorProvider.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCursorProvider.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.artemis.core.paging.cursor;
 
-import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.paging.PagedMessage;
 
@@ -25,7 +24,7 @@ import org.apache.activemq.artemis.core.paging.PagedMessage;
  */
 public interface PageCursorProvider {
 
-   PageCache getPageCache(long pageNr) throws ActiveMQException;
+   PageCache getPageCache(long pageNr);
 
PagedReference newReference(final PagePosition pos, final PagedMessage msg, 
PageSubscription sub);
 
@@ -39,7 +38,7 @@ public interface PageCursorProvider {
 
PageSubscription createSubscription(long queueId, Filter filter, boolean 
durable);
 
-   PagedMessage getMessage(PagePosition pos) throws ActiveMQException;
+   PagedMessage getMessage(PagePosition pos);
 
void processReload() throws Exception;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a5a993ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageSubscription.java
--
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageSubscription.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageSubscription.java
index 386f21f..df2ccc3 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageSubscription.java
+++ 

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

2016-01-06 Thread clebertsuconic
This closes #297


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

Branch: refs/heads/master
Commit: d4dd070230c6c868fae2460f994cc7a329abf0ed
Parents: 2e8ce98 6e70272
Author: Clebert Suconic 
Authored: Wed Jan 6 19:42:17 2016 -0500
Committer: Clebert Suconic 
Committed: Wed Jan 6 19:42:17 2016 -0500

--
 .../integration/cluster/distribution/ClusterTestBase.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--




[1/2] activemq-artemis git commit: ARTEMIS-333 Redistribution + groups tests failing

2016-01-06 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 2e8ce9889 -> d4dd07023


ARTEMIS-333 Redistribution + groups tests failing


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

Branch: refs/heads/master
Commit: 6e702724b973124b78d1b2f020ac231b1d5812f6
Parents: 2e8ce98
Author: jbertram 
Authored: Wed Jan 6 16:11:18 2016 -0600
Committer: jbertram 
Committed: Wed Jan 6 16:15:19 2016 -0600

--
 .../integration/cluster/distribution/ClusterTestBase.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6e702724/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
--
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
index 7c3be5e..ec17435 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
@@ -512,7 +512,7 @@ public abstract class ClusterTestBase extends 
ActiveMQTestBase {
  throw new IllegalArgumentException("No sf at " + node);
   }
 
-  ClientSession session = addClientSession(sf.createSession(user, 
password, false, true, true, false, 0));
+  ClientSession session = addClientSession(sf.createSession(user, 
password, false, true, true, ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, 
ActiveMQClient.DEFAULT_ACK_BATCH_SIZE));
 
   String filterString = null;
 
@@ -574,7 +574,7 @@ public abstract class ClusterTestBase extends 
ActiveMQTestBase {
 throw new IllegalArgumentException("No sf at " + node);
  }
 
- ClientSession session = addClientSession(sf.createSession(user, 
password, false, false, autoCommitAcks, false, 0));
+ ClientSession session = addClientSession(sf.createSession(user, 
password, false, false, autoCommitAcks, ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, 
ActiveMQClient.DEFAULT_ACK_BATCH_SIZE));
 
  String filterString = null;
 
@@ -1362,7 +1362,7 @@ public abstract class ClusterTestBase extends 
ActiveMQTestBase {
   addServerLocator(locators[node]);
   ClientSessionFactory sf = createSessionFactory(locators[node]);
 
-  ClientSession session = sf.createSession(user, password, false, true, 
true, false, 0);
+  ClientSession session = sf.createSession(user, password, false, true, 
true, ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, 
ActiveMQClient.DEFAULT_ACK_BATCH_SIZE);
   session.close();
   sfs[node] = sf;
}



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

2016-01-06 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : ActiveMQ-Java8 » ActiveMQ :: Broker #576

2016-01-06 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 #576

2016-01-06 Thread Apache Jenkins Server
See 



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

2016-01-06 Thread Apache Jenkins Server
See 

Changes:

[jbertram] ARTEMIS-333 Redistribution + groups tests failing

[clebertsuconic] ARTEMIS-332 - test added / better dealing with critical errors 
on paging

[clebertsuconic] ARTEMIS-332 - fix openwire after exceptions change

--
[...truncated 4300 lines...]
[INFO] Exclude: **/.classpath
[INFO] Exclude: **/.checkstyle
[INFO] Exclude: **/.factorypath
[INFO] Exclude: ratReport.txt
[INFO] Exclude: **/org.apache.activemq.artemis.cfg
[INFO] Exclude: **/*.data
[INFO] Exclude: **/*.bin
[INFO] Exclude: **/src/test/resources/keystore
[INFO] Exclude: **/*.log
[INFO] Exclude: **/*.redo
[INFO] Exclude: **/node/**
[INFO] Exclude: **/node_modules/**
[INFO] Exclude: **/package.json
[INFO] Exclude: **/CMakeCache.txt
[INFO] Exclude: **/CMakeFiles/
[INFO] Exclude: **/Makefile
[INFO] Exclude: **/cmake_install.cmake
[INFO] Exclude: 
artemis-native/src/main/c/org_apache_activemq_artemis_jlibaio_LibaioContext.h
[INFO] 24 resources included (use -debug for more details)
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 
approved: 24 licence.
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ 
artemis-stomp-protocol ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-java) @ 
artemis-stomp-protocol ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
artemis-stomp-protocol ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
artemis-stomp-protocol ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ 
artemis-stomp-protocol ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.16:check (default) @ 
artemis-stomp-protocol ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (default) @ artemis-stomp-protocol ---
[INFO] 51 implicit excludes (use -debug for more details).
[INFO] Exclude: **/*.txt
[INFO] Exclude: **/*.md
[INFO] Exclude: etc/org.eclipse.*
[INFO] Exclude: docs/**/*.json
[INFO] Exclude: docs/**/_book/
[INFO] Exclude: **/target/
[INFO] Exclude: **/META-INF/services/*
[INFO] Exclude: **/*.iml
[INFO] Exclude: **/*.jceks
[INFO] Exclude: **/*.jks
[INFO] Exclude: **/org/apache/activemq/artemis/utils/json/**
[INFO] Exclude: **/org/apache/activemq/artemis/utils/Base64.java
[INFO] Exclude: **/.settings/**
[INFO] Exclude: **/.project
[INFO] Exclude: **/.classpath
[INFO] Exclude: **/.checkstyle
[INFO] Exclude: **/.factorypath
[INFO] Exclude: ratReport.txt
[INFO] Exclude: **/org.apache.activemq.artemis.cfg
[INFO] Exclude: **/*.data
[INFO] Exclude: **/*.bin
[INFO] Exclude: **/src/test/resources/keystore
[INFO] Exclude: **/*.log
[INFO] Exclude: **/*.redo
[INFO] Exclude: **/node/**
[INFO] Exclude: **/node_modules/**
[INFO] Exclude: **/package.json
[INFO] Exclude: **/CMakeCache.txt
[INFO] Exclude: **/CMakeFiles/
[INFO] Exclude: **/Makefile
[INFO] Exclude: **/cmake_install.cmake
[INFO] Exclude: 
artemis-native/src/main/c/org_apache_activemq_artemis_jlibaio_LibaioContext.h
[INFO] 24 resources included (use -debug for more details)
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 
approved: 24 licence.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
artemis-stomp-protocol ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 
artemis-stomp-protocol ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ 
artemis-stomp-protocol ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-java) @ 
artemis-stomp-protocol ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
artemis-stomp-protocol ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
artemis-stomp-protocol ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ 
artemis-stomp-protocol ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.16:check (default) @ 
artemis-stomp-protocol ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (default) @ artemis-stomp-protocol ---
[INFO] 51 implicit excludes (use -debug for more details).
[INFO] Exclude: **/*.txt
[INFO] Exclude: 

Jenkins build is back to normal : ActiveMQ-Artemis-Master #287

2016-01-06 Thread Apache Jenkins Server
See 



buildbot failure in ASF Buildbot on activemq-site-production

2016-01-06 Thread buildbot
The Buildbot has detected a new failure on builder activemq-site-production 
while building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/activemq-site-production/builds/4583

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'activemq-site-production' triggered 
this build
Build Source Stamp: [branch activemq/activemq-website] HEAD
Blamelist: 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot





buildbot success in ASF Buildbot on activemq-site-production

2016-01-06 Thread buildbot
The Buildbot has detected a restored build on builder activemq-site-production 
while building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/activemq-site-production/builds/4584

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'activemq-site-production' triggered 
this build
Build Source Stamp: [branch activemq/activemq-website] HEAD
Blamelist: 

Build succeeded!

Sincerely,
 -The Buildbot





activemq-artemis git commit: ARTEMIS-332 - fix checkstyle

2016-01-06 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0dab0552d -> b3a8c2380


ARTEMIS-332 - fix checkstyle


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

Branch: refs/heads/master
Commit: b3a8c23802e27a914cd5a6f73a3553a9be9884ed
Parents: 0dab055
Author: Clebert Suconic 
Authored: Wed Jan 6 20:39:38 2016 -0500
Committer: Clebert Suconic 
Committed: Wed Jan 6 20:39:38 2016 -0500

--
 .../artemis/core/protocol/openwire/amq/AMQServerConsumer.java   | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3a8c238/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
--
diff --git 
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
 
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
index 865146e..b0ec7ed 100644
--- 
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
+++ 
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerConsumer.java
@@ -18,7 +18,6 @@ package 
org.apache.activemq.artemis.core.protocol.openwire.amq;
 
 import java.util.List;
 
-import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.persistence.StorageManager;
 import org.apache.activemq.artemis.core.postoffice.QueueBinding;



activemq-artemis git commit: Clean up path handling in in the WebServerComponent a bit.

2016-01-06 Thread chirino
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 3e6dcd05e -> 2e8ce9889


Clean up path handling in in the WebServerComponent a bit.

- The if the web element's path attribute is configured with an absolute path 
like `path="/tmp/artemis/web"` then use it as an absolute path instead of 
trying to make it a sub dir of artemis home.


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

Branch: refs/heads/master
Commit: 2e8ce98891f38c62b3c2a4e8762349a50ed6bc32
Parents: 3e6dcd0
Author: Hiram Chirino 
Authored: Wed Jan 6 14:20:14 2016 -0500
Committer: Hiram Chirino 
Committed: Wed Jan 6 14:20:14 2016 -0500

--
 .../artemis/component/WebServerComponent.java   | 22 +---
 1 file changed, 14 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2e8ce988/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
--
diff --git 
a/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
 
b/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
index 05bf7fd..396c2d4 100644
--- 
a/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
+++ 
b/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.artemis.component;
 
-import java.net.URI;
-
 import org.apache.activemq.artemis.ActiveMQWebLogger;
 import org.apache.activemq.artemis.components.ExternalComponent;
 import org.apache.activemq.artemis.dto.AppDTO;
@@ -31,6 +29,11 @@ import org.eclipse.jetty.server.handler.HandlerList;
 import org.eclipse.jetty.server.handler.ResourceHandler;
 import org.eclipse.jetty.webapp.WebAppContext;
 
+import java.io.IOException;
+import java.net.URI;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
 public class WebServerComponent implements ExternalComponent {
 
private Server server;
@@ -42,7 +45,6 @@ public class WebServerComponent implements ExternalComponent {
@Override
public void configure(ComponentDTO config, String artemisInstance, String 
artemisHome) throws Exception {
   webServerConfig = (WebServerDTO) config;
-  String path = webServerConfig.path.startsWith("/") ? 
webServerConfig.path : "/" + webServerConfig.path;
   uri = new URI(webServerConfig.bind);
   server = new Server();
   ServerConnector connector = new ServerConnector(server);
@@ -53,9 +55,12 @@ public class WebServerComponent implements ExternalComponent 
{
 
   handlers = new HandlerList();
 
+  Path warDir = Paths.get(artemisHome != null ? artemisHome : ".")
+  .resolve( webServerConfig.path ).toAbsolutePath();
+
   if (webServerConfig.apps != null) {
  for (AppDTO app : webServerConfig.apps) {
-deployWar(app.url, app.war, artemisHome, path);
+deployWar(app.url, app.war, warDir);
 if (app.war.startsWith("jolokia")) {
jolokiaUrl = webServerConfig.bind + "/" + app.url;
 }
@@ -64,11 +69,11 @@ public class WebServerComponent implements 
ExternalComponent {
 
   WebAppContext handler = new WebAppContext();
   handler.setContextPath("/");
-  handler.setResourceBase(artemisHome + path);
+  handler.setResourceBase(warDir.toString());
   handler.setLogUrlOnStart(true);
 
   ResourceHandler resourceHandler = new ResourceHandler();
-  resourceHandler.setResourceBase(artemisHome + path);
+  resourceHandler.setResourceBase(warDir.toString());
   resourceHandler.setDirectoriesListed(true);
   resourceHandler.setWelcomeFiles(new String[]{"index.html"});
 
@@ -99,7 +104,7 @@ public class WebServerComponent implements ExternalComponent 
{
   return server != null && server.isStarted();
}
 
-   private void deployWar(String url, String warURL, String activeMQHome, 
String path) {
+   private void deployWar(String url, String warFile, Path warDirectory) 
throws IOException {
   WebAppContext webapp = new WebAppContext();
   if (url.startsWith("/")) {
  webapp.setContextPath(url);
@@ -107,7 +112,8 @@ public class WebServerComponent implements 
ExternalComponent {
   else {
  webapp.setContextPath("/" + url);
   }
-  webapp.setWar(activeMQHome + path + "/" + warURL);
+
+  webapp.setWar(warDirectory.resolve(warFile).toString());
   handlers.addHandler(webapp);
}
 }