3 Replies Latest reply on Jun 30, 2006 2:18 PM by Tom Elrod

    lease

    mazz Master

      Can someone explain how the lease parameter is used: Connector.getLeasePeriod() ?

      As I understand it (which I might not), the lease period is the time in milliseconds that a client that is connected to the connector has in order to "ping" the connector in order to get a new lease. If the client stays connected to the connector but the lease period expires without that client asking for a new lease, the connector will consider the client dead and close the connection.

      Is that right?

        • 1. Re: lease
          Tom Elrod Master

          That's pretty much it. Right on with the client having a period in which it needs to ping the server to update its lease with the server. However, the lease period is not an exact one, meaning the actual time period is a sliding window. See http://jira.jboss.com/jira/browse/JBREM-408 for more details on how it works internally.

          The other thing is that when client considered dead, will just notify connection listeners that have been registered (if any). Takes no other action.

          • 2. Re: lease
            mazz Master

            Is there a standard, default listener installed that closes the connection with the client? Or is it, out of box, a no-op? If I don't have a connection listener, can I therefore ignore the lease stuff and just set it to -1 to not use it?

            • 3. Re: lease
              Tom Elrod Master

              There is no connection listeners by default. Have to be added manually by user. Leasing will be disabled until at least one connection listener is registered (and turns off after all are removed).