Author: clebert.suconic(a)jboss.com
Date: 2011-09-26 23:17:15 -0400 (Mon, 26 Sep 2011)
New Revision: 11431
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/ra/HornetQResourceAdapter.java
branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/ra/ResourceAdapterTest.java
Log:
fixing tests
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/ra/HornetQResourceAdapter.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2011-09-27
02:59:26 UTC (rev 11430)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2011-09-27
03:17:15 UTC (rev 11431)
@@ -41,7 +41,6 @@
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.client.HornetQConnectionFactory;
-import org.hornetq.jms.server.recovery.RecoveryRegistry;
import org.hornetq.jms.server.recovery.XARecoveryConfig;
import org.hornetq.ra.inflow.HornetQActivation;
import org.hornetq.ra.inflow.HornetQActivationSpec;
@@ -1380,6 +1379,42 @@
return defaultHornetQConnectionFactory;
}
+ /**
+ * @param transactionManagerLocatorClass
+ * @see
org.hornetq.ra.HornetQRAProperties#setTransactionManagerLocatorClass(java.lang.String)
+ */
+ public void setTransactionManagerLocatorClass(String transactionManagerLocatorClass)
+ {
+ raProperties.setTransactionManagerLocatorClass(transactionManagerLocatorClass);
+ }
+
+ /**
+ * @return
+ * @see org.hornetq.ra.HornetQRAProperties#getTransactionManagerLocatorClass()
+ */
+ public String getTransactionManagerLocatorClass()
+ {
+ return raProperties.getTransactionManagerLocatorClass();
+ }
+
+ /**
+ * @return
+ * @see org.hornetq.ra.HornetQRAProperties#getTransactionManagerLocatorMethod()
+ */
+ public String getTransactionManagerLocatorMethod()
+ {
+ return raProperties.getTransactionManagerLocatorMethod();
+ }
+
+ /**
+ * @param transactionManagerLocatorMethod
+ * @see
org.hornetq.ra.HornetQRAProperties#setTransactionManagerLocatorMethod(java.lang.String)
+ */
+ public void setTransactionManagerLocatorMethod(String
transactionManagerLocatorMethod)
+ {
+ raProperties.setTransactionManagerLocatorMethod(transactionManagerLocatorMethod);
+ }
+
public HornetQConnectionFactory createHornetQConnectionFactory(final
ConnectionFactoryProperties overrideProperties)
{
HornetQConnectionFactory cf;
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java 2011-09-27
02:59:26 UTC (rev 11430)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java 2011-09-27
03:17:15 UTC (rev 11431)
@@ -54,7 +54,7 @@
public HornetQResourceRecovery register(HornetQConnectionFactory factory, String
userName, String password)
{
- if(!isRegistered(factory))
+ if(!isRegistered(factory) && registry != null)
{
XARecoveryConfig xaRecoveryConfig = new XARecoveryConfig(factory, userName,
password);
HornetQResourceRecovery resourceRecovery = new
HornetQResourceRecovery(xaRecoveryConfig);
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/ra/ResourceAdapterTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/ra/ResourceAdapterTest.java 2011-09-27
02:59:26 UTC (rev 11430)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/ra/ResourceAdapterTest.java 2011-09-27
03:17:15 UTC (rev 11431)
@@ -32,6 +32,8 @@
{
HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter();
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -220,6 +222,8 @@
qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY);
qResourceAdapter.setConnectionParameters("server-id=0");
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -243,6 +247,8 @@
qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY);
qResourceAdapter.setConnectionParameters("server-id=0");
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -267,6 +273,8 @@
qResourceAdapter.setDiscoveryRefreshTimeout(1l);
qResourceAdapter.setDiscoveryInitialWaitTimeout(1l);
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -285,7 +293,12 @@
{
HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter();
qResourceAdapter.setDiscoveryAddress("231.7.7.7");
+
+ //qResourceAdapter.getTransactionManagerLocatorClass
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
+
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -312,6 +325,8 @@
qResourceAdapter.setConnectionParameters("server-id=0");
qResourceAdapter.setHA(true);
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -333,6 +348,8 @@
qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY);
qResourceAdapter.setConnectionParameters("server-id=0");
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -355,6 +372,8 @@
qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY);
qResourceAdapter.setConnectionParameters("server-id=0");
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -377,6 +396,8 @@
qResourceAdapter.setConnectionParameters("server-id=0");
qResourceAdapter.setReconnectAttempts(100);
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -398,6 +419,8 @@
qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY);
qResourceAdapter.setConnectionParameters("server-id=0");
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
@@ -419,6 +442,8 @@
qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY);
qResourceAdapter.setConnectionParameters("server-id=0");
HornetQRATestBase.MyBootstrapContext ctx = new
HornetQRATestBase.MyBootstrapContext();
+
+ qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
Show replies by date