diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java index 18865c397b9..ad6bcabd6ce 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java @@ -147,25 +147,19 @@ public void validate() throws InvalidPropertyException { } public boolean isValidUseRAManagedTransaction(List errorMessages) { - try { - new Boolean(useRAManagedTransaction); - return true; - } catch (Throwable e) { - // + boolean valid = isValidBooleanString(useRAManagedTransaction); + if(!valid) { + errorMessages.add("useRAManagedTransaction must be set to: true or false."); } - errorMessages.add("useRAManagedTransaction must be set to: true or false."); - return false; + return valid; } public boolean isValidNoLocal(List errorMessages) { - try { - new Boolean(noLocal); - return true; - } catch (Throwable e) { - // + boolean valid = isValidBooleanString(noLocal); + if(!valid) { + errorMessages.add("noLocal must be set to: true or false."); } - errorMessages.add("noLocal must be set to: true or false."); - return false; + return valid; } public boolean isValidMessageSelector(List errorMessages) { @@ -217,14 +211,11 @@ public boolean isValidMaxMessagesPerBatch(List errorMessages) { } public boolean isValidEnableBatch(List errorMessages) { - try { - new Boolean(enableBatch); - return true; - } catch (Throwable e) { - // + boolean valid = isValidBooleanString(enableBatch); + if(!valid) { + errorMessages.add("enableBatch must be set to: true or false"); } - errorMessages.add("enableBatch must be set to: true or false"); - return false; + return valid; } public ResourceAdapter getResourceAdapter() { @@ -735,4 +726,8 @@ public String getKeyStoreKeyPassword() { public void setKeyStoreKeyPassword(String keyStoreKeyPassword) { this.keyStoreKeyPassword = keyStoreKeyPassword; } + + private static boolean isValidBooleanString(String booleanString) { + return ("true".equalsIgnoreCase(booleanString) || ("false".equalsIgnoreCase(booleanString))); + } } diff --git a/activemq-rar/src/main/rar/META-INF/ra.xml b/activemq-rar/src/main/rar/META-INF/ra.xml index 2ff66572ebd..abd89802a0f 100644 --- a/activemq-rar/src/main/rar/META-INF/ra.xml +++ b/activemq-rar/src/main/rar/META-INF/ra.xml @@ -16,15 +16,14 @@ limitations under the License. --> - + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/connector_2_0.xsd" + version="2.0"> ActiveMQ inbound and outbound JMS ResourceAdapter ActiveMQ JMS Resource Adapter activemq.org - JMS 1.1 + JMS 3.1 1.0 @@ -106,7 +105,7 @@ java.lang.String - + Sets the XML configuration file used to configure the embedded ActiveMQ broker via @@ -131,36 +130,36 @@ org.apache.activemq.ra.ActiveMQManagedConnectionFactory - javax.jms.ConnectionFactory + jakarta.jms.ConnectionFactory org.apache.activemq.ra.ActiveMQConnectionFactory - javax.jms.Connection + jakarta.jms.Connection org.apache.activemq.ra.ManagedConnectionProxy org.apache.activemq.ra.ActiveMQManagedConnectionFactory - javax.jms.QueueConnectionFactory + jakarta.jms.QueueConnectionFactory org.apache.activemq.ra.ActiveMQConnectionFactory - javax.jms.QueueConnection + jakarta.jms.QueueConnection org.apache.activemq.ra.ManagedConnectionProxy org.apache.activemq.ra.ActiveMQManagedConnectionFactory - javax.jms.TopicConnectionFactory + jakarta.jms.TopicConnectionFactory org.apache.activemq.ra.ActiveMQConnectionFactory - javax.jms.TopicConnection + jakarta.jms.TopicConnection org.apache.activemq.ra.ManagedConnectionProxy XATransaction BasicPassword - javax.resource.spi.security.PasswordCredential + jakarta.resource.spi.security.PasswordCredential false - javax.jms.MessageListener + jakarta.jms.MessageListener org.apache.activemq.ra.ActiveMQActivationSpec @@ -176,7 +175,7 @@ - javax.jms.Queue + jakarta.jms.Queue org.apache.activemq.command.ActiveMQQueue PhysicalName @@ -184,7 +183,7 @@ - javax.jms.Topic + jakarta.jms.Topic org.apache.activemq.command.ActiveMQTopic PhysicalName @@ -192,7 +191,7 @@ - javax.jms.ConnectionFactory + jakarta.jms.ConnectionFactory org.apache.activemq.ActiveMQConnectionFactory brokerUrl @@ -200,7 +199,7 @@ - javax.jms.ConnectionFactory + jakarta.jms.ConnectionFactory org.apache.activemq.pool.XaPooledConnectionFactory brokerUrl @@ -212,7 +211,7 @@ - javax.jms.XAConnectionFactory + jakarta.jms.XAConnectionFactory org.apache.activemq.ActiveMQXAConnectionFactory brokerURL @@ -220,6 +219,5 @@ - diff --git a/activemq-rar/src/main/rar/broker-config.xml b/activemq-rar/src/main/rar/broker-config.xml index 36856cd9344..d8fb0f272f8 100644 --- a/activemq-rar/src/main/rar/broker-config.xml +++ b/activemq-rar/src/main/rar/broker-config.xml @@ -20,7 +20,7 @@ xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">