Hi everybody,

I m working on an application that will listen to LDAP server (IBM Tivoli) and detect changes to LDAP entries.
I saw the SearchPersist example and done the same:

http://developer.novell.com/documentation/samplecode/jldap_sample/controls/SearchPersist.java.html

This example works fine as a standalone Java application. But when I try to make this a scheduled quartz job and deploy my application as an Enterprise Application to IBM Websphere ESB server, this line does not work:

// Asynchronous
queue = lc.search(searchBase, // container to search
                    LDAPConnection.SCOPE_SUB, // search container's subtree
                    "(objectClass=*)", // search filter, all objects
                    attrs, // don't return attributes
                    false, // return attrs and values, ignored
                    null, // use default search queue
                    constraints); // use default search constraints

When I debug, the thread hangs here. And right now I cannot debug the JLDAP itself because my .class files was not produced with line number info.
Synchronous version of the method works fine:

LDAPSearchResults results = lc.search(searchBase,
                    LDAPConnection.SCOPE_SUB,
                    "(objectClass=*)",
                    attrs,
                    false
                    );

I guess that the quartz scheduler is creating a seperate thread and the asynch version of the method doesnt work. But I m not sure what actually is happening.

Am I doing something wrong? Is it possible to use the asynch search method in a scheduled job? (And the app is deployed to ESB server but that may not be relevant to my problem.)
Ask me and I can give more details about the application, if needed.

Any help is appreciated.

Bahadır Konu