Hi Chris, It's more like this:
The object ultimately handling a service call is the responsibility of a Proxy created by the ServiceModel. The ServiceModel usually returns a Proxy and the proxy delegates a method call to the appropriate instance (core-service-implementation). E.g., the proxies generated by the threaded/pooled model delegate to a thread-local instance. This also enables lazy-initialization of services: Your service is really only instantiated when the first method is called (by default). Now, you could let your "Template"-Service-model return a Proxy, which delegates each call to a fresh instance of the service ... But I just can't see the usecase for this kind of behaviour. What are you really trying to achieve? regards, Marcus -----Original Message----- From: Chris Burnley [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 11:15 AM To: [email protected] Subject: ServicePointImpl.getService caching service reference Hi, I'd like to query why ServicePointImpl.getService method caches the service object. I'm implementing a "template" service model which always creates new instances ( perhaps I'm going about it the wrong way), which of course doesn't work because the the service is cached in ServicePointImpl. I realise that in theory services should be usually mostly stateless and interchangeable, but that is contradicted by the existence of the thread service model. Shouldn't the reference returned be the responsibility of ServiceModel ? regards, Chris Burnley --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
