P
polism
Hi,
I have a singleton class which I want to "create" (call it's
GetInstance() for the first time)
in server process, and after some time I want to use it in client
process, through .Net Remoting.
I define the singleton as MarshalByRefObject.
My server process looks like this:
1.Register singelton type as being wellknown singleton (not
singlecall).
2. Singleton.GetInstance()
3. Console.Write("Singleton constructor called");
4. do some logic inside the singleton
5. Wait for clients to connect
Client process looks like this:
1. Register singleton type.
2. Singleton.GetInstance()
After this call, "Singleton constructor called" is being printed AGAIN
on the screen,
which means that the singleton object is being created again, and thats
not what I want.
I want to receive proxy to the same singelton, already created in
server process.
I don't understand what I do wrong.
Please help,
Mike.
I have a singleton class which I want to "create" (call it's
GetInstance() for the first time)
in server process, and after some time I want to use it in client
process, through .Net Remoting.
I define the singleton as MarshalByRefObject.
My server process looks like this:
1.Register singelton type as being wellknown singleton (not
singlecall).
2. Singleton.GetInstance()
3. Console.Write("Singleton constructor called");
4. do some logic inside the singleton
5. Wait for clients to connect
Client process looks like this:
1. Register singleton type.
2. Singleton.GetInstance()
After this call, "Singleton constructor called" is being printed AGAIN
on the screen,
which means that the singleton object is being created again, and thats
not what I want.
I want to receive proxy to the same singelton, already created in
server process.
I don't understand what I do wrong.
Please help,
Mike.