Thread: [Cppcms-users] dynamic shared views
Brought to you by:
artyom-beilis
From: kpeo <sla...@ya...> - 2011-09-04 18:20:24
|
Artyom, Is there way in engine of dynamically loading additional shared libs with view? I.e. i know how to load shared library and call some class function in it, but if i want to extend current view with pluggable one at runtime - whether it's possible with current version? Regards, kpeo |
From: Artyom B. <art...@ya...> - 2011-09-05 04:44:46
|
----- Original Message ----- > From: kpeo <sla...@ya...> > To: cpp...@li... > Cc: > Sent: Sunday, September 4, 2011 9:20 PM > Subject: [Cppcms-users] dynamic shared views > > Artyom, > > Is there way in engine of dynamically loading additional shared libs with view? > I.e. i know how to load shared library and call some class function in it, but > if i want to extend current view with pluggable one at runtime - whether > it's possible with current version? > > Regards, > kpeo > Actually it is possible even with current version. All view that is linked to executable is automatically registered (using global constructor) to the central singleton class that holds all views and unregistered when unloaded. So it is just enough to link the view to the plugin's shared object or load it as shared object of the view and you get it. Currently the code behind all this stuff is quite ugly and is going to be rewritten - code cleanup (it is the 1st or the 2nd task in the list) but the behavior would remain the same. And then it will be properly documented. The only restriction is that each view should have a separate name to prevent collide with each other. Artyom |
From: kpeo <sla...@ya...> - 2011-09-05 06:37:11
|
Great, thank you! Believe, url_mapping & dispatcher should also work with loadable modules - check it soon.. 05.09.2011, 08:44, "Artyom Beilis" <art...@ya...>: > ----- Original Message ----- > >> From: kpeo <sla...@ya...> >> To: cpp...@li... >> Cc: >> Sent: Sunday, September 4, 2011 9:20 PM >> Subject: [Cppcms-users] dynamic shared views >> >> Artyom, >> >> Is there way in engine of dynamically loading additional shared libs with view? >> I.e. i know how to load shared library and call some class function in it, but >> if i want to extend current view with pluggable one at runtime - whether >> it's possible with current version? >> >> Regards, >> kpeo > > Actually it is possible even with current version. > > All view that is linked to executable is automatically > registered (using global constructor) to the central > singleton class that holds all views and unregistered > when unloaded. > > So it is just enough to link the view to the plugin's > shared object or load it as shared object of the view > and you get it. > > Currently the code behind all this stuff is quite ugly > and is going to be rewritten - code cleanup > (it is the 1st or the 2nd task in the list) > but the behavior would remain the same. > > And then it will be properly documented. > > The only restriction is that each view should > have a separate name to prevent collide with each > other. > > Artyom > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2011-09-05 08:04:12
|
Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ ----- Original Message ----- > From: kpeo <sla...@ya...> > To: cpp...@li... > Cc: > Sent: Monday, September 5, 2011 9:37 AM > Subject: Re: [Cppcms-users] dynamic shared views > >G reat, thank you! > Believe, url_mapping & dispatcher should also work with loadable modules - > check it soon.. > Currently URL Mapper and URL dispatched do not support detaching URLs same as applications_pool do not support detaching application_factories. So if you load application plug-in you will not be able to unload it. it without stopping the service. > 05.09.2011, 08:44, "Artyom Beilis" <art...@ya...>: >> ----- Original Message ----- >> >>> From: kpeo <sla...@ya...> >>> To: cpp...@li... >>> Cc: >>> Sent: Sunday, September 4, 2011 9:20 PM >>> Subject: [Cppcms-users] dynamic shared views >>> >>> Artyom, >>> >>> Is there way in engine of dynamically loading additional shared libs > with view? >>> I.e. i know how to load shared library and call some class function in > it, but >>> if i want to extend current view with pluggable one at runtime - > whether >>> it's possible with current version? >>> >>> Regards, >>> kpeo >> >> Actually it is possible even with current version. >> >> All view that is linked to executable is automatically >> registered (using global constructor) to the central >> singleton class that holds all views and unregistered >> when unloaded. >> >> So it is just enough to link the view to the plugin's >> shared object or load it as shared object of the view >> and you get it. >> >> Currently the code behind all this stuff is quite ugly >> and is going to be rewritten - code cleanup >> (it is the 1st or the 2nd task in the list) >> but the behavior would remain the same. >> >> And then it will be properly documented. >> >> The only restriction is that each view should >> have a separate name to prevent collide with each >> other. >> >> Artyom >> >> > ------------------------------------------------------------------------------ >> Special Offer -- Download ArcSight Logger for FREE! >> Finally, a world-class log management solution at an even better >> price-free! And you'll get a free "Love Thy Logs" t-shirt > when you >> download Logger. Secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsisghtdev2dev >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |