[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
JLDAP problem
- To: openldap-technical@openldap.org
- Subject: JLDAP problem
- From: Bahadir Konu <bah.konu@gmail.com>
- Date: Fri, 13 Apr 2012 09:21:11 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=QCqPhs2e8uezCHDXXyljyh/lupc3xcF03ZbT/xk3YkE=; b=e0Ve2jT3WT6deBSNAcnMNiisIdU2RlKfyZD0lvbq7a3pUYJDpMyMW8aoAj5pcMKkfC NCnGVzsAKPQVOstSLFw5Jhof0c+74NU246fR/pgGtHWfsR1OXUDwok7yjiOrdneu5Zru ArcM3iUo/T1EumWKnqZU+iw1bdNFLGc+7IUvjBPwS8Cs7Da4hPqcjgzl9B5cAPV1bJkG /GnzndkXoC1JyR3oyXK/qWz6CYhtUihDfZp/Jiz26EgZU6VHhgRAxahX5UClAOBPQSE+ ZD/IvwKf41xHPtTcdHYKMGBAvY7yVrgr47s7cNhfctZghV75inBRUQkoC4Lt9CwDUtxa /FCw==
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