User: ejort Date: 02/03/29 04:14:35 Modified: src/main/test/compliance/monitor/support CounterSupport.java GaugeSupport.java MonitorSupport.java StringSupport.java Log: Merge differences between RelMX_1_0_0_13 and RelMX_1_0_0_14 to head Revision Changes Path 1.3 +2 -8 jmx/src/main/test/compliance/monitor/support/CounterSupport.java Index: CounterSupport.java =================================================================== RCS file: /cvsroot/jboss/jmx/src/main/test/compliance/monitor/support/CounterSupport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CounterSupport.java 24 Mar 2002 13:12:13 -0000 1.2 +++ CounterSupport.java 29 Mar 2002 12:14:34 -0000 1.3 @@ -15,15 +15,9 @@ public Number getValue() { + unlock("get"); lock("get"); - try - { - return value; - } - finally - { - unlock("get"); - } + return value; } public void setValue(Number value) 1.3 +2 -8 jmx/src/main/test/compliance/monitor/support/GaugeSupport.java Index: GaugeSupport.java =================================================================== RCS file: /cvsroot/jboss/jmx/src/main/test/compliance/monitor/support/GaugeSupport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- GaugeSupport.java 24 Mar 2002 13:12:13 -0000 1.2 +++ GaugeSupport.java 29 Mar 2002 12:14:34 -0000 1.3 @@ -15,15 +15,9 @@ public Number getValue() { + unlock("get"); lock("get"); - try - { - return value; - } - finally - { - unlock("get"); - } + return value; } public void setValue(Number value) 1.3 +10 -4 jmx/src/main/test/compliance/monitor/support/MonitorSupport.java Index: MonitorSupport.java =================================================================== RCS file: /cvsroot/jboss/jmx/src/main/test/compliance/monitor/support/MonitorSupport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- MonitorSupport.java 24 Mar 2002 13:12:13 -0000 1.2 +++ MonitorSupport.java 29 Mar 2002 12:14:34 -0000 1.3 @@ -11,25 +11,31 @@ public class MonitorSupport { - String last = "get"; + boolean done = false; + String last = "set"; public synchronized void lock(String who) { - if (last.equals(who)) + if (!done && last.equals(who)) { try { wait(MonitorSUITE.MAX_WAIT); } catch (InterruptedException e) {} - if (last.equals(who)) + if (!done && last.equals(who)) throw new RuntimeException("-- Time Out --"); } } public synchronized void unlock(String who) { - if (last.equals(who)) + if (!done && last.equals(who)) throw new RuntimeException("-- Synchronization failure --"); last=who; + notifyAll(); + } + public synchronized void end() + { + done = true; notifyAll(); } } 1.3 +2 -9 jmx/src/main/test/compliance/monitor/support/StringSupport.java Index: StringSupport.java =================================================================== RCS file: /cvsroot/jboss/jmx/src/main/test/compliance/monitor/support/StringSupport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- StringSupport.java 24 Mar 2002 13:12:13 -0000 1.2 +++ StringSupport.java 29 Mar 2002 12:14:34 -0000 1.3 @@ -15,20 +15,13 @@ public String getValue() { + unlock("get"); lock("get"); - try - { - return value; - } - finally - { - unlock("get"); - } + return value; } public void setValue(String value) { - lock("set"); this.value = value; }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development