jean-frederic clere wrote:
I think there's a small misunderstanding. I don't plan to use procrun at the moment for Tomcat 4.1. I'll start with Tomcat 5, where there's only the Bootstrap class (no BootstrapService), which, I might add, may very well go away, replaced by some fancy JMX loader.Mladen Turk wrote:-----Original Message----- From: jean-frederic clereIt has:
--StartupClass -> called when hit Service start. --ShutdownClass -> called when you hit Stop service...
The idea is the following:
--InitClass -> called when starting
Change user to a non-privileged user (like nobody/nodoby I have seen something like that in cygwin so that must also exist in win32 API). --StartupClass -> really start the service. --ShutdownClass -> shutdown the service (something like a suspend). --DestroyClass -> cleanup.
Couple of questions: 1. Is the InitClass present during entire service life cycle, or it returns after the call?
Sorry I have missed my explainations:
The InitClass/StartupClass/Shutdown/DestroyClass should be methods of one class that provide the service.
Init must return after finishing (blocking).
Startup that is more complicated in the Daemon it returns and the threads are created inside the Startup method. But if we call a main it will not return...
Shutdown must return.
Destroy ... Well should also return and block.
Anyway, for now, to use the service mode in TC 5, you have to use different command line parameters ("startd" and "stopd").
We can backport procrun to TC 4.1 later.
I really doubt you can do that. Maybe Cygwin is using some custom code there.Basically do we need to call that (InitClass and StartupClass) from separate threads. 2. What do you mean by changing the user after the call to InitClass?
The idea is to make sure that a Web application is runned on non-privileged user (like httpd). The idea is that the OS should prevent "critical" file beeing modified or read in a Web application.
Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]