[Date Prev][Date Next] [Chronological] [Thread] [Top]

JLDAP problem



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