[jboss-cvs] JBoss Messaging SVN: r2938 - in branches/Branch_1_0_1_SP4_JBMESSAGING_1020: src/main/org/jboss/jms/client/remoting and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 31 03:21:17 EDT 2007
Author: ovidiu.feodorov at jboss.com
Date: 2007-07-31 03:21:17 -0400 (Tue, 31 Jul 2007)
New Revision: 2938
Modified:
branches/Branch_1_0_1_SP4_JBMESSAGING_1020/build-messaging.xml
branches/Branch_1_0_1_SP4_JBMESSAGING_1020/build-thirdparty.xml
branches/Branch_1_0_1_SP4_JBMESSAGING_1020/src/main/org/jboss/jms/client/remoting/CallbackServerFactory.java
branches/Branch_1_0_1_SP4_JBMESSAGING_1020/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-1020
Modified: branches/Branch_1_0_1_SP4_JBMESSAGING_1020/build-messaging.xml
===================================================================
--- branches/Branch_1_0_1_SP4_JBMESSAGING_1020/build-messaging.xml 2007-07-31 06:26:20 UTC (rev 2937)
+++ branches/Branch_1_0_1_SP4_JBMESSAGING_1020/build-messaging.xml 2007-07-31 07:21:17 UTC (rev 2938)
@@ -49,9 +49,9 @@
<property name="messaging.version.minor" value="0"/>
<property name="messaging.version.revision" value="1"/>
<property name="messaging.version.incrementing" value="6"/>
- <property name="messaging.version.tag" value="SP4"/>
+ <property name="messaging.version.tag" value="SP4-JBMESSAGING-1020"/>
<property name="messaging.version.name" value=""/>
- <property name="messaging.version.cvstag" value="JBossMessaging_1_0_1_SP4"/>
+ <property name="messaging.version.cvstag" value="JBossMessaging_1_0_1_SP4_JBMESSAGING_1020"/>
<property name="module.name" value="messaging"/>
<property name="module.Name" value="JBoss Messaging"/>
<property name="module.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag}"/>
@@ -149,7 +149,9 @@
present in ./lib, it will take precedence over the corresponding repository instance.
-->
<path id="jboss.dependencies.classpath">
- <path refid="jboss.common.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.log4j.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
<path refid="jboss.aop.classpath"/>
<path refid="jboss.remoting.classpath"/>
<path refid="jboss.serialization.classpath"/>
@@ -462,7 +464,7 @@
<!-- we need org/jboss/util/collection.SoftValueHashMap
which was moved http://jira.jboss.org/jira/browse/JBMESSAGING-281
-->
- <unjar dest="${build.scoped-sar}/tmp" src="${jboss.common.lib}/jboss-common.jar" >
+ <unjar dest="${build.scoped-sar}/tmp" src="${jboss/common.core.lib}/jboss-common-core.jar" >
<patternset>
<include name="org/jboss/util/collection/SoftValueHashMap*.class"/>
<!--
@@ -478,7 +480,7 @@
<fileset dir="${build.scoped-sar}/tmp" includes="**"/>
</delete>
<!-- I also need org.jboss.util.stream.* -->
- <unjar dest="${build.scoped-sar}/tmp" src="${jboss.common.lib}/jboss-common.jar">
+ <unjar dest="${build.scoped-sar}/tmp" src="${jboss/common.core.lib}/jboss-common-core.jar">
<patternset>
<include name="org/jboss/util/stream/**"/>
</patternset>
@@ -536,7 +538,9 @@
<unjar dest="${project.output}/jboss-messaging-client" src="${javassist.javassist.lib}/javassist.jar"/>
<unjar dest="${project.output}/jboss-messaging-client" src="${trove.trove.lib}/trove.jar"/>
<unjar dest="${project.output}/jboss-messaging-client" src="${build.scoped-sar}/jboss-common-softvaluehashmap.jar"/>
- <unjar dest="${project.output}/jboss-messaging-client" src="${jboss.common.lib}/jboss-common-client.jar"/>
+ <unjar dest="${project.output}/jboss-messaging-client" src="${jboss/common.core.lib}/jboss-common-core.jar"/>
+ <unjar dest="${project.output}/jboss-messaging-client" src="${jboss/common.logging.log4j.lib}/jboss-logging-log4j.jar"/>
+ <unjar dest="${project.output}/jboss-messaging-client" src="${jboss/common.logging.spi.lib}/jboss-logging-spi.jar"/>
<unjar dest="${project.output}/jboss-messaging-client" src="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
<unjar dest="${project.output}/jboss-messaging-client" src="${jboss.j2se.lib}/jboss-j2se.jar"/>
<unjar dest="${project.output}/jboss-messaging-client" src="${jboss.naming.lib}/jnp-client.jar"/>
Modified: branches/Branch_1_0_1_SP4_JBMESSAGING_1020/build-thirdparty.xml
===================================================================
--- branches/Branch_1_0_1_SP4_JBMESSAGING_1020/build-thirdparty.xml 2007-07-31 06:26:20 UTC (rev 2937)
+++ branches/Branch_1_0_1_SP4_JBMESSAGING_1020/build-thirdparty.xml 2007-07-31 07:21:17 UTC (rev 2938)
@@ -87,10 +87,12 @@
<componentref name="javassist" version="3.2.0.GA"/>
<componentref name="jgroups" version="2.3"/>
<componentref name="trove" version="1.0.2"/>
- <componentref name="jboss/common" version="snapshot"/>
+ <componentref name="jboss/common-core" version="2.0.3.GA"/>
+ <componentref name="jboss/common-logging-log4j" version="2.0.2.GA"/>
+ <componentref name="jboss/common-logging-spi" version="2.0.2.GA"/>
<componentref name="jboss/aop" version="1.5.0.GA"/>
<componentref name="jboss/serialization" version="1.0.3.GA"/>
- <componentref name="jboss/remoting" version="2.2.0.Alpha7"/>
+ <componentref name="jboss/remoting" version="2.2.0.Alpha7_JBREM-781"/>
<!-- Need this otherwise project doesn't build in Eclipse -->
<componentref name="apache-logging" version="1.0.4.1jboss"/>
Modified: branches/Branch_1_0_1_SP4_JBMESSAGING_1020/src/main/org/jboss/jms/client/remoting/CallbackServerFactory.java
===================================================================
--- branches/Branch_1_0_1_SP4_JBMESSAGING_1020/src/main/org/jboss/jms/client/remoting/CallbackServerFactory.java 2007-07-31 06:26:20 UTC (rev 2937)
+++ branches/Branch_1_0_1_SP4_JBMESSAGING_1020/src/main/org/jboss/jms/client/remoting/CallbackServerFactory.java 2007-07-31 07:21:17 UTC (rev 2938)
@@ -104,7 +104,12 @@
return holders.containsKey(protocol);
}
- public synchronized Connector getCallbackServer(InvokerLocator serverLocator) throws Exception
+ /**
+ * @param clientAsSeenFromServer - can be null if it was not possible to detect it.
+ */
+ public synchronized Connector getCallbackServer(InvokerLocator serverLocator,
+ InetAddress clientAsSeenFromServer)
+ throws Exception
{
String protocol = serverLocator.getProtocol();
@@ -114,7 +119,7 @@
{
h = new Holder();
- h.server = startCallbackServer(serverLocator);
+ h.server = startCallbackServer(serverLocator, clientAsSeenFromServer);
holders.put(protocol, h);
}
@@ -145,7 +150,12 @@
}
}
- protected Connector startCallbackServer(InvokerLocator serverLocator) throws Exception
+
+ /**
+ * @param clientAsSeenFromServer - can be null if it was not possible to detect it.
+ */
+ protected Connector startCallbackServer(InvokerLocator serverLocator,
+ InetAddress clientAsSeenFromServer) throws Exception
{
if (log.isTraceEnabled()) { log.trace(this + " setting up connection to " + serverLocator); }
@@ -159,7 +169,14 @@
if (thisAddress == null)
{
- thisAddress = InetAddress.getLocalHost().getHostAddress();
+ if (clientAsSeenFromServer != null)
+ {
+ thisAddress = clientAsSeenFromServer.getHostAddress();
+ }
+ else
+ {
+ thisAddress = InetAddress.getLocalHost().getHostAddress();
+ }
}
boolean isSSL = serverLocator.getProtocol().equals("sslsocket");
Modified: branches/Branch_1_0_1_SP4_JBMESSAGING_1020/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- branches/Branch_1_0_1_SP4_JBMESSAGING_1020/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-07-31 06:26:20 UTC (rev 2937)
+++ branches/Branch_1_0_1_SP4_JBMESSAGING_1020/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-07-31 07:21:17 UTC (rev 2938)
@@ -23,12 +23,14 @@
import java.util.HashMap;
import java.util.Map;
+import java.net.InetAddress;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.remoting.JMSWireFormat;
import org.jboss.logging.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.InvocationResponse;
import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.transport.Connector;
@@ -91,13 +93,26 @@
if (log.isTraceEnabled()) { log.trace(this + " created client"); }
+ client.connect();
+
+ // try to get my own IP address as reachable from the server
+ InetAddress clientAsSeenFromServer = null;
+ Object o = ((InvocationResponse)client.invoke("$GET_CLIENT_LOCAL_ADDRESS$")).getResult();
+
+ log.debug("received client's address as seen from the server: " + o);
+
+ if (o instanceof InetAddress)
+ {
+ clientAsSeenFromServer = (InetAddress)o;
+ }
+
// Get the callback server
- callbackServer = CallbackServerFactory.instance.getCallbackServer(serverLocator);
+ callbackServer =
+ CallbackServerFactory.instance.getCallbackServer(serverLocator, clientAsSeenFromServer);
callbackManager = (CallbackManager)callbackServer.getInvocationHandlers()[0];
+
- client.connect();
-
// 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
// This can make a massive difference on performance. We also do this in
More information about the jboss-cvs-commits
mailing list