users@glassfish.java.net

cluster wide libraries

From: Saloustros Georgios <gesalous_at_gmail.com>
Date: Tue, 18 Dec 2007 21:12:51 +0200

Hello.
I have deployed a web service that in a standalone glassfish setup .
In the web service code I do the following

class myservice{
public boolean loaded = false;
web_service do_something(){

.....
if(! loaded){
System.load("mylib");
loaded=true;
}

....
}

}
and the lib mylib are in <glassfish_home_directory>/lib
In the standalone version everything runs fine.
Now I have setup a 2 node cluster with sun web server configured as the http
load balancer and the service is enabled for all instances.
The problems now are these:
1)Where should I put the lib mylib in order to both instances find and load
the library?
2)If instance 1 loads the library and sets the flag value to true will the
other instance see the flag value loaded=true or will see the default value
loaded=false?
3)Is there any better way to load the needed .so libray?
Thanks