Author: clebert.suconic(a)jboss.com
Date: 2011-11-09 13:52:15 -0500 (Wed, 09 Nov 2011)
New Revision: 11681
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
Removing excessive log on ServerLocator
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-11-09
18:45:28 UTC (rev 11680)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-11-09
18:52:15 UTC (rev 11681)
@@ -609,10 +609,12 @@
public ClientSessionFactory createSessionFactory(String nodeID) throws Exception
{
- log.info(topology.describe("full topology"));
TopologyMember topologyMember = topology.getMember(nodeID);
- log.info("Creating connection factory towards " + nodeID + " =
" + topologyMember);
+ if (log.isTraceEnabled())
+ {
+ log.trace("Creating connection factory towards " + nodeID + " =
" + topologyMember + ", topology=" + topology.describe());
+ }
if (topologyMember == null)
{
@@ -662,8 +664,17 @@
addToConnecting(factory);
try
{
- factory.connect(reconnectAttempts, failoverOnInitialConnection);
- addFactory(factory);
+ try
+ {
+ factory.connect(reconnectAttempts, failoverOnInitialConnection);
+ }
+ catch (HornetQException e1)
+ {
+ //we need to make sure is closed just for garbage collection
+ factory.close();
+ throw e1;
+ }
+ addFactory(factory);
return factory;
}
finally
Show replies by date