RCF support and general discussion.
Raider
Posts: 12 Joined: Tue Mar 26, 2013 2:55 pm
Post
by Raider » Tue Mar 26, 2013 3:23 pm
How to migrate this code from to use with RCF 2.0?
Code: Select all
RCF::SessionObjectFactoryServicePtr Factory(new RCF::SessionObjectFactoryService());
Factory->bind<DatabaseService, CServerImpl>();
Server->addService(Factory);
The point is to have separate CServerImpl objects for each connection to store/manage data for each connection. Server is using thread pools.
spino
Posts: 3 Joined: Fri Oct 28, 2011 12:22 pm
Post
by spino » Tue Mar 26, 2013 4:29 pm
server side:
Code: Select all
Server.getSessionObjectFactoryServicePtr()->bind<DatabaseService,CServerImpl>();
client side:
Code: Select all
Client.getClientStub().createRemoteSessionObject();
jarl
Posts: 238 Joined: Mon Oct 03, 2011 4:53 am
Contact:
Post
by jarl » Tue Mar 26, 2013 11:41 pm
That is correct Spino.
SessionObjectFactoryService is deprecated in 2.0, and will eventually be dropped in future versions. In RCF 2.0, you should use RcfSession::createSessionObject<>() etc, to keep track of per-connection state. See this section in the user guide for more information:
http://www.deltavsoft.com/doc/rcf_user_ ... r_sessions