Henri,
I emailed the developer of Easy Posix (Greg Guerin). Turns out that its current implementation is dependent upon "Ten" , a Mac OS X package for MacJVM, so it is not deployable in the standard Linux OS.
From my conversation with him, he spoke that he is planning to develop a straight JNI implementation of the EasyPosix interfaces in the future, but that if others went that route earlier he would have an interest.
As there has already been much work in the JNI area with daemon, this would certainly seem an interesting co-evolution. Perhaps daemon could grow into quite a powerful java based service environment with the addition of a JNI Implementation of EasyPosix?!
Cygwin supports a wide array of posix functions, and making sure the implementation of EasyPosix that worked on cygwin as well would provide a port of these functions to Windows via Cygwin.
Perhaps, even a "standard" could evolve to support a specific subset of posix-like Functions. Using something like EasyPosix as a guide, a java program (daemon or not) that needed greater access to POSIX functions could be ported to any system that EasyPosix was supported on, completely independent of its implementation on that system. It would possibly make "java services" quite cross-platform for at least in the unix/linux/darwin/cygwin world.
Another point of interest: If JPackage produced a Tomcat RPM based on the current implementation of daemon and another implementation of daemon based on EasyPosix were developed. It would be easy to adapt to such a change. In the end, this would possibly make EasyPosix the means by which daemon could be ported to Darwin/Mac without the wieght of compiling or porting a JNI implementation.
-Mark
Henri Gomez wrote:
I didn't track jakarta-commons-daemon but I know many of you here which are subscribed to it.
What do you think of easyposix ?
http://www.amug.org/~glguerin/sw/easyposix/overview.html
Couldn't it be a nice add-on for daemon ?
It's still related to tomcat since I need a very complete java service launcher for tomcat, and this easyposix as very nice features.
Comments welcomed
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Greg Guerin wrote:
> The supplied code only provides a Mac OS X implementation. That
> implementation uses JDirect-3, which is an Apple-specific means to call
> arbitrary native-code functions directly from Java, without an intervening
> JNI layer.
>
> All other platforms will need a JNI implementation for that platform.
> Absent a JNI implementation, the "unimplemented" implementation is used,
> i.e. UnPosix. See the docs for UnPosix for more details.
>
> You could pattern a JNI imp off the Mac OS X imp. The mapping of the Mac
> OS X implementation to JNI functions, and the bodies of the JNI functions
> themselves, should be fairly straightforward. That's because all the
> 'native' methods in the Ten class are essentially the names of C functions
> in the BSD/Posix library. Getting the callbacks right is a little
> trickier, but well within the skill-set of a capable JNI programmer.
>
> FYI, I have "write Easy Posix JNI imp" on my list of projects to do, but
> it's several items down in the queue right now, and at least a couple
> months or more away from getting to the head of the queue. The source may
> not be instantly portable to Linux, but it shouldn't be so different that
> it would be useless as a starting point. Or, if you wrote a JNI imp for
> Linux before I get to the JNI imp for Mac OS X, I wouldn't mind the
> positions being reversed.
>
>
>
>
>>On another note, Apache has another package they've been working on that
>>is a java based "daemon" for running Java programs as daemons on both
>>Unix and Windows.
>>
>>http://jakarta.apache.org/commons/sandbox/daemon/
>>
>>Henri Gomez (of www.jpackage.org - the packagers of the tomcat and other
>>java based rpm's) and I reviewed your site and suggested to both Apache
>>and JPackage that they should seriously take a look at your package as
>>an additional tool for controlling Java based Daemons.
>>
>>While I am not actually an Apache developer, I have a great interest in
>>the organization, regularly use the tools they develop and often try to
>>make recommendations to improve the tools. I try to provide avenues for
>>improvement when I see external open source tools that are benificial. I
>>think the Apache Jakarta Commons project "Daemon" is a good start, and a
>>natural growth for a generic tool out of the Tomcat source-base, but its
>>obvious that your package captures alot more functionality above and
>>beyond that of "Daemon".
>
>
> That makes sense, since I was interested in the underlying POSIX facilities
> themselves, not the nature of the program (deamon vs. non-daemon) that
> called the POSIX facilities. The daemonic nature is a different question
> altogether. Not unimportant, just different.
>
> -- GG
>
>
>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
