ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilter.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilter.java (file contents):
Revision 1.32 by tdb, Wed Mar 14 23:25:29 2001 UTC vs.
Revision 1.33 by tdb, Fri Mar 16 15:16:01 2001 UTC

# Line 74 | Line 74 | public class RootFilter implements Component {
74          if (dbInterface != null) {
75              ciDB = ClientInterfaceHelper.narrow(_refman.getCORBARef("iscream.ClientInterface." + dbInterface));
76          }
77 <
77 >        
78          // setup a queue
79 <        Queue queue = new Queue();
79 >        Queue queue;
80 >        // see if this Queue needs a size limit
81 >        try {
82 >            int queueSizeLimit = Integer.parseInt(cp.getProperty(configName, "Queue.SizeLimit"));
83 >            String queueRemoveAlgorithm = cp.getProperty(configName, "Queue.RemoveAlgorithm");
84 >            int algorithm = StringUtils.getStringPos(queueRemoveAlgorithm, Queue.algorithms);
85 >            if(algorithm != -1) {
86 >                queue = new Queue(queueSizeLimit, algorithm);
87 >            }
88 >            else {
89 >                _logger.write(toString(), Logger.WARNING, "Bad Queue Algorithm configuration, not known: "+queueRemoveAlgorithm);
90 >                // just don't activate a limit
91 >                queue = new Queue();
92 >            }
93 >            
94 >        } catch (PropertyNotFoundException e) {
95 >            _logger.write(toString(), Logger.DEBUG, "Optional config not set: "+e);
96 >            // just don't activate a limit
97 >            queue = new Queue();
98 >        } catch (NumberFormatException e) {
99 >            _logger.write(toString(), Logger.WARNING, "Bad Queue SizeLimit configuration: "+e);
100 >            // just don't activate a limit
101 >            queue = new Queue();
102 >        }
103          
104          // startup a monitor on this queue
105          try {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines