On Wed, 20 Feb 2002, Pier Fumagalli wrote: > The only code working is within Tomcat, and it's there already... Look at > the API changes in the Connector I pointed out yesterday, and at the > different Embedded solutions (like the one Remy did for Win32 services)... > The java code is there, the entry points are all there... All we need is a > JNI wrapper/invocator which loads the VM, calls initialize(), sets the > UID/GID, calls(start), wait for a signal, calls stop()...
That wouldn't work - if the UID is changed before starting tomcat, then it can't listen on port 80. The uid must be changed after it start listening, like any unix program does. And the wrapper/invocator is just one way to start tomcat - I like the flexibility on startup. > implementation, but just comment on the idea... Calling setuid() from Java > is crap (design wise), because it's against all design principles Java is > based on... It's not portable, and there is already a much better > alternative that is completely platform independant... Someone just needs to > make it work (I'd give a one-week time to a guy like you to make it run :) I don't think Java means you shouldn't take advantage of the platform features. You can write platform independent code that is smart enough to detect the environment and use it, and provide fallback solutions. > > - Add a "public static native" method in DaemonLoader.java The setuid class should be independent of DaemonLoader IMHO, people are using all kind of different 'deamon loaders' to start tomcat ( the sourceforge wrapper, javaService, etc ). Deamon is just one of them. Costin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>