Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 60993 invoked by uid 500); 22 Jun 2001 14:52:42 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 60926 invoked from network); 22 Jun 2001 14:52:38 -0000 Received: from e33.co.us.ibm.com (HELO e33.bld.us.ibm.com) (32.97.110.131) by h31.sny.collab.net with SMTP; 22 Jun 2001 14:52:38 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.99.140.23]) by e33.bld.us.ibm.com (8.9.3/8.9.3) with ESMTP id JAA22016 for ; Fri, 22 Jun 2001 09:47:12 -0500 Received: from f6n96e (d03nm104h.boulder.ibm.com [9.99.140.96]) by westrelay02.boulder.ibm.com (8.11.1m3/NCO v4.96.1.0) with ESMTP id f5MEqdO136978 for ; Fri, 22 Jun 2001 08:52:39 -0600 Importance: Normal To: axis-dev@xml.apache.org Subject: Re: Handler registration patterns X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: From: "James M Snell" Date: Fri, 22 Jun 2001 07:52:31 -0700 X-MIMETrack: Serialize by Router on D03NM104/03/M/IBM(Release 5.0.6 |December 14, 2000) at 06/22/2001 08:52:39 AM, Serialize complete at 06/22/2001 08:52:39 AM MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N WSDD is set up to supports forward references without any problems. - James Snell Software Engineer, Emerging Technologies, IBM James M Snell/Fresno/IBM - jasnell@us.ibm.com "God placed me on the earth to do a certain number of things. Right now, I am so far behind, I will never die." - Anon. Please respond to axis-dev@xml.apache.org To: cc: Subject: Handler registration patterns Hi all: I've just discovered a problem which my recent XML-izing of the registries has brought to the fore. Namely, we currently rely on registering things in a particular order, to avoid forward-references to Handlers which haven't yet been defined. All our XML is currently set up this way, and when we used to write the serialized object .reg files, Java took care of maintaining all the references for us. The list() code, which is what I'm using to store stuff in XML now, simply walks the registry in no particular order, so it's possible to end up with xml that looks like this: (actually, right now I make sure to process Handler definitions before Chain definitions, so this particular situation wouldn't be a problem, but when chains include other chains it arises) This also raises the spectre of circular references, which was there before as well. Should we notice the following and complain? One suggestion for the first problem is to use a "placeholder" Handler when we're reading references to names that don't exist yet. We'd also need to add a replace() method in the Chain API so we can fix these when they eventually do get registered. We'd need to keep a table of fixups and resolve all the replacements. Alternately, we could let the placeholder be a reference, and have it forward messages to the "real" Handler once it's deployed. This is kind of cool but involves more objects and more method calls per invocation. As for the circular refs - anyone got any suggestions? One school of thought says "you can shoot yourself in the foot if you want to" - i.e. we shouldn't do anything. Alternately, we could at either deploy time or run time check for loops and complain if we find any. --Glen