I have two process types - a Master and a number of Slaves. A Slave's lifecycle looks like this. It is born, registers with it's Master (via SOAP), sit's around ready to respond to it's Master's bidding for a while, (bidding will arrive as a SOAP RMI), then deregisters from Master (via SOAP) and shuts down. A Slave has a Servlet component, which is responsible for generating HTML reports on the Slave's status. A Slave needs a lifecycle - so it knows when to register, listen and deregister. A Slave needs a SOAP client component, to make calls to it's Master. A Slave needs a SOAP service component, to receive calls from it's Master. My question is: How should the objects that implement these components intersect/communicate with each other? My initial thought was to take advantage of the lifecycle offered by the Servlet. The Servlet lifecycle would be the Slave's lifecycle. The Servlet would contain SOAP client code etc... I figured that I should also publish a subset of the Servlet's API as the SOAP service expected by the Master. Then I ran into trouble. It looks to me as if the JavaProvider assumes total control over it's 'deployee's lifecycle. So I would need a custom ServletProvider, which looks up the Servlet and delegates calls to it. Then again, I'm not sure that JSDK allows me to get hold of a Servlet object at all, and the whole thing begins to sound hacky as the neat distinction between HTML presentation, Service provision and Slave lifecycle and logic is lost. So then I considered keeping all these components separate, but making a single common data model available to all of them, but this began to look way too complicated, especially as the Slave lifecycle, now separate from the Servlet's governs an object which is not a Servlet or SOAP service - where would it live ? not within the WebContainer.... I can't believe that this is not a common architectural problem faced by many Web Application developers. In conclusion: Who IS the application ? The Servlet, the SOAP Service or neither? and if neither, What is the application, and Where is it? I guess that about wraps it up - If I have completely misunderstood please feel free to flame away - I'm climbing into my flameproof trousers as we speak. Thanks for your time, Jules ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie