This is an automated email from the ASF dual-hosted git repository.

brusdev pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new d5ecfa26df ARTEMIS-4093 Changes to expose properties and support 
resource adapter in J2EE environments: fixing logging concatenation
d5ecfa26df is described below

commit d5ecfa26dfa6abb63b3670e89d1d31fb58b432a6
Author: hawkdshrh <[email protected]>
AuthorDate: Sat Nov 19 12:23:50 2022 -0500

    ARTEMIS-4093 Changes to expose properties and support resource adapter in 
J2EE environments: fixing logging concatenation
---
 .../artemis/jms/client/ActiveMQDestination.java    | 12 ++++++++
 .../artemis/ra/ActiveMQResourceAdapter.java        |  4 +++
 .../artemis/ra/inflow/ActiveMQActivation.java      |  6 ++++
 .../artemis/ra/inflow/ActiveMQActivationSpec.java  | 34 ++++++++++++++++++++++
 4 files changed, 56 insertions(+)

diff --git 
a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
 
b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
index a1a04daf92..ec9a2b8e39 100644
--- 
a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
+++ 
b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
@@ -389,6 +389,10 @@ public class ActiveMQDestination extends JNDIStorable 
implements Destination, Se
       }
    }
 
+   public void setSimpleAddress(String address) {
+      setSimpleAddress(new SimpleString(address));
+   }
+
    public void delete() throws JMSException {
       if (session != null) {
          boolean openedHere = false;
@@ -451,6 +455,10 @@ public class ActiveMQDestination extends JNDIStorable 
implements Destination, Se
       return temporary;
    }
 
+   public boolean getCreated() {
+      return created;
+   }
+
    public boolean isCreated() {
       return created;
    }
@@ -459,6 +467,10 @@ public class ActiveMQDestination extends JNDIStorable 
implements Destination, Se
       this.created = created;
    }
 
+   public void setCreated(String created) {
+      this.created = Boolean.parseBoolean(created);
+   }
+
    public TYPE getType() {
       if (thetype == null) {
          if (temporary) {
diff --git 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
index 75ff1cf61f..828a9be92a 100644
--- 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
+++ 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
@@ -821,6 +821,10 @@ public class ActiveMQResourceAdapter implements 
ResourceAdapter, Serializable {
       raProperties.setUseTopologyForLoadBalancing(useTopologyForLoadBalancing);
    }
 
+   public Boolean getUseTopologyForLoadBalancing() {
+      return raProperties.isUseTopologyForLoadBalancing();
+   }
+
    public Boolean isUseTopologyForLoadBalancing() {
       return raProperties.isUseTopologyForLoadBalancing();
    }
diff --git 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
index e9b67cd2da..3606abaa56 100644
--- 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
+++ 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
@@ -793,6 +793,9 @@ public class ActiveMQActivation {
 
       @Override
       public void nodeUP(TopologyMember member, boolean last) {
+         if (logger.isTraceEnabled()) {
+            logger.trace("nodeUp: {}", member.toURI());
+         }
          boolean newNode = false;
 
          String id = member.getNodeId();
@@ -813,6 +816,9 @@ public class ActiveMQActivation {
 
       @Override
       public void nodeDown(long eventUID, String nodeID) {
+         if (logger.isTraceEnabled()) {
+            logger.trace("nodeDown: {}", nodeID);
+         }
          if (nodes.remove(nodeID)) {
             removedNodes.put(nodeID, eventUID);
             ActiveMQRALogger.LOGGER.rebalancingConnections("nodeDown " + 
nodeID);
diff --git 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
index ad29c1147a..faf0ab7311 100644
--- 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
+++ 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
@@ -499,6 +499,36 @@ public class ActiveMQActivationSpec extends 
ConnectionFactoryProperties implemen
       user = value;
    }
 
+   /**
+    * Get the userName
+    *
+    * @return The value
+    */
+   public String getUserName() {
+      if (logger.isTraceEnabled()) {
+         logger.trace("getUserName()");
+      }
+
+      if (user == null) {
+         return ra.getUserName();
+      } else {
+         return user;
+      }
+   }
+
+   /**
+    * Set the user
+    *
+    * @param value The value
+    */
+   public void setUserName(final String value) {
+      if (logger.isTraceEnabled()) {
+         logger.trace("setUserName(" + value + ")");
+      }
+
+      user = value;
+   }
+
    /**
     * Get the password
     *
@@ -619,6 +649,10 @@ public class ActiveMQActivationSpec extends 
ConnectionFactoryProperties implemen
       this.localTx = localTx;
    }
 
+   public Boolean getRebalanceConnections() {
+      return rebalanceConnections;
+   }
+
    public Boolean isRebalanceConnections() {
       return rebalanceConnections;
    }

Reply via email to