Richard, 2009/4/8 Richard Ulrich <[email protected]>: > Has anybody here experience with running wt inside a Windows Service?
We did not yet do that. > I started playing around with Wt::WServer, but then I realized that > dealing with Windows Services natively is a lot harder then it used to > be when I worked with Borland's C++ Builder. > So, I based my work on the "Service Framework Library for Native Windows > Service Applications" from > http://www.codeguru.com/cpp/w-p/system/services/article.php/c14503__2/ > At the moment, the service starts, but connecting to it's port doesn't > create a new application instance, and thus leads to a timeout in the > browser. That is strange... a service is not that much different from a normal application... > Also what is not sactisfactory at the moment is that I have to pass the > arguments everytime I start the service. Wt can read its startup options from a configuration file. The configuration file is in boost.option format, e.g.: docroot = . http-address = 0.0.0.0 http-port = 8080 WServer::setServerConfiguration()'s third parameter points to the location of this file to use. Is your macro WTHTTP_CONFIGURATION correctly defined? /etc/wt/whttp is not a very windows-style path. > So my main question is, if someone already went through all this, and if > not if people here would be interested in the solution in the form of a > Wt::WWindowsService class or a wiki documentation. > I'm interested in it, as I can imagine that it is a preferred way to manage the automated starting/stopping of a Wt application on a windows machine. > So here are the interesting parts: > // service_testrun.bat : > sc.exe create Nightly binPath= "C:\PL_VC8\Installer\NightlyBuildSuccess > \bin\Release\NightlyBuildSuccessService.exe" > sc.exe start Nightly --docroot "C:\PL_VC8\Installer\NightlyBuildSuccess > \res" --http-address 0.0.0.0 --http-port 8080 --config "C:\PL_VC8 > \Installer\NightlyBuildSuccess\wt_config.xml" > pause > sc.exe stop Nightly > sc.exe delete Nightly > > // gives me the following log : > 2009-Apr-08 10:16:27 initializing > 2009-Apr-08 10:16:27 -> Nightly > 2009-Apr-08 10:16:27 -> --docroot > 2009-Apr-08 10:16:27 -> C:\PL_VC8\Installer\NightlyBuildSuccess\res > 2009-Apr-08 10:16:27 -> --http-address > 2009-Apr-08 10:16:27 -> 0.0.0.0 > 2009-Apr-08 10:16:27 -> --http-port > 2009-Apr-08 10:16:27 -> 8080 > 2009-Apr-08 10:16:27 -> --config > 2009-Apr-08 10:16:27 -> C:\PL_VC8\Installer\NightlyBuildSuccess > \wt_config.xml > 2009-Apr-08 10:16:27 Service started > 2009-Apr-08 10:27:33 Service stopped > So you never see 'creating application' even when you're surfing to the page? Did you manage to get any further in the meantime? Regards, Wim. ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
