[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Re: How returning a remote object created in the server

Sam Santiago

9/6/2004 3:47:00 PM

You want each client to have a "session" object which implies you want to
use a CAO - Client Activated Object. All you have to do is derive your
Session object from MarshalByRefObject and have your server singleton object
return it. We had a discussion on this scenario several times of the
passed few weeks so search for factory pattern in this group or I also put
some of the discussion on my site:
http://www.SoftiTe.../d....

Thanks,

Sam

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"Maurizio Poletto" <Maurizio Poletto@discussions.microsoft.com> wrote in
message news:193F25FA-08C4-47D5-8B2D-65DAF2D68575@microsoft.com...
> A singleton object (server) has a method (login) to let to every client to
> connect to the server. I should like to return a new object (session) with
> new methods.
>
> So, in the client, we have
> Session session = server.login(userId, userPsw);
>
> while, in the server, we have
> Session Login(string Id, string Psw)
> {
> ...
> ...
> Session session = new Session();
> return session;
> }
>
> I would appreciate any ideas on how to return an object created in the
server?
> Regards
> Maurizio