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

2015-11-25 Thread cshannon
Repository: activemq
Updated Branches:
  refs/heads/master 35b7ac250 -> 8f30866fd


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

Fixing potential NullPointerException during KahaDB index recovery.


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

Branch: refs/heads/master
Commit: 8f30866fdf89f25188a358f1b1c161b2f06de3f5
Parents: 35b7ac2
Author: Christopher L. Shannon (cshannon) 
Authored: Wed Nov 25 16:02:52 2015 +
Committer: Christopher L. Shannon (cshannon) 
Committed: Wed Nov 25 16:02:52 2015 +

--
 .../apache/activemq/store/kahadb/MessageDatabase.java | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/8f30866f/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
--
diff --git 
a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
 
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
index 85e25d0..cd9067d 100644
--- 
a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
+++ 
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
@@ -762,12 +762,14 @@ public abstract class MessageDatabase extends 
ServiceSupport implements BrokerSe
 
 for (Long sequenceId : matches) {
 MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
-sd.locationIndex.remove(tx, keys.location);
-sd.messageIdIndex.remove(tx, keys.messageId);
-metadata.producerSequenceIdTracker.rollback(keys.messageId);
-undoCounter++;
-decrementAndSubSizeToStoreStat(key, keys.location.getSize());
-// TODO: do we need to modify the ack positions for the pub 
sub case?
+if (keys != null) {
+sd.locationIndex.remove(tx, keys.location);
+sd.messageIdIndex.remove(tx, keys.messageId);
+
metadata.producerSequenceIdTracker.rollback(keys.messageId);
+undoCounter++;
+decrementAndSubSizeToStoreStat(key, 
keys.location.getSize());
+// TODO: do we need to modify the ack positions for the 
pub sub case?
+}
 }
 }
 



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

2015-11-25 Thread Apache Jenkins Server
See 




Jenkins build became unstable: ActiveMQ-Java8 » ActiveMQ :: Assembly #543

2015-11-25 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: ActiveMQ-Java8 #543

2015-11-25 Thread Apache Jenkins Server
See 



activemq-cpp git commit: https://issues.apache.org/jira/browse/AMQCPP-585

2015-11-25 Thread tabish
Repository: activemq-cpp
Updated Branches:
  refs/heads/3.9.x 215da1d94 -> c9b9ef120


https://issues.apache.org/jira/browse/AMQCPP-585

Fix and test.
(cherry picked from commit 6ddd619bae81215822c7aec3b2469ed6ec894473)


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

Branch: refs/heads/3.9.x
Commit: c9b9ef1209de2f291840acd22d1fd840c5459d8f
Parents: 215da1d
Author: Timothy Bish 
Authored: Wed Sep 23 16:00:11 2015 -0400
Committer: Timothy Bish 
Committed: Wed Nov 25 13:54:47 2015 -0500

--
 activemq-cpp/src/main/decaf/util/Date.cpp | 36 ++--
 activemq-cpp/src/main/decaf/util/Date.h   |  6 ++--
 activemq-cpp/src/test/decaf/util/DateTest.cpp | 39 +++---
 3 files changed, 41 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/c9b9ef12/activemq-cpp/src/main/decaf/util/Date.cpp
--
diff --git a/activemq-cpp/src/main/decaf/util/Date.cpp 
b/activemq-cpp/src/main/decaf/util/Date.cpp
index f46ec25..616bba1 100644
--- a/activemq-cpp/src/main/decaf/util/Date.cpp
+++ b/activemq-cpp/src/main/decaf/util/Date.cpp
@@ -29,15 +29,15 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 

-Date::Date() : time( System::currentTimeMillis() ) {
+Date::Date() : time(System::currentTimeMillis()) {
 }
 
 

-Date::Date( long long milliseconds ) : time(milliseconds) {
+Date::Date(long long milliseconds) : time(milliseconds) {
 }
 
 

-Date::Date( const Date& source ) : time(0) {
+Date::Date(const Date& source) : time(0) {
 (*this) = source;
 }
 
@@ -51,37 +51,37 @@ long long Date::getTime() const{
 }
 
 

-void Date::setTime( long long milliseconds ){
+void Date::setTime(long long milliseconds){
 this->time = milliseconds;
 }
 
 

-bool Date::after( const Date& when ) const {
+bool Date::after(const Date& when) const {
 return time > when.time;
 }
 
 

-bool Date::before( const Date& when ) const {
+bool Date::before(const Date& when) const {
 return time < when.time;
 }
 
 

-Date& Date::operator= ( const Date& source ) {
+Date& Date::operator= (const Date& source) {
 this->time = source.time;
 return *this;
 }
 
 

-bool Date::equals( const Date& when ) const {
+bool Date::equals(const Date& when) const {
 return time == when.time;
 }
 
 

-int Date::compareTo( const Date& value ) const {
+int Date::compareTo(const Date& value) const {
 
-if( this->time < value.time ) {
+if (this->time < value.time) {
 return -1;
-} else if( this->time > value.time ) {
+} else if (this->time > value.time) {
 return 1;
 }
 
@@ -89,32 +89,32 @@ int Date::compareTo( const Date& value ) const {
 }
 
 

-bool Date::operator==( const Date& value ) const {
-return ( this->time == value.time );
+bool Date::operator==(const Date& value) const {
+return (this->time == value.time);
 }
 
 

-bool Date::operator<( const Date& value ) const {
-return ( this->time < value.time );
+bool Date::operator<(const Date& value) const {
+return (this->time < value.time);
 }
 
 

 std::string Date::toString() const {
 
 apr_time_exp_t exploded;
-char buffer[80] = {0};
+char buffer[80] = { 0 };
 apr_size_t resultSize = 0;
 
 // dow mon dd hh:mm:ss zzz 
 static char format[] = "%a %b %d %T %Z %Y";
 
 // Explode time to local time.
-if( apr_time_exp_lt( , this->time ) != APR_SUCCESS ) {
+if (apr_time_exp_lt(, this->time * 1000) != APR_SUCCESS) {
 return "";
 }
 
 // Now format the exploded time into our desired format.
-   

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

2015-11-25 Thread cshannon
Repository: activemq
Updated Branches:
  refs/heads/master 8f30866fd -> 29d943429


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

Reverting commit because allowing 0 doesn't actually set the usage to
0 size.  It ends up disabling the check all together which was the
opposite intention of the commit.

This reverts commit 3b658f8e1aa8c9170b8d414fe8cd05c6826b490a.


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

Branch: refs/heads/master
Commit: 29d943429cc0742eaef52095be73c27cc856c34b
Parents: 8f30866
Author: Christopher L. Shannon (cshannon) 
Authored: Wed Nov 25 17:59:41 2015 +
Committer: Christopher L. Shannon (cshannon) 
Committed: Wed Nov 25 17:59:41 2015 +

--
 .../src/main/java/org/apache/activemq/usage/StoreUsage.java   | 3 ++-
 .../src/main/java/org/apache/activemq/usage/TempUsage.java| 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/29d94342/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java
--
diff --git 
a/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java 
b/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java
index 1bd6c41..4646551 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java
@@ -96,7 +96,8 @@ public class StoreUsage extends PercentLimitUsage 
{
 protected void updateLimitBasedOnPercent() {
 usageLock.writeLock().lock();
 try {
-if (percentLimit >= 0 && store != null) {
+
+if (percentLimit > 0 && store != null) {
 File dir = StoreUtil.findParentDirectory(store.getDirectory());
 
 if (dir != null) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/29d94342/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java
--
diff --git 
a/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java 
b/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java
index e34a745..f068dbe 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java
@@ -76,7 +76,7 @@ public class TempUsage extends PercentLimitUsage {
 protected void updateLimitBasedOnPercent() {
 usageLock.writeLock().lock();
 try {
-if (percentLimit >= 0 && store != null) {
+if (percentLimit > 0 && store != null) {
 File dir = StoreUtil.findParentDirectory(store.getDirectory());
 
 if (dir != null) {



Jenkins build is unstable: ActiveMQ-Java7-All-UnitTests #286

2015-11-25 Thread Apache Jenkins Server
See 



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

2015-11-25 Thread cshannon
Repository: activemq
Updated Branches:
  refs/heads/master 29d943429 -> 95f58fa7c


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

Adding back in test case now that AMQ-5898 is resolved


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

Branch: refs/heads/master
Commit: 95f58fa7c4e26b5b2d73a80bd8e1cb2bee8ebf47
Parents: 29d9434
Author: Christopher L. Shannon (cshannon) 
Authored: Wed Nov 25 19:13:24 2015 +
Committer: Christopher L. Shannon (cshannon) 
Committed: Wed Nov 25 19:13:24 2015 +

--
 .../network/VirtualConsumerDemandTest.java  | 50 
 1 file changed, 50 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/95f58fa7/activemq-unit-tests/src/test/java/org/apache/activemq/network/VirtualConsumerDemandTest.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/network/VirtualConsumerDemandTest.java
 
b/activemq-unit-tests/src/test/java/org/apache/activemq/network/VirtualConsumerDemandTest.java
index ad22b07..bff069b 100644
--- 
a/activemq-unit-tests/src/test/java/org/apache/activemq/network/VirtualConsumerDemandTest.java
+++ 
b/activemq-unit-tests/src/test/java/org/apache/activemq/network/VirtualConsumerDemandTest.java
@@ -275,6 +275,56 @@ public class VirtualConsumerDemandTest extends 
DynamicNetworkTestSupport {
 
 /**
  * Test that dynamic flow works for virtual destinations when a second 
composite
+ * topic is included that forwards to the same queue, but is excluded from
+ * being forwarded from the remote broker
+ *
+ * @throws Exception
+ */
+@Test(timeout = 60 * 1000)
+public void testSecondNonIncludedCompositeTopicForwardSameQueue() throws 
Exception {
+Assume.assumeTrue(isUseVirtualDestSubsOnCreation);
+
+doSetUp(true, null);
+
+MessageConsumer advisoryConsumer = 
getVirtualDestinationAdvisoryConsumer(testTopicName);
+
+//configure a composite topic that isn't included
+CompositeTopic compositeTopic = 
createCompositeTopic("include.test.bar2",
+new ActiveMQQueue("include.test.bar.bridge"));
+
+runtimeBroker.setVirtualDestinations(new VirtualDestination[] 
{compositeTopic}, true);
+
+Thread.sleep(2000);
+
+//add one that is included
+CompositeTopic compositeTopic2 = createCompositeTopic(testTopicName,
+new ActiveMQQueue("include.test.bar.bridge"));
+
+runtimeBroker.setVirtualDestinations(new VirtualDestination[] 
{compositeTopic, compositeTopic2}, true);
+
+Thread.sleep(2000);
+MessageProducer includedProducer = 
localSession.createProducer(included);
+Message test = localSession.createTextMessage("test");
+
+final DestinationStatistics destinationStatistics = 
localBroker.getDestination(included).getDestinationStatistics();
+final DestinationStatistics remoteDestStatistics = 
remoteBroker.getDestination(
+new 
ActiveMQQueue("include.test.bar.bridge")).getDestinationStatistics();
+
+waitForConsumerCount(destinationStatistics, 1);
+
+includedProducer.send(test);
+
+waitForDispatchFromLocalBroker(destinationStatistics, 1);
+assertLocalBrokerStatistics(destinationStatistics, 1);
+assertEquals("remote dest messages", 1, 
remoteDestStatistics.getMessages().getCount());
+
+assertRemoteAdvisoryCount(advisoryConsumer, 1);
+assertAdvisoryBrokerCounts(2,2,2);
+
+}
+
+/**
+ * Test that dynamic flow works for virtual destinations when a second 
composite
  * topic is included, but is excluded from
  * being forwarded from the remote broker
  *



buildbot failure in ASF Buildbot on activemq-site-production

2015-11-25 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/3560

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





[3/3] activemq-artemis git commit: Merge #251

2015-11-25 Thread martyntaylor
Merge #251


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

Branch: refs/heads/master
Commit: 686e645c3af73cb8b385c3653ab32bcdfad7c657
Parents: db04192 00cac50
Author: Martyn Taylor 
Authored: Wed Nov 25 11:26:58 2015 +
Committer: Martyn Taylor 
Committed: Wed Nov 25 11:26:58 2015 +

--
 .../api/core/JGroupsBroadcastEndpoint.java  | 26 ++-
 .../artemis/core/config/ConfigurationUtils.java | 30 
 .../core/server/ActiveMQMessageBundle.java  |  3 ++
 .../config/impl/HAPolicyConfigurationTest.java  | 48 
 .../colocated-hapolicy-config-null-backup.xml   | 42 +
 .../colocated-hapolicy-config2-null-backup.xml  | 37 +++
 6 files changed, 167 insertions(+), 19 deletions(-)
--




[2/3] activemq-artemis git commit: ARTEMIS-305 - fixing colocated configuration can have mismatch of policies

2015-11-25 Thread martyntaylor
ARTEMIS-305 - fixing colocated configuration can have mismatch of policies

https://issues.apache.org/jira/browse/ARTEMIS-305


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

Branch: refs/heads/master
Commit: b34ee8717f24448900cf89811e9ca0a37f3882e1
Parents: db04192
Author: Andy Taylor 
Authored: Fri Nov 20 10:38:21 2015 +
Committer: Andy Taylor 
Committed: Wed Nov 25 09:45:39 2015 +

--
 .../artemis/core/config/ConfigurationUtils.java | 30 
 .../core/server/ActiveMQMessageBundle.java  |  3 ++
 .../config/impl/HAPolicyConfigurationTest.java  | 48 
 .../colocated-hapolicy-config-null-backup.xml   | 42 +
 .../colocated-hapolicy-config2-null-backup.xml  | 37 +++
 5 files changed, 152 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b34ee871/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java
--
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java
index f1bb89c..bd626a5 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java
@@ -81,22 +81,36 @@ public final class ConfigurationUtils {
  case COLOCATED: {
 ColocatedPolicyConfiguration pc = (ColocatedPolicyConfiguration) 
conf;
 
-HAPolicyConfiguration backupConf = pc.getBackupConfig();
-BackupPolicy backupPolicy;
-if (backupConf == null) {
-   backupPolicy = new ReplicaPolicy();
-}
-else {
-   backupPolicy = (BackupPolicy) getHAPolicy(backupConf);
-}
 HAPolicyConfiguration liveConf = pc.getLiveConfig();
 HAPolicy livePolicy;
+//if null default to colocated
 if (liveConf == null) {
livePolicy = new ReplicatedPolicy();
 }
 else {
livePolicy = getHAPolicy(liveConf);
 }
+HAPolicyConfiguration backupConf = pc.getBackupConfig();
+BackupPolicy backupPolicy;
+if (backupConf == null) {
+   if (livePolicy instanceof ReplicatedPolicy) {
+  backupPolicy = new ReplicaPolicy();
+   }
+   else if (livePolicy instanceof SharedStoreMasterPolicy) {
+  backupPolicy = new SharedStoreSlavePolicy();
+   }
+   else {
+  throw ActiveMQMessageBundle.BUNDLE.liveBackupMismatch();
+   }
+}
+else {
+   backupPolicy = (BackupPolicy) getHAPolicy(backupConf);
+}
+
+if ((livePolicy instanceof ReplicatedPolicy && !(backupPolicy 
instanceof ReplicaPolicy)) ||
+  (livePolicy instanceof SharedStoreMasterPolicy && 
!(backupPolicy instanceof SharedStoreSlavePolicy))) {
+   throw ActiveMQMessageBundle.BUNDLE.liveBackupMismatch();
+}
 return new ColocatedPolicy(pc.isRequestBackup(), 
pc.getBackupRequestRetries(), pc.getBackupRequestRetryInterval(), 
pc.getMaxBackups(), pc.getBackupPortOffset(), pc.getExcludedConnectors(), 
livePolicy, backupPolicy);
  }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b34ee871/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
--
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
index a08a1f4..a46d240 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
@@ -362,4 +362,7 @@ public interface ActiveMQMessageBundle {
 
@Message(id = 119114, value = "Replication synchronization process timed 
out after waiting {0} milliseconds", format = Message.Format.MESSAGE_FORMAT)
IllegalStateException replicationSynchronizationTimeout(long timeout);
+
+   @Message(id = 119115, value = 

[1/3] activemq-artemis git commit: ARTEMIS-281 - add channel receiver correctly/

2015-11-25 Thread martyntaylor
Repository: activemq-artemis
Updated Branches:
  refs/heads/master db0419259 -> 686e645c3


ARTEMIS-281 - add channel receiver correctly/

We also need to add the receiver whn the refcount = 1 and the channel may 
already be connected.

https://issues.apache.org/jira/browse/ARTEMIS-281


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

Branch: refs/heads/master
Commit: 00cac50a3710f487d2f91f5a0a3e64f12efd8ead
Parents: b34ee87
Author: Andy Taylor 
Authored: Tue Nov 24 10:51:28 2015 +
Committer: Andy Taylor 
Committed: Wed Nov 25 09:45:39 2015 +

--
 .../api/core/JGroupsBroadcastEndpoint.java  | 26 +++-
 1 file changed, 15 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/00cac50a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
--
diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
index b75531e..e4b1519 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
@@ -160,6 +160,19 @@ public abstract class JGroupsBroadcastEndpoint implements 
BroadcastEndpoint {
  this.refCount = 1;
  this.channelName = channelName;
  this.channel = channel;
+
+ //we always add this for the first ref count
+ channel.setReceiver(new ReceiverAdapter() {
+
+@Override
+public void receive(org.jgroups.Message msg) {
+   synchronized (receivers) {
+  for (JGroupsReceiver r : receivers) {
+ r.receive(msg);
+  }
+   }
+}
+ });
   }
 
   public synchronized void close(boolean closeWrappedChannel) {
@@ -171,6 +184,8 @@ public abstract class JGroupsBroadcastEndpoint implements 
BroadcastEndpoint {
 else {
JChannelManager.removeChannel(this.channelName);
 }
+//we always remove the receiver as its no longer needed
+channel.setReceiver(null);
  }
   }
 
@@ -183,17 +198,6 @@ public abstract class JGroupsBroadcastEndpoint implements 
BroadcastEndpoint {
   public synchronized void connect() throws Exception {
  if (channel.isConnected())
 return;
- channel.setReceiver(new ReceiverAdapter() {
-
-@Override
-public void receive(org.jgroups.Message msg) {
-   synchronized (receivers) {
-  for (JGroupsReceiver r : receivers) {
- r.receive(msg);
-  }
-   }
-}
- });
  channel.connect(channelName);
   }
 



buildbot success in ASF Buildbot on activemq-site-production

2015-11-25 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/3561

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 git commit: https://issues.apache.org/jira/browse/AMQ-5898

2015-11-25 Thread cshannon
Repository: activemq
Updated Branches:
  refs/heads/master 3b658f8e1 -> 35b7ac250


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

Removing assertion in VirtualDestinationInterceptor to allow
multiple composite destinations to forward to a physical destination


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

Branch: refs/heads/master
Commit: 35b7ac250b5fa0b8c8dbf728881cc9dbf6edce19
Parents: 3b658f8
Author: Christopher L. Shannon (cshannon) 
Authored: Wed Nov 25 13:33:32 2015 +
Committer: Christopher L. Shannon (cshannon) 
Committed: Wed Nov 25 13:33:32 2015 +

--
 .../virtual/VirtualDestinationInterceptor.java  |   1 -
 .../MultipleCompositeToPhysicalQueueTest.java   | 139 +++
 2 files changed, 139 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/35b7ac25/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
--
diff --git 
a/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
 
b/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
index 70be686..d3c5cee 100644
--- 
a/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
+++ 
b/activemq-broker/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
@@ -67,7 +67,6 @@ public class VirtualDestinationInterceptor implements 
DestinationInterceptor {
 }
 // check if the destination instead matches any mapped destinations
 Set mappedDestinations = mappedDestinationMap.get(activeMQDestination);
-assert mappedDestinations.size() < 2;
 if (!mappedDestinations.isEmpty()) {
 // create a mapped destination interceptor
 VirtualDestination virtualDestination = (VirtualDestination)

http://git-wip-us.apache.org/repos/asf/activemq/blob/35b7ac25/activemq-unit-tests/src/test/java/org/apache/activemq/broker/virtual/MultipleCompositeToPhysicalQueueTest.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/virtual/MultipleCompositeToPhysicalQueueTest.java
 
b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/virtual/MultipleCompositeToPhysicalQueueTest.java
new file mode 100644
index 000..6c72a11
--- /dev/null
+++ 
b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/virtual/MultipleCompositeToPhysicalQueueTest.java
@@ -0,0 +1,139 @@
+/**
+ * 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.broker.virtual;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.URI;
+import java.util.Collections;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.TransportConnector;
+import org.apache.activemq.broker.region.DestinationInterceptor;
+import org.apache.activemq.broker.region.virtual.CompositeQueue;
+import org.apache.activemq.broker.region.virtual.VirtualDestination;
+import org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ *  

Build failed in Jenkins: ActiveMQ-Java7-All-UnitTests #285

2015-11-25 Thread Apache Jenkins Server
See 

Changes:

[tabish121] NO-JIRA ensure each test has a store with its own directory.

[christopher.l.shannon] NO JIRA - Clear journalSize counter

[christopher.l.shannon] https://issues.apache.org/jira/browse/AMQ-5963

--
[...truncated 3626 lines...]
Running org.apache.activemq.security.JaasDualAuthenticationBrokerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.247 sec - in 
org.apache.activemq.security.JaasDualAuthenticationBrokerTest
Running org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.168 sec - in 
org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
Running org.apache.activemq.security.JaasNetworkTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.595 sec - in 
org.apache.activemq.security.JaasNetworkTest
Running org.apache.activemq.security.LDAPAuthenticationTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.345 sec - in 
org.apache.activemq.security.LDAPAuthenticationTest
Running org.apache.activemq.security.LDAPAuthorizationMapTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.124 sec - in 
org.apache.activemq.security.LDAPAuthorizationMapTest
Running org.apache.activemq.security.LDAPSecurityTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.886 sec - in 
org.apache.activemq.security.LDAPSecurityTest
Running org.apache.activemq.security.SecurityJMXTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.094 sec - in 
org.apache.activemq.security.SecurityJMXTest
Running org.apache.activemq.security.SimpleAnonymousPluginTest
Tests run: 45, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.333 sec - 
in org.apache.activemq.security.SimpleAnonymousPluginTest
Running org.apache.activemq.security.SimpleAuthenticationPluginNoUsersTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.134 sec - in 
org.apache.activemq.security.SimpleAuthenticationPluginNoUsersTest
Running org.apache.activemq.security.SimpleAuthenticationPluginSeparatorTest
Tests run: 29, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.639 sec - 
in org.apache.activemq.security.SimpleAuthenticationPluginSeparatorTest
Running org.apache.activemq.security.SimpleAuthenticationPluginTest
Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.289 sec - 
in org.apache.activemq.security.SimpleAuthenticationPluginTest
Running org.apache.activemq.security.SimpleAuthorizationMapTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.196 sec - in 
org.apache.activemq.security.SimpleAuthorizationMapTest
Running org.apache.activemq.security.SimpleSecurityBrokerSystemTest
Tests run: 60, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.349 sec - 
in org.apache.activemq.security.SimpleSecurityBrokerSystemTest
Running org.apache.activemq.security.TextFileCertificateLoginModuleTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.33 sec - in 
org.apache.activemq.security.TextFileCertificateLoginModuleTest
Running org.apache.activemq.security.XBeanSecurityTest
Tests run: 29, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.273 sec - 
in org.apache.activemq.security.XBeanSecurityTest
Running org.apache.activemq.security.XBeanSecurityWithGuestNoCredentialsOnlyTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.109 sec - in 
org.apache.activemq.security.XBeanSecurityWithGuestNoCredentialsOnlyTest
Running org.apache.activemq.security.XBeanSecurityWithGuestTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.363 sec - in 
org.apache.activemq.security.XBeanSecurityWithGuestTest
Running org.apache.activemq.security.XBeanSslContextTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.963 sec - in 
org.apache.activemq.security.XBeanSslContextTest
Running org.apache.activemq.selector.SelectorParserTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.24 sec - in 
org.apache.activemq.selector.SelectorParserTest
Running org.apache.activemq.selector.SelectorTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.51 sec - in 
org.apache.activemq.selector.SelectorTest
Running org.apache.activemq.selector.UnknownHandlingSelectorTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.216 sec - in 
org.apache.activemq.selector.UnknownHandlingSelectorTest
Running org.apache.activemq.spring.ActiveMQConnectionFactoryFactoryBeanTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.219 sec - in 
org.apache.activemq.spring.ActiveMQConnectionFactoryFactoryBeanTest
Running org.apache.activemq.spring.Spring2XmlNamespacesTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.753 sec - in 
org.apache.activemq.spring.Spring2XmlNamespacesTest

Jenkins build is still unstable: ActiveMQ-Java7 » ActiveMQ :: Unit Tests #880

2015-11-25 Thread Apache Jenkins Server
See