Hi, I was browsing through the Tomcat Native source code and noticed the
Shared memory and Mutex Java classes.
So, I tried creating a quick prototype and to my pleasant surprise it worked
off the bat on 64 bit Windows 7 . I tried the jni/Shm.java and
jni/Global.java classes to share memory between 2 processes coordinated by a
mutex.
I'm writing to understand:
1. Why the jni/Shm.java and jni/Global.java are not used in the Tomcat
codebase
2. Have they been superseded by something else like NIO Mmap files or
something?
3. Is this code going to be deprecated or go out of maintenance since it
is not used? I do not even see test cases for these except for
jni/Address.java and jni/Socket.java
4. Does this work well on Linux too?
5. Are there any performance considerations, gotchas etc - considering
that this is an internal module with "light" documentation?
For the curious, here is the test code I wrote (CC BY-SA)
https://gist.github.com/2c3acac03cf954f68001. I would be overjoyed if this
was incorporated into the unit tests for Tomcat Native.
Thanks,
Ashwin Jayaprakash (http://www.ashwinjayaprakash.com)