Brett,
> > Could we add
> >
> > public boolean execute(Object ob) throws ServiceException;
>
> -1. You can achieve this same thing with init(Object ob) and then
> execute(). I don't want to have to know which is the appropriate
> execute() method to call depending on the service type. That means I
> can't dynamically load/run services, because I have to figure out the
> type to see which execute() needs to be run; the one with the parameter
> or the one without. As long as you always all init(), and always call
> execute(), yoiu're all set.
I guess I was not clear. If the service is a singleton then init(Object
OB) followed by execute() will fail. Because all threads will be using
the same object instance, therefore the object passed in by init is
global to all threads.
I do take your point about dynamically running services and I also have
read Jon's message that services are not supposed to be singletons. If
singleton services are not supported then I agree with the -1, otherwise
I guess we can use the actual service as a proxy onto a singleton that
does the real work.
I do feel myself that singletons are very handy in services for the same
reasons that servlets run better as singletons with multiple threads.
Dave
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]