[jboss-cvs] JBoss Messaging SVN: r1614 - branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/client/remoting

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 21 20:09:48 EST 2006


Author: ron_sigal
Date: 2006-11-21 20:09:46 -0500 (Tue, 21 Nov 2006)
New Revision: 1614

Modified:
   branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
Log:
JBMESSAGING-207:  Added handling for Remoting configuration.

Modified: branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java	2006-11-21 21:23:34 UTC (rev 1613)
+++ branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java	2006-11-22 01:09:46 UTC (rev 1614)
@@ -50,6 +50,7 @@
 {
    // Constants -----------------------------------------------------
 
+   public static final String CALLBACK_POLL_PERIOD_DEFAULT = "100";
    private static final Logger log = Logger.getLogger(JMSRemotingConnection.class);
 
    // Static --------------------------------------------------------
@@ -106,13 +107,31 @@
          HashMap metadata = new HashMap();
          metadata.put(InvokerLocator.DATATYPE, "jms");
          metadata.put(InvokerLocator.SERIALIZATIONTYPE, "jms");
+         
+         String bindAddress = System.getProperty("jboss.messaging.callback.bind.address");
+         if (bindAddress != null)
+            metadata.put(Client.CALLBACK_SERVER_HOST, bindAddress);
+         
+         String propertyPort = System.getProperty("jboss.messaging.callback.bind.port");
+         if (propertyPort != null)
+            metadata.put(Client.CALLBACK_SERVER_PORT, propertyPort);
+
          client.addListener(callbackManager, metadata, null, true);
       }
       else
       {
          if (log.isTraceEnabled()) log.trace("simulating push callbacks");
          HashMap metadata = new HashMap();
-         metadata.put(CallbackPoller.CALLBACK_POLL_PERIOD, "100");  
+         
+         String callbackPollPeriod = System.getProperty("jboss.messaging.callback.callbackPollPeriod");
+         if (callbackPollPeriod == null)
+            callbackPollPeriod = CALLBACK_POLL_PERIOD_DEFAULT;
+         metadata.put(CallbackPoller.CALLBACK_POLL_PERIOD, callbackPollPeriod);  
+         
+         String reportPollingStatistics = System.getProperty("jboss.messaging.callback.reportPollingStatistics");
+         if (reportPollingStatistics != null)
+            metadata.put(CallbackPoller.REPORT_STATISTICS, reportPollingStatistics);
+         
          client.addListener(callbackManager, metadata);
       }
 
@@ -152,7 +171,7 @@
    // Protected -----------------------------------------------------
 
    // Private -------------------------------------------------------
-
+   
    // Inner classes -------------------------------------------------
 
 }




More information about the jboss-cvs-commits mailing list