[hornetq-commits] JBoss hornetq SVN: r10297 - branches/Branch_2_2_EAP/examples/common/src/org/hornetq/common/example.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Mar 7 07:47:03 EST 2011
Author: ataylor
Date: 2011-03-07 07:47:03 -0500 (Mon, 07 Mar 2011)
New Revision: 10297
Modified:
branches/Branch_2_2_EAP/examples/common/src/org/hornetq/common/example/HornetQExample.java
Log:
fixed example compile
Modified: branches/Branch_2_2_EAP/examples/common/src/org/hornetq/common/example/HornetQExample.java
===================================================================
--- branches/Branch_2_2_EAP/examples/common/src/org/hornetq/common/example/HornetQExample.java 2011-03-07 12:45:08 UTC (rev 10296)
+++ branches/Branch_2_2_EAP/examples/common/src/org/hornetq/common/example/HornetQExample.java 2011-03-07 12:47:03 UTC (rev 10297)
@@ -227,6 +227,21 @@
String port = (String) transportConfiguration.getParams().get("port");
return Integer.valueOf(port) - 5445;
}
+
+ protected Connection getServerConnection(int server, Connection... connections)
+ {
+ for (Connection connection : connections)
+ {
+ DelegatingSession session = (DelegatingSession) ((HornetQConnection) connection).getInitialSession();
+ TransportConfiguration transportConfiguration = session.getSessionFactory().getConnectorConfiguration();
+ String port = (String) transportConfiguration.getParams().get("port");
+ if(Integer.valueOf(port) == server + 5445)
+ {
+ return connection;
+ }
+ }
+ return null;
+ }
private void reportResultAndExit()
{
More information about the hornetq-commits
mailing list