Sharing Native Library from parent classloader?

2010-08-07 Thread Brock Noland
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


DO NOT REPLY [Bug 49234] JMX Descriptor Modifications

2010-08-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49234

chamith buddhika  changed:

   What|Removed |Added

  Attachment #25837|0   |1
is obsolete||

--- Comment #73 from chamith buddhika  2010-08-07 
22:04:13 EDT ---
Created an attachment (id=25862)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25862)
o.a.Catalina.Core Operations Third Patch

This patch adds to addChild method in ContainerMBean and does some adding and
redorderings to the o.a.c.Core descriptor.

- Start Tomcat
- Via JMX, select the host

- Create a new context   > addChild 

- Configure it to serve content (e.g. from an external directory) ---> Other
descriptor methods in StandardContext

- Start it  --> start/ startChild methods

- Check the content is accessible  --> Currently not sure how this can be done

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org