Hello,

I have a legacy application written in C.  The library is wrapped in JAVA as
the supporting applications are all JAVA based. The problem we are running
into is that although the library is thread safe the java wrapper is not.
 Changing the wrapper would be a major change. As such, we have to run many
JVMs on a single host which is eating memory like crazy.  We have tens of
thousands of these JVMs. My goal is to wrap around the non-thread safe
wrapper and reduce JVM overhead.

I remembered that Tomcat had different class loaders for each web
application and have successfully been able to load two different wrappers
from two "applications."  However, I cannot load the native library in the
two classloaders. I understand this is JVM limitation. I do wonder, however,
if I can load the library in a parent class loader?  I have tried this but I
am getting UnsatisfiedLinkError when the native methods are called.

Is there any workaround for this?  I see tomcat uses some native APR library
and I was wondering if you have found a workaround? I see towards the bottom
of this bug report, someone seems to have a hack regarding System.out.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4225434

That probably would not fly for me.

Thanks for your time,
Brock Noland

Reply via email to