[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-549 - Lease set to -1 causes exception

tom.elrod@jboss.com do-not-reply at jboss.com
Thu Sep 21 14:58:38 EDT 2006


You are right that client should not error because the server says its default lease period is a negative number.  I have already checked in a fix for this.  

However, we need to resolve how all of this works together for leasing.  First off, if there is no connection listener registered on the server side, there is no point in doing leasing at all imo (as there will be no one to notify of expired lease).  This is why lease period > 0 AND at least one connection listener registred is required to turn on leasing from the server side.  

Once leasing is turned on and a client has begun to do leasing (meaning there is a leasing sessions in progress on the server side), need to know when they should be cleaned up.  Currently there are three cases when this will happen:

1. Client disconnects
2. Client lease is expired (meaning client probably crashed)
3. All connection listeners are removed

Notice case 3 is because leasing has been disabled.

Then there is the leasing period on the server side.  This value is only used as part of the criteria for turning on leasing (having connection listener registered is the other).  Once leasing is enabled on the server side and leasing sessions have begun, the lease period on the server side only impacts what the leasing period will be on the client (assuming the client does not override this with their own lease period).  This is where the original bug mentioned came in because the client would accept the server's lease period without checking for negative number.

So having said all that, does this NOT meet messaging requirements?  If not, what should be changed?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973374#3973374

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973374



More information about the jboss-dev-forums mailing list