Re: [Cppcms-users] Passing objects to application pool from outside
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2013-01-09 12:48:32
|
You can pass whatever you need to application factory object that would pass it to the application itself: See: http://cppcms.com/cppcms_ref/latest/namespacecppcms.html#afc4fc49051725b6b4722bac89b1d1425 Or create your own factory that does what ever you need: http://cppcms.com/cppcms_ref/latest/structcppcms_1_1applications__pool_1_1factory.html Remember that the applications are created on demand so you don't know how many application instances would be running simultaneously. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: Sab <rim...@gm...> > To: cpp...@li... > Cc: > Sent: Wednesday, January 9, 2013 2:32 PM > Subject: [Cppcms-users] Passing objects to application pool from outside > > Hi guys, > > I’m running the CppCMS service as an own thread that I start in my applications > main (the main has other tasks to do, so I can’t block it). In the > cppcms::application classes I would like to have access to an object that is > created outside the service, in my main, before the CppCMS service is started. > What would be the best way to pass a pointer of this object to the applications, > > so that I can safely access its functions while processing requests? > > Sab > > > > ------------------------------------------------------------------------------ > Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery > and much more. Keep your Java skills current with LearnJavaNow - > 200+ hours of step-by-step video tutorials by Java experts. > SALE $49.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122612 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |