*/
protected String connectionTimeout = "5000";
+ /**
+ * The sizeLimit (also known as the countLimit) to use when the realm is
+ * configured with {@link #userSearch}. Zero for no limit.
+ */
+ protected long sizeLimit = 0;
+
+ /**
+ * The timeLimit (in milliseconds) to use when the realm is configured with
+ * {@link #userSearch}. Zero for no limit.
+ */
+ protected int timeLimit = 0;
+
// ------------------------------------------------------------- Properties
/**
}
+ public long getSizeLimit() {
+ return sizeLimit;
+ }
+
+
+ public void setSizeLimit(long sizeLimit) {
+ this.sizeLimit = sizeLimit;
+ }
+
+
+ public int getTimeLimit() {
+ return timeLimit;
+ }
+
+
+ public void setTimeLimit(int timeLimit) {
+ this.timeLimit = timeLimit;
+ }
+
+
/**
* Return descriptive information about this Realm implementation and
* the corresponding version number, in the format
constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
}
+ constraints.setCountLimit(sizeLimit);
+ constraints.setTimeLimit(timeLimit);
+
// Specify the attributes to be retrieved
if (attrIds == null)
attrIds = new String[0];
Log a warning if context.xml files define values for properties that do
not exist (e.g. if there is a typo in a property name). (markt)
</fix>
+ <add>
+ <bug>50541</bug>: Add support for setting the size limit and time limit
+ for LDAP seaches when using the JNDI Realm with <code>userSearch</code>.
+ (markt)
+ </add>
</changelog>
</subsection>
<subsection name="Coyote">
to be searched.</p>
</attribute>
+ <attribute name="sizeLimit" required="false">
+ <p>Specifies the maximum number of records to return when using the
+ <code>userSearch</code> attribute. If not specified, the default of
+ <code>0</code> is used which indicates no limit.</p>
+ </attribute>
+
+ <attribute name="timeLimit" required="false">
+ <p>Specifies the time (in milliseconds) to wait for records to be
+ returned when using the <code>userSearch</code> attribute. If not
+ specified, the default of <code>0</code> is used which indicates no
+ limit.</p>
+ </attribute>
+
<attribute name="userBase" required="false">
<p>The base element for user searches performed using the
<code>userSearch</code> expression. Not used if you are using