[GitHub] activemq-artemis pull request #1781: ARTEMIS-1613 Integrating JDBC into CLI ...

2018-01-16 Thread clebertsuconic
GitHub user clebertsuconic opened a pull request:

https://github.com/apache/activemq-artemis/pull/1781

ARTEMIS-1613 Integrating JDBC into CLI (create print-data and exp)



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/clebertsuconic/activemq-artemis jdbc

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq-artemis/pull/1781.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1781


commit 59e506621592614733a0848de0850f5085449461
Author: Clebert Suconic 
Date:   2018-01-12T19:07:23Z

ARTEMIS-1613 Integrating JDBC into CLI (create print-data and exp)




---


[GitHub] activemq-artemis issue #1771: ARTEMIS-1600 Support masked passwords in boots...

2018-01-16 Thread gaohoward
Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1771
  
well, almost done. Just found a unused var. I'll delete it right away. 
Sorry about that. :)


---


[GitHub] activemq-artemis issue #1771: ARTEMIS-1600 Support masked passwords in boots...

2018-01-16 Thread gaohoward
Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1771
  
@jbertram Hi Justin, I think it's done. Can you take a look again?

Thanks


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread jbertram
Github user jbertram commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161868488
  
--- Diff: tests/compatibility-tests/src/main/resources/serial/serial.groovy 
---
@@ -24,30 +24,46 @@ import org.apache.activemq.artemis.jms.client.*
 
 file = arg[0]
 method = arg[1]
-System.out.println("File::" + file);
+version = arg[2]
+System.out.println("File::" + file)
 
 
 if (method.equals("write")) {
 cf = new 
ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=1048576=false");
 queue = new ActiveMQQueue("queue");
 topic = new ActiveMQTopic("topic")
+if (version.equals("ARTEMIS-SNAPSHOT")) {
+destination = new ActiveMQDestination("address", "name", 
ActiveMQDestination.TYPE.DESTINATION, null)
+} else if (version.equals("ARTEMIS-155")) {
+destination = new ActiveMQDestination("address", "name", false, 
true, null)
+}
 
 ObjectOutputStream objectOutputStream = new ObjectOutputStream(new 
FileOutputStream(file));
 objectOutputStream.writeObject(cf);
 objectOutputStream.writeObject(queue)
 objectOutputStream.writeObject(topic)
+if (version.startsWith("ARTEMIS")) {
--- End diff --

The link the between the script and the caller seems kind of fragile so I 
put those checks in there in case the caller was ever changed it wouldn't blow 
up immediately.


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161868236
  
--- Diff: tests/compatibility-tests/src/main/resources/serial/serial.groovy 
---
@@ -24,30 +24,46 @@ import org.apache.activemq.artemis.jms.client.*
 
 file = arg[0]
 method = arg[1]
-System.out.println("File::" + file);
+version = arg[2]
+System.out.println("File::" + file)
 
 
 if (method.equals("write")) {
 cf = new 
ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=1048576=false");
 queue = new ActiveMQQueue("queue");
 topic = new ActiveMQTopic("topic")
+if (version.equals("ARTEMIS-SNAPSHOT")) {
+destination = new ActiveMQDestination("address", "name", 
ActiveMQDestination.TYPE.DESTINATION, null)
+} else if (version.equals("ARTEMIS-155")) {
+destination = new ActiveMQDestination("address", "name", false, 
true, null)
+}
 
 ObjectOutputStream objectOutputStream = new ObjectOutputStream(new 
FileOutputStream(file));
 objectOutputStream.writeObject(cf);
 objectOutputStream.writeObject(queue)
 objectOutputStream.writeObject(topic)
+if (version.startsWith("ARTEMIS")) {
+objectOutputStream.writeObject(destination)
+}
 objectOutputStream.close();
 } else {
 ObjectInputStream inputStream = new ObjectInputStream(new 
FileInputStream(file))
 
 cf = inputStream.readObject();
 queue = inputStream.readObject()
 topic = inputStream.readObject()
+if (version.startsWith("ARTEMIS")) {
+destination = inputStream.readObject()
+}
 inputStream.close();
 }
 
 GroovyRun.assertTrue(!cf.getServerLocator().isBlockOnDurableSend());
-GroovyRun.assertEquals(1048576, 
cf.getServerLocator().getConfirmationWindowSize());
+GroovyRun.assertEquals(1048576, 
cf.getServerLocator().getConfirmationWindowSize())
+if (version.startsWith("ARTEMIS")) {
--- End diff --

you don't need that if ^^^


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161866462
  
--- Diff: tests/compatibility-tests/src/main/resources/serial/serial.groovy 
---
@@ -24,30 +24,46 @@ import org.apache.activemq.artemis.jms.client.*
 
 file = arg[0]
 method = arg[1]
-System.out.println("File::" + file);
+version = arg[2]
+System.out.println("File::" + file)
 
 
 if (method.equals("write")) {
 cf = new 
ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=1048576=false");
 queue = new ActiveMQQueue("queue");
 topic = new ActiveMQTopic("topic")
+if (version.equals("ARTEMIS-SNAPSHOT")) {
+destination = new ActiveMQDestination("address", "name", 
ActiveMQDestination.TYPE.DESTINATION, null)
+} else if (version.equals("ARTEMIS-155")) {
+destination = new ActiveMQDestination("address", "name", false, 
true, null)
+}
 
 ObjectOutputStream objectOutputStream = new ObjectOutputStream(new 
FileOutputStream(file));
 objectOutputStream.writeObject(cf);
 objectOutputStream.writeObject(queue)
 objectOutputStream.writeObject(topic)
+if (version.startsWith("ARTEMIS")) {
--- End diff --

I mean... why not simply doing objectOutputStream.writeObject(destination)


version will always start with ARTEMIS


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161865850
  
--- Diff: tests/compatibility-tests/src/main/resources/serial/serial.groovy 
---
@@ -24,30 +24,46 @@ import org.apache.activemq.artemis.jms.client.*
 
 file = arg[0]
 method = arg[1]
-System.out.println("File::" + file);
+version = arg[2]
+System.out.println("File::" + file)
 
 
 if (method.equals("write")) {
 cf = new 
ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=1048576=false");
 queue = new ActiveMQQueue("queue");
 topic = new ActiveMQTopic("topic")
+if (version.equals("ARTEMIS-SNAPSHOT")) {
+destination = new ActiveMQDestination("address", "name", 
ActiveMQDestination.TYPE.DESTINATION, null)
--- End diff --

I told you to call another script as sometimes it fails the compilation. 
Perhaps this constructor won't be checked until you actually called it.


A lot of times I had to do this it involved classNames that didn't exist.. 
so I needed to a call an external script. 


I will wait the test running to be sure.


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread clebertsuconic
Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161865199
  
--- Diff: tests/compatibility-tests/src/main/resources/serial/serial.groovy 
---
@@ -24,30 +24,46 @@ import org.apache.activemq.artemis.jms.client.*
 
 file = arg[0]
 method = arg[1]
-System.out.println("File::" + file);
+version = arg[2]
+System.out.println("File::" + file)
 
 
 if (method.equals("write")) {
 cf = new 
ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=1048576=false");
 queue = new ActiveMQQueue("queue");
 topic = new ActiveMQTopic("topic")
+if (version.equals("ARTEMIS-SNAPSHOT")) {
+destination = new ActiveMQDestination("address", "name", 
ActiveMQDestination.TYPE.DESTINATION, null)
+} else if (version.equals("ARTEMIS-155")) {
+destination = new ActiveMQDestination("address", "name", false, 
true, null)
+}
 
 ObjectOutputStream objectOutputStream = new ObjectOutputStream(new 
FileOutputStream(file));
 objectOutputStream.writeObject(cf);
 objectOutputStream.writeObject(queue)
 objectOutputStream.writeObject(topic)
+if (version.startsWith("ARTEMIS")) {
--- End diff --

why check the version here? just keep what it was.


---


[GitHub] activemq-artemis issue #1778: ARTEMIS-1609 restore 'name' to ActiveMQDestina...

2018-01-16 Thread jbertram
Github user jbertram commented on the issue:

https://github.com/apache/activemq-artemis/pull/1778
  
Take a look at the latest push and let me know what you think.  I think 
I've got everything in there!


---


[GitHub] activemq-artemis pull request #1780: ARTEMIS-1610 - Properly remove an addre...

2018-01-16 Thread cshannon
GitHub user cshannon opened a pull request:

https://github.com/apache/activemq-artemis/pull/1780

ARTEMIS-1610 - Properly remove an address from the WildcardAddressManager

When an address is removed from the address manager its linked addresses
also need to be removed if there are no more bindings for the address

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/cshannon/activemq-artemis ARTEMIS-1610

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq-artemis/pull/1780.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1780


commit e27e1fa4422d128e8c7b2675d07d61da7b7dcac0
Author: Christopher L. Shannon (cshannon) 
Date:   2018-01-16T18:03:38Z

ARTEMIS-1610 - Properly remove an address from the
WildcardAddressManager

When an address is removed from the address manager its linked addresses
also need to be removed if there are no more bindings for the address




---


[GitHub] activemq-artemis pull request #1779: ARTEMIS-1612 Fix redistribution of pref...

2018-01-16 Thread mtaylor
Github user mtaylor closed the pull request at:

https://github.com/apache/activemq-artemis/pull/1779


---


[GitHub] activemq-artemis pull request #1779: ARTEMIS-1612 Fix redistribution of pref...

2018-01-16 Thread mtaylor
GitHub user mtaylor opened a pull request:

https://github.com/apache/activemq-artemis/pull/1779

ARTEMIS-1612 Fix redistribution of prefixed messages



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mtaylor/activemq-artemis ARTEMIS-1612

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq-artemis/pull/1779.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1779


commit 691c0606a9977a74c5f49d8ac5f330ba5b5d1084
Author: Martyn Taylor 
Date:   2018-01-16T16:16:00Z

ARTEMIS-1612 Fix redistribution of prefixed messages




---


[GitHub] activemq-artemis issue #1778: ARTEMIS-1609 restore 'name' to ActiveMQDestina...

2018-01-16 Thread jmesnil
Github user jmesnil commented on the issue:

https://github.com/apache/activemq-artemis/pull/1778
  
@jbertram Could you also cherry pick 
https://github.com/jmesnil/activemq-artemis/commit/7769d43b610cf10dd5f2d82c1d0a3de3385109f0
 

That's built on top of what you are doing so that the (deprecated) 
JMSServerManager can specify the name of the JMS destinations.
(I promise I'll move away from using this class soon :) 



---


[GitHub] activemq-artemis issue #1778: ARTEMIS-1609 restore 'name' to ActiveMQDestina...

2018-01-16 Thread jbertram
Github user jbertram commented on the issue:

https://github.com/apache/activemq-artemis/pull/1778
  
@clebertsuconic, will do.


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread jbertram
Github user jbertram commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161794644
  
--- Diff: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
 ---
@@ -309,7 +330,7 @@ public SimpleString getSimpleAddress() {
}
 
public String getName() {
-  return simpleAddress.toString();
+  return name == null ? simpleAddress.toString() : name.toString();
--- End diff --

Fair enough.


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread jbertram
Github user jbertram commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161794632
  
--- Diff: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
 ---
@@ -273,6 +286,14 @@ public void setAddress(String address) {
   setSimpleAddress(SimpleString.toSimpleString(address));
}
 
+   public void setName(String name) {
--- End diff --

The address setter was added as part of an effort to make Artemis JNDI work 
properly in Tomcat.  I assume it's needed here, but I'll remove it for 
simplicity's sake and it can be added later if necessary.


---


[GitHub] activemq-artemis issue #1778: ARTEMIS-1609 restore 'name' to ActiveMQDestina...

2018-01-16 Thread clebertsuconic
Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1778
  
@jbertram Can you please change SerializationTest on the compatibility test 
to make sure such field is translating correctly?


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread jmesnil
Github user jmesnil commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161788189
  
--- Diff: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
 ---
@@ -244,22 +249,30 @@ public static ActiveMQTemporaryTopic 
createTemporaryTopic(String address) {
protected ActiveMQDestination(final String address,
  final TYPE type,
  final ActiveMQSession session) {
-  this.simpleAddress = SimpleString.toSimpleString(address);
-
-  this.thetype = type;
-
-  this.session = session;
+  this(SimpleString.toSimpleString(address), type, session);
+   }
 
-  this.temporary = TYPE.isTemporary(type);
+   protected ActiveMQDestination(final SimpleString address,
+ final TYPE type,
+ final ActiveMQSession session) {
+  this(address, null, type, session);
--- End diff --

should pass `address` instead of `null` for the name


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread jmesnil
Github user jmesnil commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161788722
  
--- Diff: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
 ---
@@ -273,6 +286,14 @@ public void setAddress(String address) {
   setSimpleAddress(SimpleString.toSimpleString(address));
}
 
+   public void setName(String name) {
--- End diff --

What's the use of these setters? 
They should not be used for serialization and I don't see why the name (or 
address) of an instantiated JMS destination would be changed.


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread jmesnil
Github user jmesnil commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/1778#discussion_r161789136
  
--- Diff: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
 ---
@@ -309,7 +330,7 @@ public SimpleString getSimpleAddress() {
}
 
public String getName() {
-  return simpleAddress.toString();
+  return name == null ? simpleAddress.toString() : name.toString();
--- End diff --

if we use `address` instead of `null` when creating an ActiveMQDestination, 
we ensure that the fields are always non-null and this method can just return 
`name.toString()`


---


[GitHub] activemq-artemis pull request #1778: ARTEMIS-1609 restore 'name' to ActiveMQ...

2018-01-16 Thread jbertram
GitHub user jbertram opened a pull request:

https://github.com/apache/activemq-artemis/pull/1778

ARTEMIS-1609 restore 'name' to ActiveMQDestination



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jbertram/activemq-artemis ARTEMIS-1609

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq-artemis/pull/1778.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1778


commit 264eec2bf09db422c328edcf5150d16ad0e8ac9a
Author: Justin Bertram 
Date:   2018-01-16T15:15:00Z

ARTEMIS-1609 restore 'name' to ActiveMQDestination




---


[GitHub] activemq-artemis pull request #1774: ARTEMIS-1602 avoid potential NPE if pro...

2018-01-16 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/activemq-artemis/pull/1774


---