Author: mladen.turk(a)jboss.com
Date: 2007-10-12 07:38:01 -0400 (Fri, 12 Oct 2007)
New Revision: 1107
Modified:
trunk/sight/java/org/jboss/sight/Library.java
Log:
Make Library calls synchronized on Library Class
Modified: trunk/sight/java/org/jboss/sight/Library.java
===================================================================
--- trunk/sight/java/org/jboss/sight/Library.java 2007-10-12 11:35:20 UTC (rev 1106)
+++ trunk/sight/java/org/jboss/sight/Library.java 2007-10-12 11:38:01 UTC (rev 1107)
@@ -35,7 +35,7 @@
/* Default library names */
private static String [] NAMES = {"sight-1", "libsight-1"};
- private static Object lock = new Object();
+
/*
* A handle to the unique Library singleton instance.
*/
@@ -116,7 +116,7 @@
static public boolean initialize(String libraryName)
throws Exception
{
- synchronized(lock) {
+ synchronized(Library.class) {
if (_instance == null) {
if (libraryName == null)
_instance = new Library();
@@ -155,7 +155,7 @@
static public void shutdown()
throws Exception
{
- synchronized(lock) {
+ synchronized(Library.class) {
try {
if (_instance != null) {
terminate0();
@@ -189,7 +189,7 @@
static public void clear()
throws Exception
{
- synchronized(lock) {
+ synchronized(Library.class) {
if (_instance != null) {
clear0();
/* Reinitialize Runtime objects */
Show replies by date