Re: [Cppcms-users] mapping across mount_points
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2013-07-15 10:26:52
|
>________________________________
> From: Marcel Hellwig <ke...@co...>
>To: cpp...@li...
>Sent: Sunday, July 14, 2013 5:22 PM
>Subject: Re: [Cppcms-users] mapping across mount_points
>
>
>
>On 14.07.2013 16:01, Artyom Beilis wrote:
>
>The url/mapping works for a specific application hierarchy. And each application hierarchy is mounted to a specific mount point.
>>So you can't access to the url mapper of different hierarchy.
>>
Hmm, is there a way to specify application wide mappings?
>
Unfortunately not.
Technically asynchronous applications can be unmounted during their life time so mapping can be invalid.
or new applications can be mounted.
What you can do it to do something like that.
class dummy_async_mapping : public cppcms::application {
dummy_async_mapping(...)
{
// all mapping (not dispatching) goes there
}
}
class async_app : public dummy_async_mapping ...
class sync_app : public cppcms::application {
sync_app(...)
{
attach("/webapi/" , new dummy_async_mapping()
...
}
}
Such that they both would get the mapping you need.
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
|