On Wed, 20 Feb 2002, Patrick Luby wrote:

> > 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.
> > 
> 
> This is very true and was the reason I was pursuing the "public native" method
> approach. But Pier mentioned and passing a callback function to the JVM when he
> starts it. Maybe Pier could elaborate on this process? Basically, for Pier's
> callback approach to work, the callback function would need to be tied to
> invocation of the StandardServer.initialize() method. I haven't used any
> callbacks like he describes so I am curious about the mechanics.

1. I think combining the wrappers ( any of them ) with the 
platform-specific native code used inside tomcat is _bad_. 
One of the good  things  about tomcat is that it can be started/mebedded 
in many different ways. Creating a small jni library is quite trivial - 
MacOS may be different, but I'm sure they provide a way and we can 
support it ( if we want in-process and unix sockets there we'll
have to do it anyway - that's jni based ). Keep them separated - 
it's more flexible.

2. The 'normal' way to do this, used by all unix daemons, by
all other java servers ( including JavaWebServer and any other
containers except tomcat ) is to use a (jni) call to chuid. 
It works, it's tested and clean.
I'm sure this can be obfuscated or done using whatever callbacks 
mechanism ( opening all the resource in the wrapper, etc) , but doing it 
in the natural way is better IMHO. 


Costin









--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to