Author: ataylor
Date: 2011-06-08 10:33:58 -0400 (Wed, 08 Jun 2011)
New Revision: 10786
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
Log:
https://issues.jboss.org/browse/HORNETQ-650 - added constructor to allow binding registry
to be set
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
===================================================================
---
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2011-06-08
06:14:46 UTC (rev 10785)
+++
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2011-06-08
14:33:58 UTC (rev 10786)
@@ -65,6 +65,8 @@
private boolean readOnly;
+ private String name;
+
// Constructors
---------------------------------------------------------------------------------
public HornetQConnectionFactory()
@@ -190,7 +192,15 @@
}
// Public
---------------------------------------------------------------------------------------
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ public String getName() {
+ return name;
+ }
+
public boolean isHA()
{
return serverLocator.isHA();
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
---
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2011-06-08
06:14:46 UTC (rev 10785)
+++
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2011-06-08
14:33:58 UTC (rev 10786)
@@ -154,6 +154,17 @@
configFileName = null;
}
+ public JMSServerManagerImpl(final HornetQServer server, final BindingRegistry
registry) throws Exception
+ {
+ this.server = server;
+
+ this.coreConfig = server.getConfiguration();
+
+ configFileName = null;
+
+ this.registry = registry;
+ }
+
public JMSServerManagerImpl(final HornetQServer server, final String configFileName)
throws Exception
{
this.server = server;
@@ -174,6 +185,8 @@
config = configuration;
}
+
+
public JMSServerManagerImpl(HornetQServer server, String configFilename,
JMSStorageManager storageManager)
{
this.server = server;
@@ -1173,7 +1186,7 @@
cf =
HornetQJMSClient.createConnectionFactoryWithoutHA(cfConfig.getFactoryType(), configs);
}
}
-
+ cf.setName(cfConfig.getName());
cf.setClientID(cfConfig.getClientID());
cf.setClientFailureCheckPeriod(cfConfig.getClientFailureCheckPeriod());
cf.setConnectionTTL(cfConfig.getConnectionTTL());