posted 20 years ago
Not really, though it's similar. But a singleton is all about making sure there's just one instance of a class on a single JVM. In a distributed environment it's more complex - we've got one instance of the implementing class, running on the server, and one instance of the stub class running on the client. Moreover neither of these necessarily unique. It's possible to create multiple implementation instances on the server easily enough. And if (for some reason) we wanted to bind a second instance to the registry using a different service name, then it would be possible for clients to retrieve a second separate stub class instance, using the second service name. (It's unlikely anyone would want or need to do this, but it's possible.) As such I would say this is not, strictly speaking, a singleton. But it is an example of controlled instance creation using a form of factory method, at least as far as the client is concerned.
"I'm not back." - Bill Harding, Twister