Author: clebert.suconic(a)jboss.com
Date: 2010-02-16 11:52:12 -0500 (Tue, 16 Feb 2010)
New Revision: 8883
Modified:
trunk/src/main/org/hornetq/ra/HornetQRAConnectionFactory.java
trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
Log:
https://jira.jboss.org/jira/browse/HORNETQ-294 - A few minor tweaks to the JCA adapter as
requested by the JBJCA's lead (Jesper)
Modified: trunk/src/main/org/hornetq/ra/HornetQRAConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/ra/HornetQRAConnectionFactory.java 2010-02-16 15:28:23 UTC
(rev 8882)
+++ trunk/src/main/org/hornetq/ra/HornetQRAConnectionFactory.java 2010-02-16 16:52:12 UTC
(rev 8883)
@@ -21,7 +21,7 @@
import javax.jms.XAConnectionFactory;
import javax.jms.XAQueueConnectionFactory;
import javax.jms.XATopicConnectionFactory;
-import javax.naming.Referenceable;
+import javax.resource.Referenceable;
/**
* An aggregate interface for the JMS connection factories
Modified: trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
===================================================================
--- trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2010-02-16 15:28:23 UTC (rev
8882)
+++ trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2010-02-16 16:52:12 UTC (rev
8883)
@@ -72,6 +72,11 @@
* The resource adapter properties
*/
private final HornetQRAProperties raProperties;
+
+ /**
+ * The resource adapter properties before parsing
+ */
+ private String unparsedProperties;
/**
* The JBoss connection factory
@@ -234,15 +239,16 @@
return raProperties.getConnectorClassName();
}
- public Map<String, Object> getConnectionParameters()
+ public String getConnectionParameters()
{
- return raProperties.getParsedConnectionParameters();
+ return unparsedProperties;
}
public void setConnectionParameters(final String config)
{
if (config != null)
{
+ this.unparsedProperties = config;
raProperties.setParsedConnectionParameters(Util.parseConfig(config));
}
}
@@ -1381,7 +1387,7 @@
if (connectorClassName != null)
{
Map<String, Object> connectionParams =
overrideProperties.getParsedConnectionParameters() != null ?
overrideProperties.getParsedConnectionParameters()
-
: getConnectionParameters();
+
: raProperties.getParsedConnectionParameters();
TransportConfiguration transportConf = new
TransportConfiguration(connectorClassName, connectionParams);
String backUpCOnnectorClassname =
overrideProperties.getBackupConnectorClassName() != null ?
overrideProperties.getBackupConnectorClassName()
Modified: trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2010-02-16 15:28:23
UTC (rev 8882)
+++ trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2010-02-16 16:52:12
UTC (rev 8883)
@@ -333,7 +333,7 @@
public void testValidateProperties() throws Exception
{
- validateGettersAndSetters(new HornetQResourceAdapter(),
"backupTransportConfiguration");
+ validateGettersAndSetters(new HornetQResourceAdapter(),
"backupTransportConfiguration", "connectionParameters");
validateGettersAndSetters(new HornetQRAManagedConnectionFactory(),
"connectionParameters",
"sessionDefaultType",