Announcement Announcement Module
Collapse
No announcement yet.
setLimitCount() in SearchControls Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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,
    Sumedh

  • #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.

    Comment


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

      Comment


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

        Comment


        • #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

          Thanks!

          Comment


          • #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.

            Comment

            Working...
            X