> If you want session-specific resource, you should bind it to session
(parent with application object and use WResource::url() to get URL.
How do I bind the resource to the session, is there a function like
addResource that does the same thing?
> If you need database session for you resource, this session object
should be created along with the resource.
In my case I use the environment env.hostName() to get the database
connection, so this causes me to change where I need to add this
resource.
Thanks for any help.
On Sun, 2014-03-09 at 11:23 +0400, Nagaev Boris wrote:
> Hello,
>
> at least, you should not change WServer from WApplication. Methods
> addResource and addEntryPoint should be called before server start
> (WServer::start()). If you want session-specific resource, you should
> bind it to session (parent with application object and use
> WResource::url() to get URL. If you want server-global resource, you
> should initialize it and bind to server using addResource BEFORE
> server start. If you need database session for you resource, this
> session object should be created along with the resource.
>
> Regards,
> Boris Nagaev
>
>
> On Sun, Mar 9, 2014 at 4:50 AM, Jeffrey Scott Flesher Gmail
> <jeffrey.scott.fles...@gmail.com> wrote:
> > Moving the code in example wt-home from main into the home which is derived
> > from WApplication, in order to setup the database based on URL, I found this
> > crashes the system randomly, here is the Code:
> >
> > BlogRSSFeed rssFeed(*blogDb_, "Witty Wizard blog",
> > "http://wittywizard.org/wt/blog", "Witty Wizard Content Management System
> > (CMS)");
> > env.server()->addResource(&rssFeed, "/wt/blog/feed/");
> >
> > Is this the correct way to call addResource from the Constructor of home?
> >
> > Thanks for any help.
> >
> >
> > ------------------------------------------------------------------------------
> > Subversion Kills Productivity. Get off Subversion & Make the Move to
> > Perforce.
> > With Perforce, you get hassle-free workflows. Merge that actually works.
> > Faster operations. Version large binaries. Built-in WAN optimization and
> > the
> > freedom to use Git, Perforce or both. Make the move to Perforce.
> > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> > _______________________________________________
> > witty-interest mailing list
> > witty-interest@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/witty-interest
> >
>
> ------------------------------------------------------------------------------
> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries. Built-in WAN optimization and the
> freedom to use Git, Perforce or both. Make the move to Perforce.
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest