The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


JNI and threading

Posted by Sylvain Fourny on May 18, 2001 at 5:37 AM


In my client/server application (developped with RMI), my server
use methods in a shared C/C++ library to get data and to answer
to the client wishes. So I use JNI to communicate with this library.
I've got a first function that initialize Global variables in my library
and send data. And another one that use this Global variables
initialized and parameters from the client to calculate a result.
The problem is when there is more than one user.
There is as much thread as client on the server but the
library is loaded only one time.
So my Global variables are the same for all my thread...
I can't change my native library (huge...).
Can someone help me ??


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us