Announcement Announcement Module
No announcement yet.
setLimitCount() in SearchControls Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • setLimitCount() in SearchControls

    Hello LDAP Guru,

    After doing setLimitCount(10), spring LDAP throws sizelimitexceededexception, because LDAP server has some more entities to send.
    I would like to know is that is there any way to ignore this exception just like Spring does for partialresultexception? I would not want to make modifications to ldaptemplate code and rebuild the jar.

    As an alternative I thought of using PagedResults, but I could not get how to get those in sorted order.

    Btw, thanks for keeping this piece open source, it helped me understand spring ldap architecture very fast.

    I will appreciate your inputs.

    Thanks in advance,

  • #2
    I extended SortControlDirContextProcessor, and configured two controls in preProcess() method...
    1) SortControl
    2) PageControl

    Please let me know if there is any other better way to handle this.


    • #3
      A more elegant way, perhaps, would be to use the AggregateDirContextProcessor and configure it with a SortControlDirContextProcessor and a PagedResultsDirContextProcessor.


      • #4
        Yeah... you are right!!! I guess I missed on this class somehow, Thanks Ulsa


        • #5
          Hi there,

          I'm having the same issue as sumedhsakdeo, but I'm pretty new to Spring LDAP (and LDAP in general actually), and I can't figure out how to use those DirContextProcessor in order to limit the number of results returned...

          Could you guys help me out here?

          Will very much appreciate any input



          • #6
            Hi there,

            Actually I figured it out, instead of using PagedSearch (which would work but isn't exactly the wanted behaviour, more like a workaround), I'm using SearchControls and CollectingNameClassPairCallbackHandler.