Wednesday, July 16, 2008

singleton and singlecall.

Remoting has support for both stateless and with-state environment, which is achieved using Singleton and Singlecall activation

Singleton types never have more than one instance at any one time. If an instance exists, all client requests are serviced by that instance.
Single Call types always have one instance per client request. The next method invocation will be serviced by a different server instance, even if the previous instance has not yet been recycled by the system.

If the operations are stateless, then using a singleton or single call wont really matter.
If you have any need to retain information between calls, you might
consider a singleton, as you will be able to store state in the singleton.

No comments: