"Kelvin Tan" <[EMAIL PROTECTED]> writes: > From: Jason van Zyl <[EMAIL PROTECTED]> > >> When the services were decoupled from fulcrum I started cleaning up the >> service code but it still needs work. It is somewhat confusing, we know. >> >> Bottom line is that you get hold of the service by its name and not >> the classname. Those methods that refer to getting a service by >> classname should be made protected because they aren't used outside >> the service broker. > > Sure, and because I'm only using the framework (base classes and > interfaces), I hope I can help with the cleaning. > > I experienced trouble shutting down, even though initialization was fine. > The problem was that shutdownService(String serviceName) obtains the > service's classname via the mapping hashtable, then proceeds to call > shutdownClass(String className). This doesn't work because shutdownClass() > ... > Service service = getServiceInstance(className); > > attempts to retrieve the service from the services hashtable which actually > maps according to serviceName:service. > > Moving the shutdown code to shutdownService() itself or changing the mapping > to className:service fixed the problem.
Hi Kelvin. I refactored BaseServiceBroker to use service name vs. class names consistantly, and in the process corrected the shutdown mechanism. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
