The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

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.

Message:

JNI and threading

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

Hi,

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 ??
-Sylvain-



Replies:

Sponsored Links



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