[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189816=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189816
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 01:26
Start Date: 25/Jan/19 01:26
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189816)
Time Spent: 8h 50m  (was: 8h 40m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 8h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189817=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189817
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 01:27
Start Date: 25/Jan/19 01:27
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on issue #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#issuecomment-457422187
 
 
   sent a pr to your branch to address my comments on this, and also unify 
logic with ActiveMQSession
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189817)
Time Spent: 9h  (was: 8h 50m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 9h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189812=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189812
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 01:06
Start Date: 25/Jan/19 01:06
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250835700
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   im just about to send you pr
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189812)
Time Spent: 8.5h  (was: 8h 20m)

> JMS Producer queueQuery does 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189813=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189813
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 01:06
Start Date: 25/Jan/19 01:06
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250835700
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   im just about to send you pr to your branch
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189813)
Time Spent: 8h 40m  (was: 8.5h)

> JMS Producer 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189782=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189782
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:28
Start Date: 25/Jan/19 00:28
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250828872
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   re defaultDestination, i dont beleive it has to, as when creating the 
Producer in ActiveMQSession the queue / addresses are created then. 
   
   If anything if a defaultDestination exists, then we SHOULD not need go into 
this code, as if one exists then any supplied destination must == 
defaultDestination anyhow.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189784=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189784
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:30
Start Date: 25/Jan/19 00:30
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250828872
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   re defaultDestination, i dont beleive it has to, as when creating the 
Producer in ActiveMQSession the queue / addresses are created then. 
   
   If anything if a defaultDestination exists, then we SHOULD not need go into 
this code, as if one exists then any supplied destination must == 
defaultDestination anyhow. And this has to be created at the point of creation 
of the producer.
 

This is an automated message from the 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189803=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189803
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:35
Start Date: 25/Jan/19 00:35
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250828872
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   re defaultDestination, i dont beleive it has to, as when creating the 
Producer in ActiveMQSession the queue / addresses are created then. 
   
   If anything if a defaultDestination exists, then we SHOULD not need go into 
this code, as if one exists then any supplied destination must == 
defaultDestination anyhow. And this has to be created at the point of creation 
of the producer, for the fact it has to fail to create a producer if it cannot 
create/bind to the defaultDestination at 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189802=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189802
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:33
Start Date: 25/Jan/19 00:33
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250828872
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   re defaultDestination, i dont beleive it has to, as when creating the 
Producer in ActiveMQSession the queue / addresses are created then. 
   
   If anything if a defaultDestination exists, then we SHOULD not need go into 
this code, as if one exists then any supplied destination must == 
defaultDestination anyhow. And this has to be created at the point of creation 
of the producer, for the fact it has to fail to create a producer if it cannot 
create/bind to the defaultDestination at 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189800=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189800
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:32
Start Date: 25/Jan/19 00:32
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250828872
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   re defaultDestination, i dont beleive it has to, as when creating the 
Producer in ActiveMQSession the queue / addresses are created then. 
   
   If anything if a defaultDestination exists, then we SHOULD not need go into 
this code, as if one exists then any supplied destination must == 
defaultDestination anyhow. And this has to be created at the point of creation 
of the producer, for the fact it has to fail to create a producer if it cannot 
create/bind to the defaultDestination at 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189786=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189786
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:31
Start Date: 25/Jan/19 00:31
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250829575
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   hmmm.. there's another check on createProducer.
   
   It's not worth the effort.. I will just take your version.. and keep the 
test I'm writing.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189783=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189783
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:29
Start Date: 25/Jan/19 00:29
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250828872
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   re defaultDestination, i dont beleive it has to, as when creating the 
Producer in ActiveMQSession the queue / addresses are created then. 
   
   If anything if a defaultDestination exists, then we SHOULD not need go into 
this code, as if one exists then any supplied destination must == 
defaultDestination anyhow. And this has to be created on creation of the 
producer.
 

This is an automated message from the Apache Git 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189779=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189779
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:27
Start Date: 25/Jan/19 00:27
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250828872
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   re defaultDestination, i dont beleive it has to, as when creating the 
Producer in ActiveMQSession the queue / addresses are created then.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189778=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189778
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:23
Start Date: 25/Jan/19 00:23
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250828204
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   if we could sort out the exceptions in it, that would be great. its midnight 
here, will pick up again tomorrow.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: 

[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189775=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189775
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:20
Start Date: 25/Jan/19 00:20
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250827739
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   for example. another issue on the original code, it's never checking the 
destination on a defaultDestination.
   
   small issue, but my change also addressed that.
   
   
   I don't know what you think, but the code I wrote it's easier to read.
   
   Although I understand your concern as this is the JMS layer, and TCK is 
applied here. But I think it's safe to make the change on this case. I would 
run the full testsuite,
 


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189770=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189770
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:10
Start Date: 25/Jan/19 00:10
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250825292
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I mean we need a test in ActiveMQ Artemis for this to merge. 
   
   We need to be able to build, refactor, and release with knowing we haven't 
broken something upstream or dependent projects have on us. Like wise we need 
to validate the fix.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189770)
Time Spent: 3h 10m  (was: 3h)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189766=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189766
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:08
Start Date: 25/Jan/19 00:08
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250825292
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I mean we need a test in ActiveMQ Artemis.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189766)
Time Spent: 2h 50m  (was: 2h 40m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189771=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189771
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:13
Start Date: 25/Jan/19 00:13
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250825292
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I mean we need a test in ActiveMQ Artemis for this to merge. 
   
   We need to be able to build, refactor, and release with knowing we haven't 
broken something our users and upstream/dependent projects have on us. Like 
wise we need to validate the fix.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189771)
Time Spent: 3h 20m  (was: 3h 10m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189773=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189773
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:16
Start Date: 25/Jan/19 00:16
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#discussion_r250826843
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -409,33 +409,42 @@ private void doSendx(ActiveMQDestination destination,
ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
 
if (!query.isExists()) {
-  if (destination.isQueue() && query.isAutoCreateQueues()) {
- clientSession.createAddress(address, RoutingType.ANYCAST, 
true);
- if (destination.isTemporary()) {
-// TODO is it right to use the address for the queue 
name here?
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+  if (destination.isQueue()) {
+ if (query.isAutoCreateAddresses() && 
query.isAutoCreateQueues()) {
+clientSession.createAddress(address, 
RoutingType.ANYCAST, true);
+if (destination.isTemporary()) {
+   // TODO is it right to use the address for the 
queue name here?
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+}
  } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses() + " , isAutoCreateQueues=" + 
query.isAutoCreateQueues());
+ }
+  } else {
+ if (query.isAutoCreateAddresses()) {
+clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
+ } else {
+throw new InvalidDestinationException("JMSTopic " + 
address + " cannot be created, autoCreateAddresses is " + 
query.isAutoCreateAddresses());
  }
-  } else if (!destination.isQueue() && 
query.isAutoCreateAddresses()) {
- clientSession.createAddress(address, 
RoutingType.MULTICAST, true);
-  } else if ((destination.isQueue() && 
!query.isAutoCreateQueues()) || (!destination.isQueue() && 
!query.isAutoCreateAddresses())) {
- throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
   if (destination.isQueue()) {
  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
  if (!queueQuery.isExists()) {
-if (destination.isTemporary()) {
-   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+if (query.isAutoCreateQueues()) {
+   if (destination.isTemporary()) {
+  session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
+   } else {
+  session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   }
 } else {
-   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, query);
+   throw new InvalidDestinationException("JMSQueue " + 
address + " cannot be created, address exists but autoCreateQueues is " + 
query.isAutoCreateQueues());
 
 Review comment:
   I would prefer going with my PR. it's simpler after all if you look closely.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189773)
Time Spent: 6h 40m  

[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189774=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189774
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:16
Start Date: 25/Jan/19 00:16
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250825292
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I mean we need a test in ActiveMQ Artemis for this to merge. 
   
   We need to be able to build, refactor, and release with knowing we haven't 
broken something our users and upstream/dependent projects have on us. Like 
wise we need to validate the fix.
   
   essentially i suggest a test is created with a security manager on, in the 
activemq artemis project, with a similar leak detector to what youre doing in 
your project "wildfly" so to create this testing scenario in artemis.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189774)
Time Spent: 3h 40m  (was: 3.5h)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189772=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189772
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:15
Start Date: 25/Jan/19 00:15
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250825292
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I mean we need a test in ActiveMQ Artemis for this to merge. 
   
   We need to be able to build, refactor, and release with knowing we haven't 
broken something our users and upstream/dependent projects have on us. Like 
wise we need to validate the fix.
   
   essentially i suggest a test is created with a security manager on, in 
activemq artemis, which a similar leak detector to what youre doing in your 
project "wildfly".
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189772)
Time Spent: 3.5h  (was: 3h 20m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARTEMIS-2192) LegacyLDAPSecuritySettingPlugin uses hard-coded RDN types

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751725#comment-16751725
 ] 

ASF subversion and git services commented on ARTEMIS-2192:
--

Commit 39e0f152105ec99879f1e72cf07ab249f3ef7776 in activemq-artemis's branch 
refs/heads/2.6.x from Justin Graham Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=39e0f15 ]

ARTEMIS-2192 fix listener for LegacyLDAPSecuritySettingPlugin

(cherry picked from commit 693ea722f59cfd650d3ae418b1d60cd4552e2180)


> LegacyLDAPSecuritySettingPlugin uses hard-coded RDN types
> -
>
> Key: ARTEMIS-2192
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2192
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
>Reporter: Justin Bertram
>Assignee: Justin Bertram
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189769=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189769
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 25/Jan/19 00:09
Start Date: 25/Jan/19 00:09
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250825292
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I mean we need a test in ActiveMQ Artemis, we need to be able to build, 
refactor, and release with knowing we haven't broken something upstream or 
dependent projects have on us. Like wise we need to validate the fix.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189769)
Time Spent: 3h  (was: 2h 50m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189760=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189760
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:52
Start Date: 24/Jan/19 23:52
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on issue #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521#issuecomment-457402626
 
 
   @clebertsuconic little less of a complete refactor, but addresses the 
issues. thought id offer it up as an alternative.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189760)
Time Spent: 6.5h  (was: 6h 20m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 6.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189758=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189758
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:50
Start Date: 24/Jan/19 23:50
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2521: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2521
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189758)
Time Spent: 6h 20m  (was: 6h 10m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 6h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189747=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189747
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:24
Start Date: 24/Jan/19 23:24
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250816406
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
 
 Review comment:
   maybe use generic Destination, instead of Queue, to avoid confusion between 
JMSQueue and "core" Queue.
   
   "Destination " + address + " does not exist, auto create addresses is 
enabled, but auto create queues is not."
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189747)
Time Spent: 6h 10m  (was: 6h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 6h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189746=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189746
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:24
Start Date: 24/Jan/19 23:24
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250814254
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
 
 Review comment:
   or just simple use generic Destination to describe address as all exceptions 
were before, with the extra detail.
   
   "Destination " + address + " does not exist, auto create addresses is 
disabled."
   
   also would avoid confusion between JMSQueue vs "core" Queue.
   
   
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189746)
Time Spent: 6h  (was: 5h 50m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 6h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189745=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189745
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:23
Start Date: 24/Jan/19 23:23
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250814254
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
 
 Review comment:
   or just simple use generic Destination as all exceptions were before.
   
   "Destination " + address + " does not exist, auto create addresses is 
disabled."
   
   also would avoid confusion between JMSQueue vs "core" Queue.
   
   
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189745)
Time Spent: 5h 50m  (was: 5h 40m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 5h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189744=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189744
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:23
Start Date: 24/Jan/19 23:23
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250815971
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
+
+
+// Second we create the queue, but we only do it if the address 
was created
+if (destination.isQueue() && addressExists) {
+   ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+   if (!queueQuery.isExists()) {
+  if (addressQuery.isAutoCreateQueues()) {
+ try {
+if (destination.isTemporary()) {
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, addressQuery);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, addressQuery);
+}
+ } catch (ActiveMQQueueExistsException thatsOK) {
+// nothing to be done
+ }
+  } else {
+ throw new InvalidDestinationException("Queue " + address 
+ " does not exist");
 
 Review comment:
   maybe use generic Destination, instead of Queue, to avoid confusion between 
JMSQueue and "core" Queue.
   
   "Destination " + address + " does not exist, address exists, but auto create 
queues is disabled."
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189744)
Time Spent: 5h 40m  (was: 5.5h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 5h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189741=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189741
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:19
Start Date: 24/Jan/19 23:19
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250814957
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
+
+
+// Second we create the queue, but we only do it if the address 
was created
+if (destination.isQueue() && addressExists) {
+   ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+   if (!queueQuery.isExists()) {
+  if (addressQuery.isAutoCreateQueues()) {
+ try {
+if (destination.isTemporary()) {
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, addressQuery);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, addressQuery);
+}
+ } catch (ActiveMQQueueExistsException thatsOK) {
+// nothing to be done
+ }
+  } else {
+ throw new InvalidDestinationException("Queue " + address 
+ " does not exist");
+  }
+   }
+}
+
+if (!addressExists) {
 
 Review comment:
   lets keep that exceptions are thrown from explicit points where checks are 
done and fail, so can be more explicit and also we can debug where the check 
fail occured by stack trace lines.
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189741)
Time Spent: 5.5h  (was: 5h 20m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 5.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189740=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189740
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:19
Start Date: 24/Jan/19 23:19
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250814957
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
+
+
+// Second we create the queue, but we only do it if the address 
was created
+if (destination.isQueue() && addressExists) {
+   ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+   if (!queueQuery.isExists()) {
+  if (addressQuery.isAutoCreateQueues()) {
+ try {
+if (destination.isTemporary()) {
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, addressQuery);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, addressQuery);
+}
+ } catch (ActiveMQQueueExistsException thatsOK) {
+// nothing to be done
+ }
+  } else {
+ throw new InvalidDestinationException("Queue " + address 
+ " does not exist");
+  }
+   }
+}
+
+if (!addressExists) {
 
 Review comment:
   lets keep that exceptions are thrown from explicit points where checks are 
done and fail, so can be more explicit and also we can debug where the check 
fail occured by stack trace lines.
   
   also as this is JMS interface, we should use words like Queue, Topic or 
Destination in exception messages
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189740)
Time Spent: 5h 20m  (was: 5h 10m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 5h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189739=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189739
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:18
Start Date: 24/Jan/19 23:18
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250814957
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
+
+
+// Second we create the queue, but we only do it if the address 
was created
+if (destination.isQueue() && addressExists) {
+   ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+   if (!queueQuery.isExists()) {
+  if (addressQuery.isAutoCreateQueues()) {
+ try {
+if (destination.isTemporary()) {
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, addressQuery);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, addressQuery);
+}
+ } catch (ActiveMQQueueExistsException thatsOK) {
+// nothing to be done
+ }
+  } else {
+ throw new InvalidDestinationException("Queue " + address 
+ " does not exist");
+  }
+   }
+}
+
+if (!addressExists) {
 
 Review comment:
   -1 lets keep that exceptions are thrown from explicit points where checks 
are done and fail, so can be more explicit and also we can debug where the 
check fail occured by stack trace lines.
   
   also general comment as this is JMS interface, we should use words like 
Queue, Topic or Destination in exception messages
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189739)
Time Spent: 5h 10m  (was: 5h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 5h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189738=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189738
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:18
Start Date: 24/Jan/19 23:18
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250814957
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
+
+
+// Second we create the queue, but we only do it if the address 
was created
+if (destination.isQueue() && addressExists) {
+   ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+   if (!queueQuery.isExists()) {
+  if (addressQuery.isAutoCreateQueues()) {
+ try {
+if (destination.isTemporary()) {
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, addressQuery);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, addressQuery);
+}
+ } catch (ActiveMQQueueExistsException thatsOK) {
+// nothing to be done
+ }
+  } else {
+ throw new InvalidDestinationException("Queue " + address 
+ " does not exist");
+  }
+   }
+}
+
+if (!addressExists) {
 
 Review comment:
   -1 lets keep that exceptions are thrown from explicit points where checks 
are done and fail, so can be more explicit and also we can debug where the 
check fail occured by stack trace lines.
   
   also general comment as this is JMS interface, we should use words like 
Queue, Topic or Destination
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189738)
Time Spent: 5h  (was: 4h 50m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189737=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189737
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:16
Start Date: 24/Jan/19 23:16
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250814254
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
 
 Review comment:
   or just simple use generic Destination as all exceptions were before.
   
   "Destination " + address + " does not exist, auto create addresses is 
disabled."
   
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189737)
Time Spent: 4h 50m  (was: 4h 40m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 4h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189736=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189736
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:15
Start Date: 24/Jan/19 23:15
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250814254
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
 
 Review comment:
   or just simple use generic Destination as it was before even.
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189736)
Time Spent: 4h 40m  (was: 4.5h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 4h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189735=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189735
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:09
Start Date: 24/Jan/19 23:09
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250812700
 
 

 ##
 File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/QueueAutoCreationTest.java
 ##
 @@ -133,6 +133,36 @@ public void testAutoCreateOnTopic() throws Exception {
   
Assert.assertTrue(((ActiveMQConnection)connection).containsKnownDestination(addressName));
}
 
+   @Test //(timeout = 3)
+   // QueueAutoCreationTest was created to validate auto-creation of queues
+   // and this test was added to validate a regression: 
https://issues.apache.org/jira/browse/ARTEMIS-2238
+   public void testAutoCreateOnAddressOnly() throws Exception {
 
 Review comment:
   please address my other comments before merging
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189735)
Time Spent: 4.5h  (was: 4h 20m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 4.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189732=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189732
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:08
Start Date: 24/Jan/19 23:08
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250809792
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
 
 Review comment:
   seperate the combined check to nested ifs, addressQuery.isExists() outer if, 
addressQuery.isAutoCreateAddresses()  inner if with inner if else clause here 
with throws:
   
   then on debugging from logs with stack trace it would make it easier, as 
would get line where it errored out so could figure out. Also could then allow 
a better description so end users understand better,  e.g. 
   
   depending on destination.isQueue()
   
   "Queue " + address + " does not exist, auto create addresses is disabled."
   
   "Topic " + address + " does not exist, auto create addresses is disabled."
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189732)
Time Spent: 4h  (was: 3h 50m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189733=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189733
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:08
Start Date: 24/Jan/19 23:08
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250812517
 
 

 ##
 File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/QueueAutoCreationTest.java
 ##
 @@ -114,7 +114,7 @@ public void testHugeString() throws Exception {
}
 
 
-   @Test(timeout = 3)
+   @Test //(timeout = 3)
 
 Review comment:
   ? is this now broker?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189733)
Time Spent: 4h 10m  (was: 4h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189734=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189734
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:08
Start Date: 24/Jan/19 23:08
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250812517
 
 

 ##
 File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/QueueAutoCreationTest.java
 ##
 @@ -114,7 +114,7 @@ public void testHugeString() throws Exception {
}
 
 
-   @Test(timeout = 3)
+   @Test //(timeout = 3)
 
 Review comment:
   ? is this now broken
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189734)
Time Spent: 4h 20m  (was: 4h 10m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 4h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189730=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189730
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:01
Start Date: 24/Jan/19 23:01
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250809792
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
 
 Review comment:
   add else clause here with throws:
   
   then on debugging from logs with stack trace it would make it easier, as 
would get line where it errored out so could figure out. Also could then allow 
a better description so end users understand better,  e.g. 
   
   depending on destination.isQueue()
   
   "Queue " + address + " does not exist, auto create addresses is disabled."
   
   "Topic " + address + " does not exist, auto create addresses is disabled."
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189730)
Time Spent: 3h 50m  (was: 3h 40m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189728=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189728
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:01
Start Date: 24/Jan/19 23:01
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250809081
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
 
 Review comment:
   why not simply throw exception here, then on debugging from logs with stack 
trace it would make it easier. maybe having a cleaner exception message for 
users, e.g. 
   
   "Queue " + address + " does not exist, auto create addresses is enabled, but 
auto create queues is not."
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189728)
Time Spent: 3.5h  (was: 3h 20m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189729=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189729
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 23:01
Start Date: 24/Jan/19 23:01
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250810104
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +499,67 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
+
+   if (destination.isQueue() && 
!addressQuery.isAutoCreateQueues()) {
+  if (logger.isDebugEnabled()) {
+ logger.debug("Address " + address + " was not created 
because we would not have permission to create queue");
+  }
+  // if it can't create the internal queue on JMS Queues, why 
bother creating the address, just mark it false now
+  addressExists = false;
+   } else {
+  RoutingType addressType = destination.isQueue() ? 
RoutingType.ANYCAST : RoutingType.MULTICAST;
+  clientSession.createAddress(address, addressType, true);
+  addressExists = true;
+   }
+}
+
+
+// Second we create the queue, but we only do it if the address 
was created
+if (destination.isQueue() && addressExists) {
+   ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+   if (!queueQuery.isExists()) {
+  if (addressQuery.isAutoCreateQueues()) {
+ try {
+if (destination.isTemporary()) {
+   session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, addressQuery);
+} else {
+   session.createQueue(destination, 
RoutingType.ANYCAST, address, null, true, true, addressQuery);
+}
+ } catch (ActiveMQQueueExistsException thatsOK) {
+// nothing to be done
+ }
+  } else {
+ throw new InvalidDestinationException("Queue " + address 
+ " does not exist");
 
 Review comment:
   make this more descriptive: "Queue " + address + " does not exist, address 
exists, but auto create queues is disabled."
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189729)
Time Spent: 3h 40m  (was: 3.5h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 3h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189724=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189724
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 22:53
Start Date: 24/Jan/19 22:53
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250808742
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,58 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
 
 Review comment:
   I don't think it would be an issue.. but I have ammended it...
   I will create a test..
   
   
   let me run tests on it.. please don't merge this.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189724)
Time Spent: 3h 10m  (was: 3h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189725=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189725
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 22:53
Start Date: 24/Jan/19 22:53
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250808877
 
 

 ##
 File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/QueueAutoCreationTest.java
 ##
 @@ -133,6 +133,36 @@ public void testAutoCreateOnTopic() throws Exception {
   
Assert.assertTrue(((ActiveMQConnection)connection).containsKnownDestination(addressName));
}
 
+   @Test //(timeout = 3)
+   // QueueAutoCreationTest was created to validate auto-creation of queues
+   // and this test was added to validate a regression: 
https://issues.apache.org/jira/browse/ARTEMIS-2238
+   public void testAutoCreateOnAddressOnly() throws Exception {
 
 Review comment:
   this is an incomplete test.. I will finish this before merging
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189725)
Time Spent: 3h 20m  (was: 3h 10m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189722=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189722
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 22:40
Start Date: 24/Jan/19 22:40
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250805377
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,58 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+
+  // TODO: What to do with FQQN
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery addressQuery = 
clientSession.addressQuery(address);
+
+boolean addressExists = addressQuery.isExists();
+// first we check the address existence, and autoCreate it if 
allowed in case it does not exists
+
+if (!addressExists && addressQuery.isAutoCreateAddresses()) {
 
 Review comment:
   We should only create an address for a JMSQueue if we can create both the 
Address and Queue, else you could end up creating an address, but not the queue 
(old code had correct logic here)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189722)
Time Spent: 3h  (was: 2h 50m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 3h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189716=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189716
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 22:21
Start Date: 24/Jan/19 22:21
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250800199
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
 
 Review comment:
   it would always add the end, but I'm rewriting the logic now
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189716)
Time Spent: 2h 50m  (was: 2h 40m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189689=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189689
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:04
Start Date: 24/Jan/19 21:04
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250775737
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
+} else {
+   if (destination.isQueue()) {
+  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+  if (!queueQuery.isExists()) {
+ checkQueue(destination, address, clientSession, query);
+  }
+   }
+
+   connection.addKnownDestination(address);
+}
+ } catch (ActiveMQQueueExistsException e) {
+// The queue was created by another client/admin between the query 
check and send create queue packet
+ } catch (ActiveMQException e) {
+throw JMSExceptionHelper.convertFromActiveMQException(e);
+ }
+  }
+   }
+
+   private void checkQueue(ActiveMQDestination destination,
+SimpleString address,
+ClientSession clientSession,
+ClientSession.AddressQuery query) throws 
ActiveMQException, InvalidDestinationException {
+  if (destination.isQueue() && query.isAutoCreateQueues()) {
 
 Review comment:
   should this not also, dare i say check as well: query.isAutoCreateAddresses()
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189689)
Time Spent: 1h 10m  (was: 1h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189706=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189706
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:26
Start Date: 24/Jan/19 21:26
Worklog Time Spent: 10m 
  Work Description: ehsavoie commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250783079
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   We run WildFly test suite with a security manager on (which is how this leak 
was found) BUT I don't have the runs where this happened so I don't know the 
symptoms :( for a test ensure that this is resolved.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189706)
Time Spent: 2h 40m  (was: 2.5h)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189703=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189703
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:24
Start Date: 24/Jan/19 21:24
Worklog Time Spent: 10m 
  Work Description: ehsavoie commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250782433
 
 

 ##
 File path: 
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DBOption.java
 ##
 @@ -223,13 +225,17 @@ protected void initializeJournal(Configuration 
configuration) throws Exception {
   this.config = configuration;
   executor = Executors.newFixedThreadPool(5, 
ActiveMQThreadFactory.defaultThreadFactory());
   executorFactory = new OrderedExecutorFactory(executor);
-
-  scheduledExecutorService = new 
ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), new 
ThreadFactory() {
+  scheduledExecutorService = new 
ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), 
AccessController.doPrivileged(new PrivilegedAction() {
  @Override
- public Thread newThread(Runnable r) {
-return new Thread(r);
+ public ThreadFactory run() {
 
 Review comment:
   Because i looked at all threadFactories that werre not protected, didn't 
check the implementation. Sorry for this noise on ActiveMQThreadFactory
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189703)
Time Spent: 2.5h  (was: 2h 20m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189699=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189699
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:14
Start Date: 24/Jan/19 21:14
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250779232
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
 
 Review comment:
   this is missing added the destination (another bug introduced by the 
original change)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189699)
Time Spent: 2h 10m  (was: 2h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189702=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189702
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:18
Start Date: 24/Jan/19 21:18
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250780506
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
 
 Review comment:
   e.g. if we are succesfull, then the address becomes known right?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189702)
Time Spent: 2h 40m  (was: 2.5h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189696=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189696
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:08
Start Date: 24/Jan/19 21:08
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250777278
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
+} else {
+   if (destination.isQueue()) {
+  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+  if (!queueQuery.isExists()) {
+ checkQueue(destination, address, clientSession, query);
+  }
+   }
+
+   connection.addKnownDestination(address);
+}
+ } catch (ActiveMQQueueExistsException e) {
+// The queue was created by another client/admin between the query 
check and send create queue packet
+ } catch (ActiveMQException e) {
+throw JMSExceptionHelper.convertFromActiveMQException(e);
+ }
+  }
+   }
+
+   private void checkQueue(ActiveMQDestination destination,
+SimpleString address,
+ClientSession clientSession,
+ClientSession.AddressQuery query) throws 
ActiveMQException, InvalidDestinationException {
+  if (destination.isQueue() && query.isAutoCreateQueues()) {
 
 Review comment:
   @michaelandrepearce I just wnated to show you an idea... but this is wrong 
now
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189696)
Time Spent: 2h  (was: 1h 50m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189700=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189700
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:15
Start Date: 24/Jan/19 21:15
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250779232
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
 
 Review comment:
   this is missing adding the destination  to known destinations, (another bug 
introduced by the original change)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189700)
Time Spent: 2h 20m  (was: 2h 10m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189701=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189701
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:15
Start Date: 24/Jan/19 21:15
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250779232
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
 
 Review comment:
   this is missing adding the destination  to known destinations (another bug 
introduced by the original change)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189701)
Time Spent: 2.5h  (was: 2h 20m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189688=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189688
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:03
Start Date: 24/Jan/19 21:03
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250775737
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
+} else {
+   if (destination.isQueue()) {
+  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+  if (!queueQuery.isExists()) {
+ checkQueue(destination, address, clientSession, query);
+  }
+   }
+
+   connection.addKnownDestination(address);
+}
+ } catch (ActiveMQQueueExistsException e) {
+// The queue was created by another client/admin between the query 
check and send create queue packet
+ } catch (ActiveMQException e) {
+throw JMSExceptionHelper.convertFromActiveMQException(e);
+ }
+  }
+   }
+
+   private void checkQueue(ActiveMQDestination destination,
+SimpleString address,
+ClientSession clientSession,
+ClientSession.AddressQuery query) throws 
ActiveMQException, InvalidDestinationException {
+  if (destination.isQueue() && query.isAutoCreateQueues()) {
 
 Review comment:
   should this not also, dare i say check: query.isAutoCreateAddresses()
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189688)
Time Spent: 1h  (was: 50m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189694=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189694
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:07
Start Date: 24/Jan/19 21:07
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250776970
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
+} else {
+   if (destination.isQueue()) {
+  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+  if (!queueQuery.isExists()) {
+ checkQueue(destination, address, clientSession, query);
+  }
+   }
+
+   connection.addKnownDestination(address);
+}
+ } catch (ActiveMQQueueExistsException e) {
+// The queue was created by another client/admin between the query 
check and send create queue packet
+ } catch (ActiveMQException e) {
+throw JMSExceptionHelper.convertFromActiveMQException(e);
+ }
+  }
+   }
+
+   private void checkQueue(ActiveMQDestination destination,
+SimpleString address,
+ClientSession clientSession,
+ClientSession.AddressQuery query) throws 
ActiveMQException, InvalidDestinationException {
+  if (destination.isQueue() && query.isAutoCreateQueues()) {
 
 Review comment:
   let me rewrite this
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189694)
Time Spent: 1h 50m  (was: 1h 40m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189693=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189693
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:07
Start Date: 24/Jan/19 21:07
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250776531
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
+} else {
+   if (destination.isQueue()) {
+  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+  if (!queueQuery.isExists()) {
+ checkQueue(destination, address, clientSession, query);
+  }
+   }
+
+   connection.addKnownDestination(address);
+}
+ } catch (ActiveMQQueueExistsException e) {
+// The queue was created by another client/admin between the query 
check and send create queue packet
+ } catch (ActiveMQException e) {
+throw JMSExceptionHelper.convertFromActiveMQException(e);
+ }
+  }
+   }
+
+   private void checkQueue(ActiveMQDestination destination,
+SimpleString address,
+ClientSession clientSession,
+ClientSession.AddressQuery query) throws 
ActiveMQException, InvalidDestinationException {
+  if (destination.isQueue() && query.isAutoCreateQueues()) {
 
 Review comment:
   e.g. no point calling,  clientSession.createAddress(address, 
RoutingType.ANYCAST, true); 
   
   if its not allowed
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189693)
Time Spent: 1h 40m  (was: 1.5h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189690=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189690
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:06
Start Date: 24/Jan/19 21:06
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250776531
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
+} else {
+   if (destination.isQueue()) {
+  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+  if (!queueQuery.isExists()) {
+ checkQueue(destination, address, clientSession, query);
+  }
+   }
+
+   connection.addKnownDestination(address);
+}
+ } catch (ActiveMQQueueExistsException e) {
+// The queue was created by another client/admin between the query 
check and send create queue packet
+ } catch (ActiveMQException e) {
+throw JMSExceptionHelper.convertFromActiveMQException(e);
+ }
+  }
+   }
+
+   private void checkQueue(ActiveMQDestination destination,
+SimpleString address,
+ClientSession clientSession,
+ClientSession.AddressQuery query) throws 
ActiveMQException, InvalidDestinationException {
+  if (destination.isQueue() && query.isAutoCreateQueues()) {
 
 Review comment:
   e.g. no point calling,  clientSession.createAddress(address, 
RoutingType.ANYCAST, true); 
   
   if its now allowed
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189690)
Time Spent: 1h 20m  (was: 1h 10m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189691=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189691
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:06
Start Date: 24/Jan/19 21:06
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r250776567
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -533,6 +496,52 @@ private void doSendx(ActiveMQDestination destination,
   }
}
 
+   private void checkDestination(ActiveMQDestination destination,
+ SimpleString address,
+ ClientSession clientSession) throws 
JMSException {
+  if (!connection.containsKnownDestination(address)) {
+ try {
+ClientSession.AddressQuery query = 
clientSession.addressQuery(address);
+
+if (!query.isExists()) {
+   checkQueue(destination, address, clientSession, query);
+} else {
+   if (destination.isQueue()) {
+  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
+  if (!queueQuery.isExists()) {
+ checkQueue(destination, address, clientSession, query);
+  }
+   }
+
+   connection.addKnownDestination(address);
+}
+ } catch (ActiveMQQueueExistsException e) {
+// The queue was created by another client/admin between the query 
check and send create queue packet
+ } catch (ActiveMQException e) {
+throw JMSExceptionHelper.convertFromActiveMQException(e);
+ }
+  }
+   }
+
+   private void checkQueue(ActiveMQDestination destination,
+SimpleString address,
+ClientSession clientSession,
+ClientSession.AddressQuery query) throws 
ActiveMQException, InvalidDestinationException {
+  if (destination.isQueue() && query.isAutoCreateQueues()) {
 
 Review comment:
   I agree with you. although It wasn't part of my original change.. I was just 
fixing a bug
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189691)
Time Spent: 1.5h  (was: 1h 20m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189683=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189683
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 21:01
Start Date: 24/Jan/19 21:01
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2520: 
ARTEMIS-2238 Enhancement to queueQuery on producer
URL: https://github.com/apache/activemq-artemis/pull/2520
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189683)
Time Spent: 50m  (was: 40m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMQCPP-638) Add Support for OpenSSL 1.1.1

2019-01-24 Thread Jeff Gullett (JIRA)


[ 
https://issues.apache.org/jira/browse/AMQCPP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751580#comment-16751580
 ] 

Jeff Gullett commented on AMQCPP-638:
-

Is there a reason why this was removed from 3.9.5?  What OpenSSL support was 
added in AMQCPP-623?

> Add Support for OpenSSL 1.1.1
> -
>
> Key: AMQCPP-638
> URL: https://issues.apache.org/jira/browse/AMQCPP-638
> Project: ActiveMQ C++ Client
>  Issue Type: Improvement
>  Components: Transports
>Affects Versions: 3.9.4
>Reporter: Jeff Gullett
>Assignee: Timothy Bish
>Priority: Major
>
> Currently, compiling the OpenSSL-enabled versions of ActiveMQ-CPP with any 
> version of OpenSSL newer than 1.0.2 results in compile-time errors.  OpenSSL 
> is dropping support for 1.0.2 on 2019-12-31.  The next long-term support 
> version of OpenSSL, 1.1.1, has been released.  Please update ActiveMQ-CPP so 
> it can be built using OpenSSL 1.1.1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189681=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189681
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 20:36
Start Date: 24/Jan/19 20:36
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on issue #2519: 
ARTEMIS-2238 Fixing QueueQuery on every single send on topics
URL: https://github.com/apache/activemq-artemis/pull/2519#issuecomment-457346877
 
 
   Have left some comments
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189681)
Time Spent: 40m  (was: 0.5h)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189680=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189680
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 20:36
Start Date: 24/Jan/19 20:36
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2519: 
ARTEMIS-2238 Fixing QueueQuery on every single send on topics
URL: https://github.com/apache/activemq-artemis/pull/2519#discussion_r250767135
 
 

 ##
 File path: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
 ##
 @@ -423,16 +423,18 @@ private void doSendx(ActiveMQDestination destination,
  throw new InvalidDestinationException("Destination " + 
address + " does not exist");
   }
} else {
-  ClientSession.QueueQuery queueQuery = 
clientSession.queueQuery(address);
-  if (queueQuery.isExists()) {
- connection.addKnownDestination(address);
-  } else if (destination.isQueue() && 
query.isAutoCreateQueues()) {
- if (destination.isTemporary()) {
-session.createTemporaryQueue(destination, 
RoutingType.ANYCAST, address, null, query);
- } else {
-session.createQueue(destination, RoutingType.ANYCAST, 
address, null, true, true, query);
+  if (destination.isQueue()) {
 
 Review comment:
   should also be:
   
   query.isAutoCreateQueues()
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189680)
Time Spent: 0.5h  (was: 20m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751566#comment-16751566
 ] 

ASF subversion and git services commented on ARTEMIS-2238:
--

Commit de01dcfebde8bf33dc49142e10cfb9f55870d474 in activemq-artemis's branch 
refs/heads/2.6.x from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=de01dcf ]

ARTEMIS-2238 Fixing build after cherry-pick

the last cherry pick on 7a139a41e5b801051d3845b72dc610c79cb420c8 had a conflict
and the alignment and variable names were wrong.

This is fixing the issue and the build on 2.6.x


> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189670=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189670
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 20:18
Start Date: 24/Jan/19 20:18
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250761629
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I'd like to see a test case on this. I think the issue might be we have some 
ThreadFactories which are not using the ActiveMQThreadFactory which should imo 
ensure the privileged access if its used in replacement for those, and actually 
we just need to fix those up.  A test though is the best way for sure, so what 
ever fix, we know its resolved.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189670)
Time Spent: 2h 20m  (was: 2h 10m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMQCPP-643) Add an option to time out connection attempts when blocked in ensureConnectionInfoSent

2019-01-24 Thread Timothy Bish (JIRA)


 [ 
https://issues.apache.org/jira/browse/AMQCPP-643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish updated AMQCPP-643:

Fix Version/s: 3.9.5

> Add an option to time out connection attempts when blocked in 
> ensureConnectionInfoSent
> --
>
> Key: AMQCPP-643
> URL: https://issues.apache.org/jira/browse/AMQCPP-643
> Project: ActiveMQ C++ Client
>  Issue Type: New Feature
>  Components: Transports
>Affects Versions: 3.9.4
> Environment: HP-UX
> Fedora 27 / gcc
>Reporter: Roddie Kieley
>Assignee: Timothy Bish
>Priority: Major
> Fix For: 3.9.5
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> In some rare cases client side stack traces show that the client can be stuck 
> in ensureConnectionInfoSent waiting forever for a response from the broker.
> We will add an optional timeout to allow this operation to fail which 
> defaults to off via a default timeout of 0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189668=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189668
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 20:17
Start Date: 24/Jan/19 20:17
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250761629
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I'd like to see a test case on this. I think the issue might be we have some 
ThreadFactories which are not using the ActiveMQThreadFactory which should imo 
ensure the privileged access, and actually we just need to fix those up.  
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189668)
Time Spent: 2h  (was: 1h 50m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189669=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189669
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 20:17
Start Date: 24/Jan/19 20:17
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250761629
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   I'd like to see a test case on this. I think the issue might be we have some 
ThreadFactories which are not using the ActiveMQThreadFactory which should imo 
ensure the privileged access if its used in replacement for those, and actually 
we just need to fix those up.  
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189669)
Time Spent: 2h 10m  (was: 2h)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (AMQCPP-643) Add an option to time out connection attempts when blocked in ensureConnectionInfoSent

2019-01-24 Thread Timothy Bish (JIRA)


 [ 
https://issues.apache.org/jira/browse/AMQCPP-643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish resolved AMQCPP-643.
-
Resolution: Fixed

> Add an option to time out connection attempts when blocked in 
> ensureConnectionInfoSent
> --
>
> Key: AMQCPP-643
> URL: https://issues.apache.org/jira/browse/AMQCPP-643
> Project: ActiveMQ C++ Client
>  Issue Type: New Feature
>  Components: Transports
>Affects Versions: 3.9.4
> Environment: HP-UX
> Fedora 27 / gcc
>Reporter: Roddie Kieley
>Assignee: Timothy Bish
>Priority: Major
> Fix For: 3.9.5
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> In some rare cases client side stack traces show that the client can be stuck 
> in ensureConnectionInfoSent waiting forever for a response from the broker.
> We will add an optional timeout to allow this operation to fail which 
> defaults to off via a default timeout of 0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMQCPP-638) Add Support for OpenSSL 1.1.1

2019-01-24 Thread Timothy Bish (JIRA)


 [ 
https://issues.apache.org/jira/browse/AMQCPP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish updated AMQCPP-638:

Fix Version/s: (was: 3.9.5)

> Add Support for OpenSSL 1.1.1
> -
>
> Key: AMQCPP-638
> URL: https://issues.apache.org/jira/browse/AMQCPP-638
> Project: ActiveMQ C++ Client
>  Issue Type: Improvement
>  Components: Transports
>Affects Versions: 3.9.4
>Reporter: Jeff Gullett
>Assignee: Timothy Bish
>Priority: Major
>
> Currently, compiling the OpenSSL-enabled versions of ActiveMQ-CPP with any 
> version of OpenSSL newer than 1.0.2 results in compile-time errors.  OpenSSL 
> is dropping support for 1.0.2 on 2019-12-31.  The next long-term support 
> version of OpenSSL, 1.1.1, has been released.  Please update ActiveMQ-CPP so 
> it can be built using OpenSSL 1.1.1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMQCPP-643) Add an option to time out connection attempts when blocked in ensureConnectionInfoSent

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/AMQCPP-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751486#comment-16751486
 ] 

ASF subversion and git services commented on AMQCPP-643:


Commit c102bc0814be009764cbba90a07beb89884747eb in activemq-cpp's branch 
refs/heads/master from Roddie Kieley
[ https://gitbox.apache.org/repos/asf?p=activemq-cpp.git;h=c102bc0 ]

AMQCPP-643: Added connection.connectionResponseTimeout to CMS CPP client and 
updated testURIOptionsProcessing.


> Add an option to time out connection attempts when blocked in 
> ensureConnectionInfoSent
> --
>
> Key: AMQCPP-643
> URL: https://issues.apache.org/jira/browse/AMQCPP-643
> Project: ActiveMQ C++ Client
>  Issue Type: New Feature
>  Components: Transports
>Affects Versions: 3.9.4
> Environment: HP-UX
> Fedora 27 / gcc
>Reporter: Roddie Kieley
>Assignee: Timothy Bish
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In some rare cases client side stack traces show that the client can be stuck 
> in ensureConnectionInfoSent waiting forever for a response from the broker.
> We will add an optional timeout to allow this operation to fail which 
> defaults to off via a default timeout of 0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMQCPP-643) Add an option to time out connection attempts when blocked in ensureConnectionInfoSent

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/AMQCPP-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751487#comment-16751487
 ] 

ASF subversion and git services commented on AMQCPP-643:


Commit 4cbe41d606a84fd2f61716b9e59e287c76de8066 in activemq-cpp's branch 
refs/heads/3.9.x from Roddie Kieley
[ https://gitbox.apache.org/repos/asf?p=activemq-cpp.git;h=4cbe41d ]

AMQCPP-643: Added connection.connectionResponseTimeout to CMS CPP client and 
updated testURIOptionsProcessing.


> Add an option to time out connection attempts when blocked in 
> ensureConnectionInfoSent
> --
>
> Key: AMQCPP-643
> URL: https://issues.apache.org/jira/browse/AMQCPP-643
> Project: ActiveMQ C++ Client
>  Issue Type: New Feature
>  Components: Transports
>Affects Versions: 3.9.4
> Environment: HP-UX
> Fedora 27 / gcc
>Reporter: Roddie Kieley
>Assignee: Timothy Bish
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In some rare cases client side stack traces show that the client can be stuck 
> in ensureConnectionInfoSent waiting forever for a response from the broker.
> We will add an optional timeout to allow this operation to fail which 
> defaults to off via a default timeout of 0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (AMQCPP-643) Add an option to time out connection attempts when blocked in ensureConnectionInfoSent

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/AMQCPP-643?focusedWorklogId=189655=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189655
 ]

ASF GitHub Bot logged work on AMQCPP-643:
-

Author: ASF GitHub Bot
Created on: 24/Jan/19 19:57
Start Date: 24/Jan/19 19:57
Worklog Time Spent: 10m 
  Work Description: asfgit commented on pull request #17: AMQCPP-643: Add 
an option to time out connection attempts when blocked in 
ensureConnectionInfoSent
URL: https://github.com/apache/activemq-cpp/pull/17
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189655)
Time Spent: 20m  (was: 10m)

> Add an option to time out connection attempts when blocked in 
> ensureConnectionInfoSent
> --
>
> Key: AMQCPP-643
> URL: https://issues.apache.org/jira/browse/AMQCPP-643
> Project: ActiveMQ C++ Client
>  Issue Type: New Feature
>  Components: Transports
>Affects Versions: 3.9.4
> Environment: HP-UX
> Fedora 27 / gcc
>Reporter: Roddie Kieley
>Assignee: Timothy Bish
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> In some rare cases client side stack traces show that the client can be stuck 
> in ensureConnectionInfoSent waiting forever for a response from the broker.
> We will add an optional timeout to allow this operation to fail which 
> defaults to off via a default timeout of 0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751468#comment-16751468
 ] 

ASF subversion and git services commented on ARTEMIS-2238:
--

Commit 90a66266b67cc1c0ee964d33b5ac3608cda921e8 in activemq-artemis's branch 
refs/heads/master from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=90a6626 ]

ARTEMIS-2238 Fixing QueueQuery on every single send on topics


> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751469#comment-16751469
 ] 

ASF subversion and git services commented on ARTEMIS-2238:
--

Commit 7a139a41e5b801051d3845b72dc610c79cb420c8 in activemq-artemis's branch 
refs/heads/2.6.x from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=7a139a4 ]

ARTEMIS-2238 Fixing QueueQuery on every single send on topics

(cherry picked from commit 90a66266b67cc1c0ee964d33b5ac3608cda921e8)


> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189641=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189641
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 19:35
Start Date: 24/Jan/19 19:35
Worklog Time Spent: 10m 
  Work Description: asfgit commented on pull request #2519: ARTEMIS-2238 
Fixing QueueQuery on every single send on topics
URL: https://github.com/apache/activemq-artemis/pull/2519
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189641)
Time Spent: 20m  (was: 10m)

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARTEMIS-2192) LegacyLDAPSecuritySettingPlugin uses hard-coded RDN types

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751465#comment-16751465
 ] 

ASF subversion and git services commented on ARTEMIS-2192:
--

Commit 693ea722f59cfd650d3ae418b1d60cd4552e2180 in activemq-artemis's branch 
refs/heads/master from Justin Graham Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=693ea72 ]

ARTEMIS-2192 fix listener for LegacyLDAPSecuritySettingPlugin


> LegacyLDAPSecuritySettingPlugin uses hard-coded RDN types
> -
>
> Key: ARTEMIS-2192
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2192
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
>Reporter: Justin Bertram
>Assignee: Justin Bertram
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189616=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189616
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 18:48
Start Date: 24/Jan/19 18:48
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250732153
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
 ##
 @@ -157,7 +157,12 @@ public NetworkHealthCheck parseURIList(String 
addressList) {
 
@Override
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory("NetworkChecker", "Network-Checker-", 
false, getThisClassLoader());
 
 Review comment:
   This is just creating a ThreadFactory.. is it really needed?
   
   I would expect a security check around new Threads, but against a new 
ActiveMQThreadFactory? 
   
   are you sure about it? just checking it's not a typo?
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189616)
Time Spent: 1h 50m  (was: 1h 40m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?focusedWorklogId=189615=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189615
 ]

ASF GitHub Bot logged work on ARTEMIS-2238:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 18:39
Start Date: 24/Jan/19 18:39
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #2519: 
ARTEMIS-2238 Fixing QueueQuery on every single send on topics
URL: https://github.com/apache/activemq-artemis/pull/2519
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189615)
Time Spent: 10m
Remaining Estimate: 0h

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189584=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189584
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:46
Start Date: 24/Jan/19 17:46
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on issue #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#issuecomment-457290572
 
 
   This really needs a test case
   
   A) validate the fix (and validate any alternative proposals)
   B) ensure no regression 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189584)
Time Spent: 1h 40m  (was: 1.5h)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189582=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189582
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:44
Start Date: 24/Jan/19 17:44
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on issue #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#issuecomment-457289566
 
 
   This **really** needs a test case, to a) validate the fix, and b) ensure no 
regression.
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189582)
Time Spent: 1.5h  (was: 1h 20m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189581=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189581
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:43
Start Date: 24/Jan/19 17:43
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on issue #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#issuecomment-457289566
 
 
   This **really** needs a test case, to a) validate the fix, and b) ensure no 
regression.
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189581)
Time Spent: 1h 20m  (was: 1h 10m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189568=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189568
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:19
Start Date: 24/Jan/19 17:19
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250700525
 
 

 ##
 File path: 
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DBOption.java
 ##
 @@ -223,13 +225,17 @@ protected void initializeJournal(Configuration 
configuration) throws Exception {
   this.config = configuration;
   executor = Executors.newFixedThreadPool(5, 
ActiveMQThreadFactory.defaultThreadFactory());
   executorFactory = new OrderedExecutorFactory(executor);
-
-  scheduledExecutorService = new 
ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), new 
ThreadFactory() {
+  scheduledExecutorService = new 
ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), 
AccessController.doPrivileged(new PrivilegedAction() {
  @Override
- public Thread newThread(Runnable r) {
-return new Thread(r);
+ public ThreadFactory run() {
 
 Review comment:
   I know this inst your change, but it highlights a bigger question, as to why 
is this not using ActiveMQThreadFactory?
   
   As this creates threads with the captured context.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189568)
Time Spent: 0.5h  (was: 20m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189573=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189573
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:22
Start Date: 24/Jan/19 17:22
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250701848
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
 ##
 @@ -153,7 +153,12 @@ public synchronized void start() {
}
 
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory(this.getClass().getSimpleName() + 
"-scheduled-threads", false, getThisClassLoader());
+  return AccessController.doPrivileged(new 
PrivilegedAction() {
+ @Override
+ public ActiveMQThreadFactory run() {
+return new ActiveMQThreadFactory(this.getClass().getSimpleName() + 
"-scheduled-threads", false, getThisClassLoader());
 
 Review comment:
   Threads created by ActiveMQThreadFactory should be already created by 
doPrivileged. how are we sure its not just that the thread issues you are 
seeing are maybe just where code isn't using ActiveMQThreadFactory
   
   see in ActiveMQThreadFactory
   
   ```
  @Override
  public Thread newThread(final Runnable command) {
 // create a thread in a privileged block if running with Security 
Manager
 if (acc != null) {
return AccessController.doPrivileged(new 
ThreadCreateAction(command), acc);
 } else {
return createThread(command);
 }
  }
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189573)
Time Spent: 1h 10m  (was: 1h)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189572=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189572
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:21
Start Date: 24/Jan/19 17:21
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250701848
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
 ##
 @@ -153,7 +153,12 @@ public synchronized void start() {
}
 
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory(this.getClass().getSimpleName() + 
"-scheduled-threads", false, getThisClassLoader());
+  return AccessController.doPrivileged(new 
PrivilegedAction() {
+ @Override
+ public ActiveMQThreadFactory run() {
+return new ActiveMQThreadFactory(this.getClass().getSimpleName() + 
"-scheduled-threads", false, getThisClassLoader());
 
 Review comment:
   Threads created by ActiveMQThreadFactory should be already created by 
doPrivileged. how are we sure its not just that the thread issues you are 
seeing are maybe just where code isn't using ActiveMQThreadFactory
   
   see
   
   ```
  @Override
  public Thread newThread(final Runnable command) {
 // create a thread in a privileged block if running with Security 
Manager
 if (acc != null) {
return AccessController.doPrivileged(new 
ThreadCreateAction(command), acc);
 } else {
return createThread(command);
 }
  }
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189572)
Time Spent: 1h  (was: 50m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189570=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189570
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:21
Start Date: 24/Jan/19 17:21
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250701848
 
 

 ##
 File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
 ##
 @@ -153,7 +153,12 @@ public synchronized void start() {
}
 
protected ActiveMQThreadFactory getThreadFactory() {
-  return new ActiveMQThreadFactory(this.getClass().getSimpleName() + 
"-scheduled-threads", false, getThisClassLoader());
+  return AccessController.doPrivileged(new 
PrivilegedAction() {
+ @Override
+ public ActiveMQThreadFactory run() {
+return new ActiveMQThreadFactory(this.getClass().getSimpleName() + 
"-scheduled-threads", false, getThisClassLoader());
 
 Review comment:
   Threads created by ActiveMQThreadFactory should be already created by 
doPrivileged. how are we sure its not just that the thread issues you are 
seeing are maybe just where code isn't using ActiveMQThreadFactory
   
   see
   
  @Override
  public Thread newThread(final Runnable command) {
 // create a thread in a privileged block if running with Security 
Manager
 if (acc != null) {
return AccessController.doPrivileged(new 
ThreadCreateAction(command), acc);
 } else {
return createThread(command);
 }
  }
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189570)
Time Spent: 40m  (was: 0.5h)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189571=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189571
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:21
Start Date: 24/Jan/19 17:21
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250702023
 
 

 ##
 File path: 
artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
 ##
 @@ -1598,25 +1598,30 @@ private static void copyProperties(final Message msg) 
throws JMSException {
 * and 1 for the eventual failureHandler)
 */
private ExecutorService createExecutor() {
-  ExecutorService service = Executors.newFixedThreadPool(3, new 
ThreadFactory() {
-
- ThreadGroup group = new ThreadGroup("JMSBridgeImpl");
-
+  ExecutorService service = Executors.newFixedThreadPool(3, 
AccessController.doPrivileged(new PrivilegedAction() {
  @Override
- public Thread newThread(Runnable r) {
-final Thread thr = new Thread(group, r);
-if (moduleTccl != null) {
-   AccessController.doPrivileged(new PrivilegedAction() {
-  @Override
-  public Object run() {
- thr.setContextClassLoader(moduleTccl);
- return null;
+ public ThreadFactory run() {
+return new ThreadFactory() {
 
 Review comment:
   I know this inst your change, but it highlights a bigger question, as to why 
is this not using ActiveMQThreadFactory?
   
   As this creates threads with the captured context.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189571)
Time Spent: 50m  (was: 40m)

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread clebert suconic (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-2238:
-
Affects Version/s: 2.6.4

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread clebert suconic (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-2238:
-
Fix Version/s: 2.6.5
   2.7.0

> JMS Producer queueQuery does not work when addressName != queueName
> ---
>
> Key: ARTEMIS-2238
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.4
> Environment: this is a regression created at 
> f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
>Reporter: clebert suconic
>Priority: Major
> Fix For: 2.7.0, 2.6.5
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?focusedWorklogId=189562=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189562
 ]

ASF GitHub Bot logged work on ARTEMIS-2171:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 17:08
Start Date: 24/Jan/19 17:08
Worklog Time Spent: 10m 
  Work Description: ehsavoie commented on pull request #2517: 
[ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged 
block.
URL: https://github.com/apache/activemq-artemis/pull/2517
 
 
   * Ensuring that all threadPoolFactories are created under a privileged
   block so the threads created are under the same AccessControlContext.
   
   Jira: https://issues.apache.org/jira/browse/ARTEMIS-2171
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189562)
Time Spent: 10m
Remaining Estimate: 0h

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ARTEMIS-2238) JMS Producer queueQuery does not work when addressName != queueName

2019-01-24 Thread clebert suconic (JIRA)
clebert suconic created ARTEMIS-2238:


 Summary: JMS Producer queueQuery does not work when addressName != 
queueName
 Key: ARTEMIS-2238
 URL: https://issues.apache.org/jira/browse/ARTEMIS-2238
 Project: ActiveMQ Artemis
  Issue Type: Bug
 Environment: this is a regression created at 
f3ace6afd726dc8e3c1c58c76e3fad3d5cfa357d
Reporter: clebert suconic






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMQ-7125) AMQ broker does not send the error frame back to the websocket client when an empty destination is sent with a stomp subscribe frame

2019-01-24 Thread Avinash Dongre (JIRA)


[ 
https://issues.apache.org/jira/browse/AMQ-7125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751287#comment-16751287
 ] 

Avinash Dongre commented on AMQ-7125:
-

Hi, [~gtully] I initially wrote the same code as your commit (Just throwing the 
protocolException on empty destination). Although it does

send the error frame back to the client, it does not close the connection. But 
the specification says that the connection should be closed.

https://stomp.github.io/stomp-specification-1.2.html#SUBSCRIBE

> AMQ broker does not send the error frame back to the websocket client when an 
> empty destination is sent with a stomp subscribe frame
> 
>
> Key: AMQ-7125
> URL: https://issues.apache.org/jira/browse/AMQ-7125
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: stomp
>Affects Versions: 5.15.8
>Reporter: Avinash Dongre
>Assignee: Gary Tully
>Priority: Major
> Fix For: 5.16.0
>
>
> AMQ broker does not send the error frame back to the WebSocket client when an 
> empty destination is sent with a stomp subscribe frame. Only the connection 
> is terminated. 
> As per stomp specification:
> "If the server cannot successfully create the subscription, the server MUST 
> send the client an ERROR frame and disconnect the client."
> [https://stomp.github.io/stomp-specification-1.1.html#SUBSCRIBE]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMQNET-572) Failover crashes when AMQ Server enforces TLS 1.2

2019-01-24 Thread Dawid (JIRA)


 [ 
https://issues.apache.org/jira/browse/AMQNET-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dawid updated AMQNET-572:
-
Attachment: failoverSslContext.patch

> Failover crashes when AMQ Server enforces TLS 1.2
> -
>
> Key: AMQNET-572
> URL: https://issues.apache.org/jira/browse/AMQNET-572
> Project: ActiveMQ .Net
>  Issue Type: Bug
>Reporter: Dan Taflin
>Priority: Critical
> Attachments: Archivos-1.zip, failoverSslContext.patch
>
>
> When using the FailoverTransport with underlying SslTransports, and 
> specifying Tls12 as the SslProtocol, the initial connection to the ActiveMQ 
> server succeeds in establishing a TLS v1.2 session. But upon failover, when 
> it tries to reconnect, the Tls12 specification is lost and the NMS client 
> reverts to the default, which appears to be TLS 1.0.
> The consequence is that it is impossible to enforce TLS 1.2 on the server, 
> because although the initial connection would succeed, subsequent ones crash 
> the client.
> Here's a sample failover transport URL:
> {{failover:(ssl://server1.example.com:61616?transport.sslProtocol=Tls12,ssl://server2.example.com:61616?transport.sslProtocol=Tls12)}}
> I've traced the issue to the FailoverTransport.DoConnect() method, which, 
> when obtaining the ConnectList in order to obtain a url to connect to, 
> obtains a url without a querystring. So in the above example, 
> transport.sslProtocol=Tls12 is gone. The source of this truncated url is the 
> ConnectionControl command marshalled from the server.
> The solution would seem to be to create an SslContext class to keep track of 
> the sslProtocol, similar to how the java version works. I have built a 
> working prototype for us to use locally and would be willing to make it 
> available.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARTEMIS-2171) ThreadPoolExecutor leak under SM due to lack of privileged block

2019-01-24 Thread Emmanuel Hugonnet (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751207#comment-16751207
 ] 

Emmanuel Hugonnet commented on ARTEMIS-2171:


Adding Priviledged blocks around ThreadFactories is sufficient since the 
AccessControlContext is captured during Thread creation.

> ThreadPoolExecutor leak under SM due to lack of privileged block
> 
>
> Key: ARTEMIS-2171
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2171
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 2.6.3
>Reporter: Miroslav Novak
>Priority: Major
>
> Description cloned from https://issues.jboss.org/browse/WFLY-10380:
> Still researching the source of these leaks.
> The way the leak happens is, a java.util.concurrent.ThreadPoolExecutor is 
> constructed from an unprivileged context. The pool starts up and threads are 
> created without a problem, however, the thread pool is never shut down. The 
> finalizer runs but since it tries to shut down the pool with an access 
> control context that was captured during construction, it fails because the 
> context did not have the modifyThread RuntimePermission, and the thread pool 
> never shuts down.
> We need to identify the points where TPEs are being constructed without 
> controlled privileges.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMQNET-572) Failover crashes when AMQ Server enforces TLS 1.2

2019-01-24 Thread Dawid (JIRA)


[ 
https://issues.apache.org/jira/browse/AMQNET-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751173#comment-16751173
 ] 

Dawid commented on AMQNET-572:
--

I cannot find AMQNET-581. Was it merged?

> Failover crashes when AMQ Server enforces TLS 1.2
> -
>
> Key: AMQNET-572
> URL: https://issues.apache.org/jira/browse/AMQNET-572
> Project: ActiveMQ .Net
>  Issue Type: Bug
>Reporter: Dan Taflin
>Priority: Critical
> Attachments: Archivos-1.zip
>
>
> When using the FailoverTransport with underlying SslTransports, and 
> specifying Tls12 as the SslProtocol, the initial connection to the ActiveMQ 
> server succeeds in establishing a TLS v1.2 session. But upon failover, when 
> it tries to reconnect, the Tls12 specification is lost and the NMS client 
> reverts to the default, which appears to be TLS 1.0.
> The consequence is that it is impossible to enforce TLS 1.2 on the server, 
> because although the initial connection would succeed, subsequent ones crash 
> the client.
> Here's a sample failover transport URL:
> {{failover:(ssl://server1.example.com:61616?transport.sslProtocol=Tls12,ssl://server2.example.com:61616?transport.sslProtocol=Tls12)}}
> I've traced the issue to the FailoverTransport.DoConnect() method, which, 
> when obtaining the ConnectList in order to obtain a url to connect to, 
> obtains a url without a querystring. So in the above example, 
> transport.sslProtocol=Tls12 is gone. The source of this truncated url is the 
> ConnectionControl command marshalled from the server.
> The solution would seem to be to create an SslContext class to keep track of 
> the sslProtocol, similar to how the java version works. I have built a 
> working prototype for us to use locally and would be willing to make it 
> available.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (ARTEMIS-2069) Backup doesn't activate after shared store is reconnected

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2069?focusedWorklogId=189468=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189468
 ]

ASF GitHub Bot logged work on ARTEMIS-2069:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 13:33
Start Date: 24/Jan/19 13:33
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2287: 
ARTEMIS-2069 Backup doesn't activate after shared store is reconnected
URL: https://github.com/apache/activemq-artemis/pull/2287#discussion_r250605719
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
 ##
 @@ -299,44 +301,52 @@ protected FileLock tryLock(final long lockPos) throws 
IOException {
 
protected FileLock lock(final long lockPosition) throws Exception {
   long start = System.currentTimeMillis();
+  boolean isRecurringFailure = false;
 
   while (!interrupted) {
- FileLock lock = tryLock(lockPosition);
-
- if (lock == null) {
-try {
-   Thread.sleep(500);
-} catch (InterruptedException e) {
-   return null;
+ try {
+FileLock lock = tryLock(lockPosition);
+isRecurringFailure = false;
+
+if (lock == null) {
+   try {
+  Thread.sleep(500);
+   } catch (InterruptedException e) {
+  return null;
+   }
+
+   if (lockAcquisitionTimeout != -1 && (System.currentTimeMillis() 
- start) > lockAcquisitionTimeout) {
+  throw new Exception("timed out waiting for lock");
 
 Review comment:
   Little bit too generic, this exception, should throw something more specific.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189468)
Time Spent: 50m  (was: 40m)

> Backup doesn't activate after shared store is reconnected
> -
>
> Key: ARTEMIS-2069
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2069
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.2
>Reporter: Tomas Hofman
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> *Scenario*
>  # Start live backup server pair in dedicated topology with shared store HA, 
> with journal located on NFS
>  # NFS mounted on backup server fails
>  # Reconnect NFS on backup server
>  # Try to shut down live EAP server
>  # Backup doesn't activate
> *What happens*
>  Backup is waiting for live to fail by checking its file lock. In case the 
> connection to shared storage fails, backup logs following error.
>  
> |{color:#00}05:50:57,896 ERROR [org.apache.activemq.artemis.core.server] 
> (AMQ119000: Activation for server 
> ActiveMQServerImpl::serverUUID=836c9b1e-f067-11e7-8763-001b21862475) 
> AMQ224000: Failure in initialisation: java.io.IOException: Input/output 
> error{color}|
> |{color:#00} at sun.nio.ch.FileDispatcherImpl.lock0(Native Method) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1115) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.tryLock(FileLockNodeManager.java:299)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.lock(FileLockNodeManager.java:316)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.awaitLiveNode(FileLockNodeManager.java:127)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.SharedStoreBackupActivation.run(SharedStoreBackupActivation.java:77)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$ActivationThread.run(ActiveMQServerImpl.java:2496)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> | |
>  
> Exception is caught in {{SharedStoreBackupActivation.run}}, and causes 
> termination of backup activation process.
> In case the NFS is reconnected later, backup server 

[jira] [Work logged] (ARTEMIS-2069) Backup doesn't activate after shared store is reconnected

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2069?focusedWorklogId=189464=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189464
 ]

ASF GitHub Bot logged work on ARTEMIS-2069:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 13:28
Start Date: 24/Jan/19 13:28
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2287: 
ARTEMIS-2069 Backup doesn't activate after shared store is reconnected
URL: https://github.com/apache/activemq-artemis/pull/2287#discussion_r250604071
 
 

 ##
 File path: 
tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/FileLockNodeManagerTest.java
 ##
 @@ -0,0 +1,75 @@
+package org.apache.activemq.artemis.tests.extras.byteman;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.activemq.artemis.core.server.impl.FileLockNodeManager;
+import org.jboss.byteman.contrib.bmunit.BMRule;
+import org.jboss.byteman.contrib.bmunit.BMRules;
+import org.jboss.byteman.contrib.bmunit.BMUnitRunner;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(BMUnitRunner.class)
+public class FileLockNodeManagerTest {
+
+private static final int TIMEOUT_TOLERANCE = 50;
+
+private File sharedDir;
+
+public FileLockNodeManagerTest() throws IOException {
+sharedDir = File.createTempFile("shared-dir", "");
+sharedDir.delete();
+Assert.assertTrue(sharedDir.mkdir());
+
+}
+
+@Test
+@BMRules(
+rules = {@BMRule(
+name = "throw IOException during activation",
+targetClass = 
"org.apache.activemq.artemis.core.server.impl.FileLockNodeManager",
+targetMethod = "tryLock",
+targetLocation = "AT ENTRY",
+action = "THROW new IOException(\"IO Error\");")
+})
+public void test() throws Exception {
+measureLockAcquisisionTimeout(100); // warm-up
+
+assertMeasuredTimeoutFor(100);
+assertMeasuredTimeoutFor(120);
+assertMeasuredTimeoutFor(200);
+//assertMeasuredTimeoutFor(1000);
 
 Review comment:
   commented code, either un-comment or remove.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189464)
Time Spent: 0.5h  (was: 20m)

> Backup doesn't activate after shared store is reconnected
> -
>
> Key: ARTEMIS-2069
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2069
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.2
>Reporter: Tomas Hofman
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> *Scenario*
>  # Start live backup server pair in dedicated topology with shared store HA, 
> with journal located on NFS
>  # NFS mounted on backup server fails
>  # Reconnect NFS on backup server
>  # Try to shut down live EAP server
>  # Backup doesn't activate
> *What happens*
>  Backup is waiting for live to fail by checking its file lock. In case the 
> connection to shared storage fails, backup logs following error.
>  
> |{color:#00}05:50:57,896 ERROR [org.apache.activemq.artemis.core.server] 
> (AMQ119000: Activation for server 
> ActiveMQServerImpl::serverUUID=836c9b1e-f067-11e7-8763-001b21862475) 
> AMQ224000: Failure in initialisation: java.io.IOException: Input/output 
> error{color}|
> |{color:#00} at sun.nio.ch.FileDispatcherImpl.lock0(Native Method) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1115) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.tryLock(FileLockNodeManager.java:299)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.lock(FileLockNodeManager.java:316)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.awaitLiveNode(FileLockNodeManager.java:127)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> 

[jira] [Work logged] (ARTEMIS-2069) Backup doesn't activate after shared store is reconnected

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2069?focusedWorklogId=189469=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189469
 ]

ASF GitHub Bot logged work on ARTEMIS-2069:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 13:33
Start Date: 24/Jan/19 13:33
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2287: 
ARTEMIS-2069 Backup doesn't activate after shared store is reconnected
URL: https://github.com/apache/activemq-artemis/pull/2287#discussion_r250605929
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
 ##
 @@ -299,44 +301,52 @@ protected FileLock tryLock(final long lockPos) throws 
IOException {
 
protected FileLock lock(final long lockPosition) throws Exception {
   long start = System.currentTimeMillis();
+  boolean isRecurringFailure = false;
 
   while (!interrupted) {
- FileLock lock = tryLock(lockPosition);
-
- if (lock == null) {
-try {
-   Thread.sleep(500);
-} catch (InterruptedException e) {
-   return null;
+ try {
+FileLock lock = tryLock(lockPosition);
+isRecurringFailure = false;
+
+if (lock == null) {
+   try {
+  Thread.sleep(500);
+   } catch (InterruptedException e) {
+  return null;
+   }
+
+   if (lockAcquisitionTimeout != -1 && (System.currentTimeMillis() 
- start) > lockAcquisitionTimeout) {
+  throw new Exception("timed out waiting for lock");
+   }
+} else {
+   return lock;
 }
-
-if (lockAcquisitionTimeout != -1 && (System.currentTimeMillis() - 
start) > lockAcquisitionTimeout) {
-   throw new Exception("timed out waiting for lock");
+ } catch (IOException e) {
+// IOException during trylock() may be a temporary issue, e.g. NFS 
volume not being accessible
+
+logger.log(isRecurringFailure ? Logger.Level.DEBUG : 
Logger.Level.WARN,
+"Failure when accessing a lock file", e);
+isRecurringFailure = true;
+
+long waitTime = LOCK_ACCESS_FAILURE_WAIT_TIME;
+if (lockAcquisitionTimeout != -1) {
+   final long remainingTime = lockAcquisitionTimeout - 
(System.currentTimeMillis() - start);
+   if (remainingTime <= 0) {
+  throw new Exception("timed out waiting for lock");
 
 Review comment:
   Little bit too generic, this exception, should throw something more specific.
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189469)
Time Spent: 1h  (was: 50m)

> Backup doesn't activate after shared store is reconnected
> -
>
> Key: ARTEMIS-2069
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2069
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.2
>Reporter: Tomas Hofman
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> *Scenario*
>  # Start live backup server pair in dedicated topology with shared store HA, 
> with journal located on NFS
>  # NFS mounted on backup server fails
>  # Reconnect NFS on backup server
>  # Try to shut down live EAP server
>  # Backup doesn't activate
> *What happens*
>  Backup is waiting for live to fail by checking its file lock. In case the 
> connection to shared storage fails, backup logs following error.
>  
> |{color:#00}05:50:57,896 ERROR [org.apache.activemq.artemis.core.server] 
> (AMQ119000: Activation for server 
> ActiveMQServerImpl::serverUUID=836c9b1e-f067-11e7-8763-001b21862475) 
> AMQ224000: Failure in initialisation: java.io.IOException: Input/output 
> error{color}|
> |{color:#00} at sun.nio.ch.FileDispatcherImpl.lock0(Native Method) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1115) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.tryLock(FileLockNodeManager.java:299)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> 

[jira] [Work logged] (ARTEMIS-2069) Backup doesn't activate after shared store is reconnected

2019-01-24 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2069?focusedWorklogId=189467=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189467
 ]

ASF GitHub Bot logged work on ARTEMIS-2069:
---

Author: ASF GitHub Bot
Created on: 24/Jan/19 13:33
Start Date: 24/Jan/19 13:33
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #2287: 
ARTEMIS-2069 Backup doesn't activate after shared store is reconnected
URL: https://github.com/apache/activemq-artemis/pull/2287#discussion_r250605719
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
 ##
 @@ -299,44 +301,52 @@ protected FileLock tryLock(final long lockPos) throws 
IOException {
 
protected FileLock lock(final long lockPosition) throws Exception {
   long start = System.currentTimeMillis();
+  boolean isRecurringFailure = false;
 
   while (!interrupted) {
- FileLock lock = tryLock(lockPosition);
-
- if (lock == null) {
-try {
-   Thread.sleep(500);
-} catch (InterruptedException e) {
-   return null;
+ try {
+FileLock lock = tryLock(lockPosition);
+isRecurringFailure = false;
+
+if (lock == null) {
+   try {
+  Thread.sleep(500);
+   } catch (InterruptedException e) {
+  return null;
+   }
+
+   if (lockAcquisitionTimeout != -1 && (System.currentTimeMillis() 
- start) > lockAcquisitionTimeout) {
+  throw new Exception("timed out waiting for lock");
 
 Review comment:
   Little bit too generic, this exception
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 189467)
Time Spent: 40m  (was: 0.5h)

> Backup doesn't activate after shared store is reconnected
> -
>
> Key: ARTEMIS-2069
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2069
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.6.2
>Reporter: Tomas Hofman
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> *Scenario*
>  # Start live backup server pair in dedicated topology with shared store HA, 
> with journal located on NFS
>  # NFS mounted on backup server fails
>  # Reconnect NFS on backup server
>  # Try to shut down live EAP server
>  # Backup doesn't activate
> *What happens*
>  Backup is waiting for live to fail by checking its file lock. In case the 
> connection to shared storage fails, backup logs following error.
>  
> |{color:#00}05:50:57,896 ERROR [org.apache.activemq.artemis.core.server] 
> (AMQ119000: Activation for server 
> ActiveMQServerImpl::serverUUID=836c9b1e-f067-11e7-8763-001b21862475) 
> AMQ224000: Failure in initialisation: java.io.IOException: Input/output 
> error{color}|
> |{color:#00} at sun.nio.ch.FileDispatcherImpl.lock0(Native Method) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1115) 
> [rt.jar:1.8.0_151]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.tryLock(FileLockNodeManager.java:299)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.lock(FileLockNodeManager.java:316)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.awaitLiveNode(FileLockNodeManager.java:127)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.SharedStoreBackupActivation.run(SharedStoreBackupActivation.java:77)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> |{color:#00} at 
> org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$ActivationThread.run(ActiveMQServerImpl.java:2496)
>  [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1]{color}|
> | |
>  
> Exception is caught in {{SharedStoreBackupActivation.run}}, and causes 
> termination of backup activation process.
> In case the NFS is reconnected later, backup server doesn't continue in 
> activation process 

[jira] [Created] (AMQ-7140) Misleading documentation about ActiveMQ-Spring configuration

2019-01-24 Thread Mauro Molinari (JIRA)
Mauro Molinari created AMQ-7140:
---

 Summary: Misleading documentation about ActiveMQ-Spring 
configuration
 Key: AMQ-7140
 URL: https://issues.apache.org/jira/browse/AMQ-7140
 Project: ActiveMQ
  Issue Type: Bug
  Components: Documentation
 Environment: Tomcat 8, ActiveMQ 5.11.0 or 5.14.5, Spring Framework 
4.3, Java 7.
Reporter: Mauro Molinari


While investigating about a memory leak I have in production (about which I 
wrote both at 
[https://stackoverflow.com/questions/54143172/configuring-activemq-properly-to-avoid-producer-memory-leaks]
 and 
[http://activemq.2283324.n4.nabble.com/Help-with-memory-leak-td4746710.html|http://activemq.2283324.n4.nabble.com/Help-with-memory-leak-td4746710.html,],
 with no reply at all), which I hope is related to AMQ-6603 (please advise!), I 
discovered that, as stated by Christopher L. Shannon on that issue, it's not 
advisable to use a pooling/caching connection factory with a Spring message 
container. Reading Spring {{DefaultMessageListenerContainer}} Javadoc confirms 
this. However, ActiveMQ documentation says exactly the opposite at 
[http://activemq.apache.org/spring-support.html:]
{quote}Spring's 
[MessagListenerContainer|http://static.springsource.org/spring/docs/2.5.x/reference/jms.html#jms-mdp]
 should be used for message consumption. This provides all the power of MDBs - 
efficient JMS consumption and pooling of the message listeners - but without 
requiring a full EJB container.

*You can use the {{activemq-pool}} 
{{org.apache.activemq.pool.PooledConnectionFactory}} for efficient pooling of 
the connections and sessions for your collection of consumers, or you can use 
the Spring JMS {{org.springframework.jms.connection.CachingConnectionFactory}} 
to achieve the same effect.*
{quote}
This indeed drove me to the wrong direction.

So, I think ActiveMQ documentation should be clear about it, if 
{{org.apache.activemq.pool.PooledConnectionFactory}} and 
{{org.springframework.jms.connection.CachingConnectionFactory}} should be used 
only when writing message producers and/or when dealing with {{JmsTemplate}}, 

Please also note that Spring Integration JMS message-driven inbound channel 
adapter is impacted as well, because it uses a 
{{DefaultMessageListenerContainer}} by default, unless otherwise configured.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARTEMIS-2170) Optimized CoreMessage's checkProperties and cleanupInternalProperties methods

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16750864#comment-16750864
 ] 

ASF subversion and git services commented on ARTEMIS-2170:
--

Commit 6446d01a151a6e73b359c356b44fcf447961bd5a in activemq-artemis's branch 
refs/heads/master from Francesco Nigro
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=6446d01 ]

ARTEMIS-2170 Optimized CoreMessage check and cleanup methods

Any checkProperties(); pattern has been
replaced by an atomic checkProperties().
to help both performance and consistency.
The cleanup is now performed into CoreTypedProperties both
for performance reasons (avoid lock/unlock many times)
and consistency, given that the operation is now atomic.


> Optimized CoreMessage's checkProperties and cleanupInternalProperties methods
> -
>
> Key: ARTEMIS-2170
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2170
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: Broker
>Reporter: Francesco Nigro
>Assignee: Francesco Nigro
>Priority: Minor
>  Time Spent: 6h 50m
>  Remaining Estimate: 0h
>
> CoreMessage::checkProperties perform too many volatile read/write and has a 
> too big body just to handle exceptional cases, while 
> cleanupInternalProperties is called on the hot path of session send, but is 
> performing too many synchronized operations and loopup on TypedProperties.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


  1   2   >