[jboss-cvs] JBoss Messaging SVN: r3344 - in branches/Branch_JBMESSAGING-544/src/main/org/jboss: messaging/core/remoting and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Nov 19 10:18:12 EST 2007
Author: jmesnil
Date: 2007-11-19 10:18:12 -0500 (Mon, 19 Nov 2007)
New Revision: 3344
Modified:
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/messaging/core/remoting/Client.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-544: Replace client-server transport with NIO based transport
* added server host parameter to Client.connect() method
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-11-19 15:08:03 UTC (rev 3343)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-11-19 15:18:12 UTC (rev 3344)
@@ -303,7 +303,7 @@
});
newClient = new org.jboss.messaging.core.remoting.Client();
- newClient.connect(Constants.PORT, TransportType.TCP);
+ newClient.connect(serverLocator.getHost(), Constants.PORT, TransportType.TCP);
// We explicitly set the Marshaller since otherwise remoting tries to resolve the marshaller
// every time which is very slow - see org.jboss.remoting.transport.socket.ProcessInvocation
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/messaging/core/remoting/Client.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/messaging/core/remoting/Client.java 2007-11-19 15:08:03 UTC (rev 3343)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/messaging/core/remoting/Client.java 2007-11-19 15:18:12 UTC (rev 3344)
@@ -62,14 +62,15 @@
// Public --------------------------------------------------------
- public void connect(int port, TransportType transport) throws Exception
+ public void connect(String host, int port, TransportType transport) throws Exception
{
- connect(port, transport, false);
+ connect(host, port, transport, false);
}
- public void connect(int port, TransportType transport, boolean useSSL)
+ public void connect(String host, int port, TransportType transport, boolean useSSL)
throws Exception
{
+ assert host != null;
assert port > 0;
assert transport != null;
@@ -106,7 +107,7 @@
connector.getFilterChain().addLast("logger", new LoggingFilter());
connector.setHandler(new ClientHandler());
- InetSocketAddress address = new InetSocketAddress(port);
+ InetSocketAddress address = new InetSocketAddress(host, port);
ConnectFuture future = connector.connect(address);
future.awaitUninterruptibly();
if (!future.isConnected())
More information about the jboss-cvs-commits
mailing list