Session bindings using RCF 2.0

RCF support and general discussion.
Post Reply
Raider
Posts: 12
Joined: Tue Mar 26, 2013 2:55 pm

Session bindings using RCF 2.0

Post by Raider »

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

Re: Session bindings using RCF 2.0

Post by spino »

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:

Re: Session bindings using RCF 2.0

Post by jarl »

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
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

Post Reply