From: Julio G. <ju...@us...> - 2004-04-15 16:25:07
|
Update of /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/examples/dynamicwebserver/thresholder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22669/smartfrog/src/org/smartfrog/examples/dynamicwebserver/thresholder Modified Files: ThresholderImpl.java Log Message: Added: SmartFrogRuntimeException to sfAddAttribute, sfRemoveAttribute, sfReplaceAttribute Index: ThresholderImpl.java =================================================================== RCS file: /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/examples/dynamicwebserver/thresholder/ThresholderImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ThresholderImpl.java 15 Mar 2004 19:17:14 -0000 1.2 --- ThresholderImpl.java 15 Apr 2004 16:24:57 -0000 1.3 *************** *** 40,43 **** --- 40,44 ---- import org.smartfrog.sfcore.reference.Reference; import org.smartfrog.sfcore.reference.ReferencePart; + import org.smartfrog.sfcore.common.*; /** *************** *** 197,211 **** public void setMinInstances(int i) { synchronized (setInstancesLock) { ! if (i < 0) { minInstances = 1; ! } else { minInstances = i; sfReplaceAttribute(MININSTANCES, new Integer(minInstances)); ! } ! logger.logOptional(name, "set minimum instances to " + ! minInstances); ! setTargetInstances(targetInstances); } } --- 198,218 ---- public void setMinInstances(int i) { synchronized (setInstancesLock) { ! try { ! if (i < 0) { minInstances = 1; ! } ! else { minInstances = i; sfReplaceAttribute(MININSTANCES, new Integer(minInstances)); ! } ! logger.logOptional(name, "set minimum instances to " + ! minInstances); ! setTargetInstances(targetInstances); ! } ! catch (Exception ex) { ! logger.log(name,"Trying set minimum instances to "+minInstances + ". "+ex.toString()); ! } } } |