2 Replies Latest reply on Dec 2, 2008 1:56 AM by Jun Liao

    JBM 1.4.0sp3 cp04 bisocket parameters does not effect

    Jun Liao Newbie

      JBM Group.The para in remoting-bisocket-service.xml

       <attribute name="validatorPingPeriod" isParam="true">10000</attribute>
       <attribute name="validatorPingTimeout" isParam="true">5000</attribute>

      does not effect client-side.So we got lots of disconnection.
      The file of org.jboss.jms.client.remoting.JMSRemotingConnection.java
      line 502
       * @return true if the listener was correctly installed, or false if the add attepmt was ignored
       * because there is already another listener installed.
       public synchronized boolean addConnectionListener(ConsolidatedRemotingConnectionListener listener)
       if (remotingConnectionListener != null)
       return false;
       remotingConnectionListener = listener;
       return true;

      should use method:
      public void addConnectionListener(ConnectionListener listener, Map metadata)

      otherwise the connectionValidator use default parameters to monitor connection.
      validatorPingPeriod = 2000;
      validatorPingTimeout = 1000;

        • 1. Re: JBM 1.4.0sp3 cp04 bisocket parameters does not effect
          Ron Sigal Master

          Yes, I noticed that recently; see https://jira.jboss.org/jira/browse/JBREM-1069. It will get fixed in the next Remoting releases.

          However, as far as I can see, it should affect only "validatorPingPeriod", which gets set in the metadata map, overriding the org.jboss.remoting.Client's configuration map. But "validatorPingTimeout" should get its value from the Client's configuration map, which includes the parameters set in remoting-bisocket-service.xml.

          However, maybe I'm missing something.


          • 2. Re: JBM 1.4.0sp3 cp04 bisocket parameters does not effect
            Jun Liao Newbie

            I think there are some subtle mechanism.
            JMSRemotingConnection public void start()

             Map config = new HashMap();
             config.put(Client.ENABLE_LEASE, String.valueOf(clientPing));
             if (serverLocator.getParameters().containsKey(MicroSocketClientInvoker.MAX_POOL_SIZE_FLAG))
             throw new IllegalArgumentException("Invalid remoting configuration - do not specify clientMaxPoolSize" +
             " use " + JBM_MAX_POOL_SIZE_KEY +" instead");
             if (!serverLocator.getProtocol().equals("http") & !serverLocator.getProtocol().equals("https"))
             String val = (String)serverLocator.getParameters().get(JBM_MAX_POOL_SIZE_KEY);
             if (val == null)
             log.warn(JBM_MAX_POOL_SIZE_KEY + " not specified - defaulting to 200");
             val = "200";
             config.put(MicroSocketClientInvoker.MAX_POOL_SIZE_FLAG, val);
             client = new Client(serverLocator, config);

            The method only set a few parameters of remoting,the Map config used as configuration of Client.
            The ConnectionValidator only use this map to set parameters,so it does not work.