Result [VOTE] Release of Apache Directory Server 2.0.0-M16, take 2

2014-03-12 Thread Emmanuel Lécharny
I close the vote with 5 +1 :

* Felix
* Kiran
* Pierre-Arnaud
* Stefan
and me.

I'll do the upload and update the web site today.

Thanks !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 



Re: Result [VOTE] Release Apache Mavibot 1.0.0-M4

2014-03-12 Thread Pierre-Arnaud Marcelot
Same comment as previous mail.

Great to see Mavibot continue to move forward! :)

Regards,
Pierre-Arnaud


On 12 Mar 2014, at 09:10, Emmanuel Lécharny  wrote:

> Hi,
> 
> I'm closing this vote, we received 4 +1 :
> 
> - Felix
> - Kiran
> - Stefan
> and me
> 
> I'll update the site and move the released package to the servers.
> 
> I'll do the annoncement tomorrow.
> 
> 
> Le 3/9/14 8:28 AM, Emmanuel Lécharny a écrit :
>> Hi !
>> 
>> This is the forth release of Apache Mavibot, the MVCC BTree in Java !
>> 
>> This version brings some new improvements in the API and the
>> performances. The In-memory and Persisted B-trees classes have
>> been moved into the same package, to avoid exposing the methods
>> to the external world. We also have shared the common methods.
>> 
>> Some specific exceptions have been created.
>> 
>> This is by far not the latest milestone, the next one will bring
>> major changes : revisions support, transaction support.
>> 
>> ApacheDS has already been tested with Mavibot 1.0.-M4-SNAPSHOT.
>> 
>> Here are the list of fixed issues :
>> 
>> Bug
>> ---
>> 
>>[MAVIBOT-20] - Btree created with the duplicateValues flag to false
>> still accept duplicate values
>> 
>> Improvements
>> 
>> 
>>[MAVIBOT-25] - Don't update the RMHeader for each free page we get
>>[MAVIBOT-27] - Aggregate the Persisted and InMemory common methods
>>[MAVIBOT-28] - Move the Persited and InMemory classes into the same
>> package
>>[MAVIBOT-29] - Use a BtreeFactory to create BTrees
>>[MAVIBOT-30] - Replace the RuntimeException by specific exceptions
>>[MAVIBOT-33] - Serializer and comparator should be static instances
>> 
>> 
>> 
>> So let's vote now !
>> 
>> 
>> The revision :
>> 
>> http://svn.apache.org/r1574993
>> 
>> 
>> The SVN tag:
>> http://svn.apache.org/repos/asf/directory/mavibot/tags/1.0.0-M4/
>> 
>> The source and binary distribution packages:
>> http://people.apache.org/~elecharny/
>> 
>> The staging repository:
>> https://repository.apache.org/content/repositories/orgapachedirectory-1001/
>> 
>> 
>> Please cast your votes:
>> [ ] +1 Release Mavibot 1.0.0-M4
>> [ ] 0 abstain
>> [ ] -1 Do not release Mavibot 1.0.0-M4
>> 
>> 
> 
> 
> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com 
> 



Re: Result [VOTE] Release of LDAP API 1.0.0-M21

2014-03-12 Thread Pierre-Arnaud Marcelot
I missed this vote but obviously it has my late +1.

Congrats on this new version being released! :)

Regards,
Pierre-Arnaud


On 12 Mar 2014, at 09:10, Emmanuel Lécharny  wrote:

> Hi,
> 
> I'm closing this vote, we received 4 +1 :
> 
> - Felix
> - Kiran
> - Stefan
> and me
> 
> I'll update the site and move the released package to the servers.
> 
> I'll do the annoncement tomorrow.
> 
> 
> 
> Le 3/8/14 4:48 PM, Emmanuel Lécharny a écrit :
>> Hi,
>> 
>> This is a vote for the 21th milestone of the 1.0.0 LDAP API/Shared,
>> 1.0.0-M21.
>> 
>> It's a bug fix release, and it will be followed by a release of
>> ApachedDS 2.0.0-M16 this afternoon.
>> 
>> It contains a few bug fixes and improvements :
>> 
>> 
>> Bugs
>> 
>> 
>>  * [DIRAPI-126 ] -
>> Timeout Exception on bind while pwdExpireWarning period
>>  * [DIRAPI-128 ] -
>> FilterEncoder.format() should accept String varargs
>>  * [DIRAPI-152 ] -
>> Attribute.toString() method appends newline
>>  * [DIRAPI-157 ] -
>> Calling the add() method with a multi-value attribute and a null value
>> throws an NPE
>>  * [DIRAPI-160 ] -
>> DSML engine is not setting the 'requestID' value in BatchResponse when
>> output stream instance is provided
>>  * [DIRAPI-161 ] -
>> Timeout does not apply to connect method
>>  * [DIRAPI-173 ] -
>> When using TLS and multiple binds, LdapNetworkConnection attempts to
>> start TLS multiple times
>>  * [DIRAPI-176 ] -
>> LDIFReader does not accept empty DN (rootDSE)
>> 
>> 
>> Improvements
>> 
>> 
>>  * [DIRAPI-137 ] -
>> Add Control support for RFC 2891 - LDAP Control Extension for Server
>> Side Sorting of Search Results http://www.faqs.org/rfcs/rfc2891.html
>>  * [DIRAPI-153 ] -
>> Implement efficient reuse of schema loading
>>  * [DIRAPI-159 ] -
>> Add a method to set a SchemaManager in LdapConnection
>>  * [DIRAPI-169 ] -
>> Formalize the contract of PasswordPolicyResponse by stating that -1 is
>> returned if no value is set.
>>  * [DIRAPI-170 ] -
>> Allow StandaloneLdapApiServices to be configured without system properties
>>  * [DIRAPI-175 ] -
>> LdifReader should handle empty
>> 
>> New Feature
>> ---
>> 
>>  * [DIRAPI-143 ] -
>> Add Controls to support server-side sorting
>> 
>> 
>> The revision :
>> 
>> http://svn.apache.org/r1574930
>> 
>> The SVN tag:
>> http://svn.apache.org/repos/asf/directory/shared/tags/1.0.0-M21
>> 
>> The source and binary distribution packages:
>> http://people.apache.org/~elecharny/
>> 
>> The staging repository:
>> https://repository.apache.org/content/repositories/orgapachedirectory-1000
>> 
>> 
>> Please cast your votes:
>> [ ] +1 Release Shared/LDAP API 1.0.0-M21
>> [ ] 0 abstain
>> [ ] -1 Do not release Shared/LDAP API 1.0.0-M21
>> 
>> 
>> Emmanuel
>> 
>> --
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.iktek.com
>> 
>> 
> 
> 
> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com 
> 



Re: [VOTE] Release of Apache Directory Server 2.0.0-M16, take 2

2014-03-12 Thread Pierre-Arnaud Marcelot
[X] +1 : release ApacheDS 2.0.0-M16

Regards,
Pierre-Arnaud

On 10 Mar 2014, at 15:39, Emmanuel Lécharny  wrote:

> Hi,
> 
> This is a replacement for the release done last saturday, as the two 
> following 
> critical bugs were found and fixed :
> 
> Bugs
>  
> 
>[DIRSERVER-1962] - Replication Consumer "Enabled" checkbox not working
>[DIRSERVER-1963] - Add contextCSN attribute to the list of ignored 
> attributes in ReplicationConsumerImpl
> 
> 
> I restart the vote, the original contain remains the same :
> 
> 
> it's time for a long expected release of ApacheDS, version 2.0.0-M16.
> We postponed this release expecting to get a release candidate out,
> but at this point, we are depending on Mavibot, and it's not ready.
> 
> This release fixes many critical bugs.
> 
> We also have done some cleanup in the Kerberos server.
> 
> The list of fixed bugs and improvments is the following :
> 
> Bugs
> 
> 
>[DIRSERVER-1092] - org.apache.directory.server.dns.store.RecordStore
> not support ordered multiple resource record answers
>[DIRSERVER-1252] - Server tools dump command broken due to use of
> old paths
>[DIRSERVER-1412] - Modifying the schema with more than one mod may fail
>[DIRSERVER-1471] - Providing a right fix for DIRSERVER-1459
>[DIRSERVER-1761] - Unable to use external keystore for SSL
>[DIRSERVER-1810] - Test case
> org.apache.directory.server.replication.ClientServerReplicationIT.testModDn()
> fails permanently
>[DIRSERVER-1845] - Sporadic failure on CollectivAttributeServiceIT
>[DIRSERVER-1855] - java.lang.IllegalStateException: Can't overwrite
> cause at
> org.apache.directory.server.core.authz.GroupCache.initialize(GroupCache.java:190)
>[DIRSERVER-1860] - Invalid DN in returned entry
>[DIRSERVER-1870] - Persistent control is not decoded properly
>[DIRSERVER-1873] - Searching on member attribute (multivalued) for
> groups is not working as expected
>[DIRSERVER-1884] - Incorrect length specified in
> PaswordUtil.splitCredentials
>[DIRSERVER-1885] - The JDBM index cache configuration is not used at all
>[DIRSERVER-1888] - Some pwdPolicy schema AT are incorrect
>[DIRSERVER-1894] - Multi-Master replicated startup does not complete
>[DIRSERVER-1900] - Password hashing interceptor is not encrypting
> the passwords
>[DIRSERVER-1902] - Concurrent reads cause LDAP:Error 80, LDAP: Error
> 1 and LDAP: error code 49 errors
>[DIRSERVER-1905] - KeytabDecoder should use '/' instead of '\' to
> separate principal name components
>[DIRSERVER-1906] - We still store entryUUID associated with 'top' in
> the OC index
>[DIRSERVER-1909] - Integer cannot be cast to java.lang.Long in
> JdbmTable prevents service start
>[DIRSERVER-1911] - Incorrect installation presumption toward user
> naming convention
>[DIRSERVER-1917] - Class Cast Exception when doing paged search
>[DIRSERVER-1921] - Indexes dont work on distinguishedNameMatch
> attributeType
>[DIRSERVER-1922] - Not Operator in Ldap Filter on Indexed Attributes
>[DIRSERVER-1928] - PasswordPolicy should be ignored from Admin session
>[DIRSERVER-1932] - Password policy pwdMinAge check should check for
> required reset
>[DIRSERVER-1948] - NPE in AuthenticationInterceptor when password
> policy is in place and user does not have a pwdChangedTime
>[DIRSERVER-1953] - "entryDn" attribute is not returned when
> requested along with wildcard attribute symbol *
>[DIRSERVER-1954] - Second startup of an embedded server fails (after
> an ungraceful shutdown of the first startup)
>[DIRSERVER-1955] - Directory Apacheds sends wrong empty response for
> password policy request
>[DIRSERVER-1957] - chpass/passwd failure (Linux)
>[DIRSERVER-1959] - Certificates corruption during replication
>[DIRSERVER-1961] - Searches wth Object level scope and non-existing
> attribute assertion in filter are not working
> 
> Improvements
> 
> 
>[DIRSERVER-1081] - Injecting more information in the opContext structure
>[DIRSERVER-1294] - Add size() and hasNext() methods to cursors
>[DIRSERVER-1338] - Allow non-Jdbm schema partition
>[DIRSERVER-1460] - Add locale to configuration
>[DIRSERVER-1534] - Improving implementation of loading LDIF files
> during startup
>[DIRSERVER-1601] - New index to add : PrescriptiveACI, member,
> uniqueMember
>[DIRSERVER-1634] - Add a DN cache for Stores
>[DIRSERVER-1676] - Provide a set of error codes along with an
> AuthenticationException to indicate its root cause.
>[DIRSERVER-1716] - Add a ParentIdAndRdn cache
>[DIRSERVER-1920] - Refactor
> DefaultDirectoryServiceFactory/DefaultDirectoryService for extensability
>[DIRSERVER-1926] - Supply Entry to PasswordValidator instead of username
>[DIRSERVER-1935] - Include password policy control in the password
> modify extended operation response if requested
> 
> New Features
> 
> 
>[DIRSERVER-264] - Add Supp

[jira] [Commented] (DIRAPI-179) Referral Hop Count

2014-03-12 Thread richard_tibco_tibco (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931847#comment-13931847
 ] 

richard_tibco_tibco commented on DIRAPI-179:


I also want to know if the apache api can support referral hop count feature ?

> Referral Hop Count
> --
>
> Key: DIRAPI-179
> URL: https://issues.apache.org/jira/browse/DIRAPI-179
> Project: Directory Client API
>  Issue Type: Improvement
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> As we found, there is already one related issue DIRAPI-61 for Referral Chase. 
> Then we want API to support Hop Count when chase referral.That means API can 
> let user control the hop count when API chase referral. Netscape LDAP SDK 
> already has this featue, we can refer to.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Robert Hou (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931547#comment-13931547
 ] 

Robert Hou commented on DIRAPI-178:
---

I have add above parameters set block in my code. But for Novell and IBM, the 
test still failed, any changed didn't be printed. For SUNONE, the 
ps.setChangesOnly( true ) seems like not work, at first, the test case still 
print the enties which were not changed.

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the entries it searched, but the 
> printed entries are not changed entries. In the while block, I clear the list 
> of entries after first print, then I want to it print the entires I modified 
> later, but it doesn't print.
> @Test
>   public void testPsearchMove() throws Exception
>   {
>   LdapNetworkConnection connection = new LdapNetworkConnection(
>   "192.168.80.223", 50001);
>   connection.bind("cn=robert,cn=roles,dc=tibco,dc=com", "robert");
> //Entry newOu = new DefaultEntry("uid=persist, 
> ou=users,ou=system");
> //newOu.add("objectClass", "inetOrgPerson");
> //newOu.add("cn", "persist_cn");
> //newOu.add("sn", "persist_sn");
> //connection.add(newOu);
>   SearchRequest sr = new SearchRequestImpl();
>   sr.setBase(new Dn("dc=tibco,dc=com"));
>   sr.setFilter("(objectClass=inetorgperson)");
>   sr.setScope(SearchScope.SUBTREE);
>   sr.addControl(new PersistentSearchImpl());
>   final SearchCursor cursor = connection.search(sr);
>   final List entryList = new ArrayList();
>   Runnable r = new Runnable() {
>   @Override
>   public void run() {
>   try {
>   while (cursor.next()) {
>   
> entryList.add(cursor.getEntry());
> //
> System.out.println(cursor.getEntry());
>   }
>   } catch (Exception e) {
>   throw new RuntimeException(e);
>   }
>   }
>   };
>   new Thread(r).start();
> //connection.move(newOu.getDn(), 
> newOu.getDn().getParent().getParent());
>   while(true){
>   Thread.sleep(1000);
>   if(!entryList.isEmpty()){
>   System.out.println(entryList);
>   entryList.clear();
>   }
>   }
>   
> //assertFalse(entryList.isEmpty());
> //assertEquals(1, entryList.size());
> //assertEquals("uid=persist,ou=system", entryList.get(0).getDn()
> //.getName());
> //connection.close();
>   }



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Emmanuel Lecharny (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931521#comment-13931521
 ] 

Emmanuel Lecharny commented on DIRAPI-178:
--

Also in your test you haven't set any of the PersistentSearchImpl parameters. 
Typically :

{code}
PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setReturnECs( true );   // If not set, default to false, and nothing will be 
returned
ps.setCritical( true );
{code}



> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the entries it searched, but the 
> printed entries are not changed entries. In the while block, I clear the list 
> of entries after first print, then I want to it print the entires I modified 
> later, but it doesn't print.
> @Test
>   public void testPsearchMove() throws Exception
>   {
>   LdapNetworkConnection connection = new LdapNetworkConnection(
>   "192.168.80.223", 50001);
>   connection.bind("cn=robert,cn=roles,dc=tibco,dc=com", "robert");
> //Entry newOu = new DefaultEntry("uid=persist, 
> ou=users,ou=system");
> //newOu.add("objectClass", "inetOrgPerson");
> //newOu.add("cn", "persist_cn");
> //newOu.add("sn", "persist_sn");
> //connection.add(newOu);
>   SearchRequest sr = new SearchRequestImpl();
>   sr.setBase(new Dn("dc=tibco,dc=com"));
>   sr.setFilter("(objectClass=inetorgperson)");
>   sr.setScope(SearchScope.SUBTREE);
>   sr.addControl(new PersistentSearchImpl());
>   final SearchCursor cursor = connection.search(sr);
>   final List entryList = new ArrayList();
>   Runnable r = new Runnable() {
>   @Override
>   public void run() {
>   try {
>   while (cursor.next()) {
>   
> entryList.add(cursor.getEntry());
> //
> System.out.println(cursor.getEntry());
>   }
>   } catch (Exception e) {
>   throw new RuntimeException(e);
>   }
>   }
>   };
>   new Thread(r).start();
> //connection.move(newOu.getDn(), 
> newOu.getDn().getParent().getParent());
>   while(true){
>   Thread.sleep(1000);
>   if(!entryList.isEmpty()){
>   System.out.println(entryList);
>   entryList.clear();
>   }
>   }
>   
> //assertFalse(entryList.isEmpty());
> //assertEquals(1, entryList.size());
> //assertEquals("uid=persist,ou=system", entryList.get(0).getDn()
> //.getName());
> //connection.close();
>   }



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Kiran Ayyagari (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931515#comment-13931515
 ] 

Kiran Ayyagari commented on DIRAPI-178:
---

OK, I think you should set the below flags as well and try (ApacheDS by default 
sets all these)
  {code:java}
PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setCritical( true );
ps.setChangeTypes(PersistentSearch.CHANGE_TYPES_MAX); // to receive all 
modifications

// then add the control
sr.addControl( ps );
 {code}

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the entries it searched, but the 
> printed entries are not changed entries. In the while block, I clear the list 
> of entries after first print, then I want to it print the entires I modified 
> later, but it doesn't print.
> @Test
>   public void testPsearchMove() throws Exception
>   {
>   LdapNetworkConnection connection = new LdapNetworkConnection(
>   "192.168.80.223", 50001);
>   connection.bind("cn=robert,cn=roles,dc=tibco,dc=com", "robert");
> //Entry newOu = new DefaultEntry("uid=persist, 
> ou=users,ou=system");
> //newOu.add("objectClass", "inetOrgPerson");
> //newOu.add("cn", "persist_cn");
> //newOu.add("sn", "persist_sn");
> //connection.add(newOu);
>   SearchRequest sr = new SearchRequestImpl();
>   sr.setBase(new Dn("dc=tibco,dc=com"));
>   sr.setFilter("(objectClass=inetorgperson)");
>   sr.setScope(SearchScope.SUBTREE);
>   sr.addControl(new PersistentSearchImpl());
>   final SearchCursor cursor = connection.search(sr);
>   final List entryList = new ArrayList();
>   Runnable r = new Runnable() {
>   @Override
>   public void run() {
>   try {
>   while (cursor.next()) {
>   
> entryList.add(cursor.getEntry());
> //
> System.out.println(cursor.getEntry());
>   }
>   } catch (Exception e) {
>   throw new RuntimeException(e);
>   }
>   }
>   };
>   new Thread(r).start();
> //connection.move(newOu.getDn(), 
> newOu.getDn().getParent().getParent());
>   while(true){
>   Thread.sleep(1000);
>   if(!entryList.isEmpty()){
>   System.out.println(entryList);
>   entryList.clear();
>   }
>   }
>   
> //assertFalse(entryList.isEmpty());
> //assertEquals(1, entryList.size());
> //assertEquals("uid=persist,ou=system", entryList.get(0).getDn()
> //.getName());
> //connection.close();
>   }



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Emmanuel Lecharny (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931514#comment-13931514
 ] 

Emmanuel Lecharny commented on DIRAPI-178:
--

Ok, but that does not tell us if it works or not :-)

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the entries it searched, but the 
> printed entries are not changed entries. In the while block, I clear the list 
> of entries after first print, then I want to it print the entires I modified 
> later, but it doesn't print.
> @Test
>   public void testPsearchMove() throws Exception
>   {
>   LdapNetworkConnection connection = new LdapNetworkConnection(
>   "192.168.80.223", 50001);
>   connection.bind("cn=robert,cn=roles,dc=tibco,dc=com", "robert");
> //Entry newOu = new DefaultEntry("uid=persist, 
> ou=users,ou=system");
> //newOu.add("objectClass", "inetOrgPerson");
> //newOu.add("cn", "persist_cn");
> //newOu.add("sn", "persist_sn");
> //connection.add(newOu);
>   SearchRequest sr = new SearchRequestImpl();
>   sr.setBase(new Dn("dc=tibco,dc=com"));
>   sr.setFilter("(objectClass=inetorgperson)");
>   sr.setScope(SearchScope.SUBTREE);
>   sr.addControl(new PersistentSearchImpl());
>   final SearchCursor cursor = connection.search(sr);
>   final List entryList = new ArrayList();
>   Runnable r = new Runnable() {
>   @Override
>   public void run() {
>   try {
>   while (cursor.next()) {
>   
> entryList.add(cursor.getEntry());
> //
> System.out.println(cursor.getEntry());
>   }
>   } catch (Exception e) {
>   throw new RuntimeException(e);
>   }
>   }
>   };
>   new Thread(r).start();
> //connection.move(newOu.getDn(), 
> newOu.getDn().getParent().getParent());
>   while(true){
>   Thread.sleep(1000);
>   if(!entryList.isEmpty()){
>   System.out.println(entryList);
>   entryList.clear();
>   }
>   }
>   
> //assertFalse(entryList.isEmpty());
> //assertEquals(1, entryList.size());
> //assertEquals("uid=persist,ou=system", entryList.get(0).getDn()
> //.getName());
> //connection.close();
>   }



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Robert Hou (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931507#comment-13931507
 ] 

Robert Hou edited comment on DIRAPI-178 at 3/12/14 8:09 AM:


Below are the test cases for four LDAP Servers, I refer to the implementation 
from Kiran. I manually modify the monitored entries through Apache Directory 
Studio.
@Test
public void testPsearchNovell() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection(
"192.168.80.31", 389);
DefaultConfigurableBinaryAttributeDetector bad = new 
DefaultConfigurableBinaryAttributeDetector();
bad.addBinaryAttribute("objectSid","objectGUID");
connection.setBinaryAttributeDetector(bad);
connection.setTimeOut(0);
LdapConnectionConfig config = connection.getConfig();

//  config.setKeyManagers(keyManagers);
connection.bind("cn=Admin,o=tibco", "admin");
SearchRequest sr = new SearchRequestImpl();
sr.setBase(new Dn("o=tibco"));
sr.setFilter("(objectClass=inetorgperson)");
sr.setDerefAliases(AliasDerefMode.DEREF_ALWAYS);
sr.setScope(SearchScope.SUBTREE);
sr.addControl(new PersistentSearchImpl());
final SearchCursor cursor = connection.search(sr);
final List entryList = new ArrayList();
Runnable r = new Runnable() {
@Override
public void run() {
try {
while (cursor.next()) {

entryList.add(cursor.getEntry());
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
};
new Thread(r).start();
while(true){
Thread.sleep(1000);
if(!entryList.isEmpty()){
System.out.println(entryList);
entryList.clear();
}
}

}

@Test
public void testPsearchSunONE() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection(
"192.168.80.166", 1389);
DefaultConfigurableBinaryAttributeDetector bad = new 
DefaultConfigurableBinaryAttributeDetector();
bad.addBinaryAttribute("objectSid","objectGUID");
connection.setBinaryAttributeDetector(bad);
connection.bind("CN=Directory Manager", "tibco123");
connection.setTimeOut(0);
SearchRequest sr = new SearchRequestImpl();
sr.setBase(new Dn("dc=tibco,dc=com"));
sr.setFilter("(objectClass=inetorgperson)");
sr.setScope(SearchScope.SUBTREE);
sr.addControl(new PersistentSearchImpl());
final SearchCursor cursor = connection.search(sr);
final List entryList = new ArrayList();
Runnable r = new Runnable() {
@Override
public void run() {
try {
while (cursor.next()) {

entryList.add(cursor.getEntry());
//  
System.out.println(cursor.getEntry());
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
};
new Thread(r).start();
while(true){
Thread.sleep(1000);
if(!entryList.isEmpty()){
System.out.println(entryList);
entryList.clear();
}
}

}

@Test
public void testPsearchIBM() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection(
"192.168.80.56", 389);
DefaultConfigurableBinaryAttributeDetector bad = new 
DefaultConfigurableBinaryAttributeDetector();
bad.addBinaryAttribute("objectSid","objectGUID");
connection.setBinaryAttributeDetector(bad);
connection.bind("cn=r

Result [VOTE] Release of LDAP API 1.0.0-M21

2014-03-12 Thread Emmanuel Lécharny
Hi,

I'm closing this vote, we received 4 +1 :

- Felix
- Kiran
- Stefan
and me

I'll update the site and move the released package to the servers.

I'll do the annoncement tomorrow.



Le 3/8/14 4:48 PM, Emmanuel Lécharny a écrit :
> Hi,
>
> This is a vote for the 21th milestone of the 1.0.0 LDAP API/Shared,
> 1.0.0-M21.
>
> It's a bug fix release, and it will be followed by a release of
> ApachedDS 2.0.0-M16 this afternoon.
>
> It contains a few bug fixes and improvements :
>
>
> Bugs
> 
>
>   * [DIRAPI-126 ] -
> Timeout Exception on bind while pwdExpireWarning period
>   * [DIRAPI-128 ] -
> FilterEncoder.format() should accept String varargs
>   * [DIRAPI-152 ] -
> Attribute.toString() method appends newline
>   * [DIRAPI-157 ] -
> Calling the add() method with a multi-value attribute and a null value
> throws an NPE
>   * [DIRAPI-160 ] -
> DSML engine is not setting the 'requestID' value in BatchResponse when
> output stream instance is provided
>   * [DIRAPI-161 ] -
> Timeout does not apply to connect method
>   * [DIRAPI-173 ] -
> When using TLS and multiple binds, LdapNetworkConnection attempts to
> start TLS multiple times
>   * [DIRAPI-176 ] -
> LDIFReader does not accept empty DN (rootDSE)
>
>
> Improvements
> 
>
>   * [DIRAPI-137 ] -
> Add Control support for RFC 2891 - LDAP Control Extension for Server
> Side Sorting of Search Results http://www.faqs.org/rfcs/rfc2891.html
>   * [DIRAPI-153 ] -
> Implement efficient reuse of schema loading
>   * [DIRAPI-159 ] -
> Add a method to set a SchemaManager in LdapConnection
>   * [DIRAPI-169 ] -
> Formalize the contract of PasswordPolicyResponse by stating that -1 is
> returned if no value is set.
>   * [DIRAPI-170 ] -
> Allow StandaloneLdapApiServices to be configured without system properties
>   * [DIRAPI-175 ] -
> LdifReader should handle empty
>
> New Feature
> ---
>
>   * [DIRAPI-143 ] -
> Add Controls to support server-side sorting
>
>
> The revision :
>
> http://svn.apache.org/r1574930
>
> The SVN tag:
> http://svn.apache.org/repos/asf/directory/shared/tags/1.0.0-M21
>
> The source and binary distribution packages:
> http://people.apache.org/~elecharny/
>
> The staging repository:
> https://repository.apache.org/content/repositories/orgapachedirectory-1000
>
>
> Please cast your votes:
> [ ] +1 Release Shared/LDAP API 1.0.0-M21
> [ ] 0 abstain
> [ ] -1 Do not release Shared/LDAP API 1.0.0-M21
>
>
> Emmanuel
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 



Result [VOTE] Release Apache Mavibot 1.0.0-M4

2014-03-12 Thread Emmanuel Lécharny
Hi,

I'm closing this vote, we received 4 +1 :

- Felix
- Kiran
- Stefan
and me

I'll update the site and move the released package to the servers.

I'll do the annoncement tomorrow.


Le 3/9/14 8:28 AM, Emmanuel Lécharny a écrit :
> Hi !
>
> This is the forth release of Apache Mavibot, the MVCC BTree in Java !
>
> This version brings some new improvements in the API and the
> performances. The In-memory and Persisted B-trees classes have
> been moved into the same package, to avoid exposing the methods
> to the external world. We also have shared the common methods.
>
> Some specific exceptions have been created.
>
> This is by far not the latest milestone, the next one will bring
> major changes : revisions support, transaction support.
>
> ApacheDS has already been tested with Mavibot 1.0.-M4-SNAPSHOT.
>
> Here are the list of fixed issues :
>
> Bug
> ---
>
> [MAVIBOT-20] - Btree created with the duplicateValues flag to false
> still accept duplicate values
>
> Improvements
> 
>
> [MAVIBOT-25] - Don't update the RMHeader for each free page we get
> [MAVIBOT-27] - Aggregate the Persisted and InMemory common methods
> [MAVIBOT-28] - Move the Persited and InMemory classes into the same
> package
> [MAVIBOT-29] - Use a BtreeFactory to create BTrees
> [MAVIBOT-30] - Replace the RuntimeException by specific exceptions
> [MAVIBOT-33] - Serializer and comparator should be static instances
>
>
>
> So let's vote now !
>
>
> The revision :
>
> http://svn.apache.org/r1574993
>
>
> The SVN tag:
> http://svn.apache.org/repos/asf/directory/mavibot/tags/1.0.0-M4/
>
> The source and binary distribution packages:
> http://people.apache.org/~elecharny/
>
> The staging repository:
> https://repository.apache.org/content/repositories/orgapachedirectory-1001/
>
>
> Please cast your votes:
> [ ] +1 Release Mavibot 1.0.0-M4
> [ ] 0 abstain
> [ ] -1 Do not release Mavibot 1.0.0-M4
>
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 



[jira] [Commented] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Robert Hou (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931507#comment-13931507
 ] 

Robert Hou commented on DIRAPI-178:
---

Below are the test cases for four LDAP Servers, I refer to the implementation 
from Kiran.
@Test
public void testPsearchNovell() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection(
"192.168.80.31", 389);
DefaultConfigurableBinaryAttributeDetector bad = new 
DefaultConfigurableBinaryAttributeDetector();
bad.addBinaryAttribute("objectSid","objectGUID");
connection.setBinaryAttributeDetector(bad);
connection.setTimeOut(0);
LdapConnectionConfig config = connection.getConfig();

//  config.setKeyManagers(keyManagers);
connection.bind("cn=Admin,o=tibco", "admin");
SearchRequest sr = new SearchRequestImpl();
sr.setBase(new Dn("o=tibco"));
sr.setFilter("(objectClass=inetorgperson)");
sr.setDerefAliases(AliasDerefMode.DEREF_ALWAYS);
sr.setScope(SearchScope.SUBTREE);
sr.addControl(new PersistentSearchImpl());
final SearchCursor cursor = connection.search(sr);
final List entryList = new ArrayList();
Runnable r = new Runnable() {
@Override
public void run() {
try {
while (cursor.next()) {

entryList.add(cursor.getEntry());
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
};
new Thread(r).start();
while(true){
Thread.sleep(1000);
if(!entryList.isEmpty()){
System.out.println(entryList);
entryList.clear();
}
}

}

@Test
public void testPsearchSunONE() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection(
"192.168.80.166", 1389);
DefaultConfigurableBinaryAttributeDetector bad = new 
DefaultConfigurableBinaryAttributeDetector();
bad.addBinaryAttribute("objectSid","objectGUID");
connection.setBinaryAttributeDetector(bad);
connection.bind("CN=Directory Manager", "tibco123");
connection.setTimeOut(0);
SearchRequest sr = new SearchRequestImpl();
sr.setBase(new Dn("dc=tibco,dc=com"));
sr.setFilter("(objectClass=inetorgperson)");
sr.setScope(SearchScope.SUBTREE);
sr.addControl(new PersistentSearchImpl());
final SearchCursor cursor = connection.search(sr);
final List entryList = new ArrayList();
Runnable r = new Runnable() {
@Override
public void run() {
try {
while (cursor.next()) {

entryList.add(cursor.getEntry());
//  
System.out.println(cursor.getEntry());
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
};
new Thread(r).start();
while(true){
Thread.sleep(1000);
if(!entryList.isEmpty()){
System.out.println(entryList);
entryList.clear();
}
}

}

@Test
public void testPsearchIBM() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection(
"192.168.80.56", 389);
DefaultConfigurableBinaryAttributeDetector bad = new 
DefaultConfigurableBinaryAttributeDetector();
bad.addBinaryAttribute("objectSid","objectGUID");
connection.setBinaryAttributeDetector(bad);
connection.bind("cn=root", "Tibco1234");
SearchRequest sr = new SearchRequestImpl();
sr.setBase(new Dn("cn=confi

[jira] [Commented] (DIRAPI-177) Attribute.getBytes() can't get value when the Attribute is "objectSid" or "objectGUID"

2014-03-12 Thread Emmanuel Lecharny (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931499#comment-13931499
 ] 

Emmanuel Lecharny commented on DIRAPI-177:
--

We haven't yet announced M21, so M22 is not yet scheduled...

But it can be in 2 months or in 2 days, it depends on how many modifications we 
make or bugs we fix.

Releasing a milestone is quite easy, and we do favor quick releases if we have 
serious issues.

> Attribute.getBytes() can't get value when the Attribute is "objectSid" or 
> "objectGUID"
> --
>
> Key: DIRAPI-177
> URL: https://issues.apache.org/jira/browse/DIRAPI-177
> Project: Directory Client API
>  Issue Type: Bug
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>Assignee: Kiran Ayyagari
>
> "objectSid" and "objectGUID" two attributes are defined by MS AD, as far as i 
> know, the value of them are binary data. When we use  Attribute.getBytes() to 
> get value of them after Search operation, the exception 
> LdapInvalidAttributeValueException will be thrown, but 
> Attribute.get().getBytes() can success. However,the value of 
> Attribute.get().getBytes() still seems not a correct data, after it was 
> convert to string with specific arithmetic, it is different with correct 
> value.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Emmanuel Lecharny (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931491#comment-13931491
 ] 

Emmanuel Lecharny edited comment on DIRAPI-178 at 3/12/14 7:52 AM:
---

And none of SunOne and RedHat server works with your implementation ?

Btw here is a code sample, as provided by Kiran :

{code:java}
public void testPsearchMove() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection( 
"localhost", ldapServer.getPort() );
connection.bind( "uid=admin,ou=system", "secret" );

Entry newOu = new DefaultEntry( "uid=persist, ou=users,ou=system" );
newOu.add( "objectClass", "inetOrgPerson" );
newOu.add( "cn", "persist_cn" );
newOu.add( "sn", "persist_sn" );

connection.add( newOu );

SearchRequest sr = new SearchRequestImpl();
sr.setBase( new Dn( BASE ) );
sr.setFilter( "(objectClass=*)" );
sr.setScope( SearchScope.SUBTREE );

PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setReturnECs( true );
ps.setCritical( true );

sr.addControl( ps );

final SearchCursor cursor = connection.search( sr );

final List entryList = new ArrayList();

Runnable r = new Runnable()
{

@Override
public void run()
{
try
{
while( cursor.next() )
{
entryList.add( cursor.getEntry() );
}
}
catch( Exception e )
{
throw new RuntimeException( e );
}
}
};

new Thread( r ).start();

connection.move( newOu.getDn(), newOu.getDn().getParent().getParent() );
Thread.sleep( 1000 );
assertFalse( entryList.isEmpty() );
assertEquals( 1, entryList.size() );
assertEquals( "uid=persist,ou=system", entryList.get( 0 
).getDn().getName() );

connection.close();
}

{ code}


was (Author: elecharny):
And none of SunOne and RedHat server works with your implementation ?

Btw here is a code sampe, as provided by Kiran :

{code}
public void testPsearchMove() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection( 
"localhost", ldapServer.getPort() );
connection.bind( "uid=admin,ou=system", "secret" );

Entry newOu = new DefaultEntry( "uid=persist, ou=users,ou=system" );
newOu.add( "objectClass", "inetOrgPerson" );
newOu.add( "cn", "persist_cn" );
newOu.add( "sn", "persist_sn" );

connection.add( newOu );

SearchRequest sr = new SearchRequestImpl();
sr.setBase( new Dn( BASE ) );
sr.setFilter( "(objectClass=*)" );
sr.setScope( SearchScope.SUBTREE );

PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setReturnECs( true );
ps.setCritical( true );

sr.addControl( ps );

final SearchCursor cursor = connection.search( sr );

final List entryList = new ArrayList();

Runnable r = new Runnable()
{

@Override
public void run()
{
try
{
while( cursor.next() )
{
entryList.add( cursor.getEntry() );
}
}
catch( Exception e )
{
throw new RuntimeException( e );
}
}
};

new Thread( r ).start();

connection.move( newOu.getDn(), newOu.getDn().getParent().getParent() );
Thread.sleep( 1000 );
assertFalse( entryList.isEmpty() );
assertEquals( 1, entryList.size() );
assertEquals( "uid=persist,ou=system", entryList.get( 0 
).getDn().getName() );

connection.close();
}

{ code}

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the entries it searched, but the 
> printed entries are not

[jira] [Comment Edited] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Emmanuel Lecharny (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931491#comment-13931491
 ] 

Emmanuel Lecharny edited comment on DIRAPI-178 at 3/12/14 7:50 AM:
---

And none of SunOne and RedHat server works with your implementation ?

Btw here is a code sampe, as provided by Kiran :

{code}
public void testPsearchMove() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection( 
"localhost", ldapServer.getPort() );
connection.bind( "uid=admin,ou=system", "secret" );

Entry newOu = new DefaultEntry( "uid=persist, ou=users,ou=system" );
newOu.add( "objectClass", "inetOrgPerson" );
newOu.add( "cn", "persist_cn" );
newOu.add( "sn", "persist_sn" );

connection.add( newOu );

SearchRequest sr = new SearchRequestImpl();
sr.setBase( new Dn( BASE ) );
sr.setFilter( "(objectClass=*)" );
sr.setScope( SearchScope.SUBTREE );

PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setReturnECs( true );
ps.setCritical( true );

sr.addControl( ps );

final SearchCursor cursor = connection.search( sr );

final List entryList = new ArrayList();

Runnable r = new Runnable()
{

@Override
public void run()
{
try
{
while( cursor.next() )
{
entryList.add( cursor.getEntry() );
}
}
catch( Exception e )
{
throw new RuntimeException( e );
}
}
};

new Thread( r ).start();

connection.move( newOu.getDn(), newOu.getDn().getParent().getParent() );
Thread.sleep( 1000 );
assertFalse( entryList.isEmpty() );
assertEquals( 1, entryList.size() );
assertEquals( "uid=persist,ou=system", entryList.get( 0 
).getDn().getName() );

connection.close();
}

{ code}


was (Author: elecharny):
And none of SunOne and RedHat server works with your implementation ?

Btw here is a code sampe, as provided by Kiran :

{code}

/**
 * Test for DIRSERVER-1908 
 */
@Test
public void testPsearchMove() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection( 
"localhost", ldapServer.getPort() );
connection.bind( "uid=admin,ou=system", "secret" );

Entry newOu = new DefaultEntry( "uid=persist, ou=users,ou=system" );
newOu.add( "objectClass", "inetOrgPerson" );
newOu.add( "cn", "persist_cn" );
newOu.add( "sn", "persist_sn" );

connection.add( newOu );

SearchRequest sr = new SearchRequestImpl();
sr.setBase( new Dn( BASE ) );
sr.setFilter( "(objectClass=*)" );
sr.setScope( SearchScope.SUBTREE );

PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setReturnECs( true );
ps.setCritical( true );

sr.addControl( ps );

final SearchCursor cursor = connection.search( sr );

final List entryList = new ArrayList();

Runnable r = new Runnable()
{

@Override
public void run()
{
try
{
while( cursor.next() )
{
entryList.add( cursor.getEntry() );
}
}
catch( Exception e )
{
throw new RuntimeException( e );
}
}
};

new Thread( r ).start();

connection.move( newOu.getDn(), newOu.getDn().getParent().getParent() );
Thread.sleep( 1000 );
assertFalse( entryList.isEmpty() );
assertEquals( 1, entryList.size() );
assertEquals( "uid=persist,ou=system", entryList.get( 0 
).getDn().getName() );

connection.close();
}

{ code}

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the en

[jira] [Comment Edited] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Emmanuel Lecharny (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931491#comment-13931491
 ] 

Emmanuel Lecharny edited comment on DIRAPI-178 at 3/12/14 7:48 AM:
---

And none of SunOne and RedHat server works with your implementation ?

Btw here is a code sampe, as provided by Kiran :

{code}

/**
 * Test for DIRSERVER-1908 
 */
@Test
public void testPsearchMove() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection( 
"localhost", ldapServer.getPort() );
connection.bind( "uid=admin,ou=system", "secret" );

Entry newOu = new DefaultEntry( "uid=persist, ou=users,ou=system" );
newOu.add( "objectClass", "inetOrgPerson" );
newOu.add( "cn", "persist_cn" );
newOu.add( "sn", "persist_sn" );

connection.add( newOu );

SearchRequest sr = new SearchRequestImpl();
sr.setBase( new Dn( BASE ) );
sr.setFilter( "(objectClass=*)" );
sr.setScope( SearchScope.SUBTREE );

PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setReturnECs( true );
ps.setCritical( true );

sr.addControl( ps );

final SearchCursor cursor = connection.search( sr );

final List entryList = new ArrayList();

Runnable r = new Runnable()
{

@Override
public void run()
{
try
{
while( cursor.next() )
{
entryList.add( cursor.getEntry() );
}
}
catch( Exception e )
{
throw new RuntimeException( e );
}
}
};

new Thread( r ).start();

connection.move( newOu.getDn(), newOu.getDn().getParent().getParent() );
Thread.sleep( 1000 );
assertFalse( entryList.isEmpty() );
assertEquals( 1, entryList.size() );
assertEquals( "uid=persist,ou=system", entryList.get( 0 
).getDn().getName() );

connection.close();
}

{ code}


was (Author: elecharny):
And none of SunOne and RedHat server works with your implementation ?

Btw here is a code sampe, as provided by Kiran :

{code}
/**
 * Test for DIRSERVER-1908 
 */
@Test
public void testPsearchMove() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection( 
"localhost", ldapServer.getPort() );
connection.bind( "uid=admin,ou=system", "secret" );

Entry newOu = new DefaultEntry( "uid=persist, ou=users,ou=system" );
newOu.add( "objectClass", "inetOrgPerson" );
newOu.add( "cn", "persist_cn" );
newOu.add( "sn", "persist_sn" );

connection.add( newOu );

SearchRequest sr = new SearchRequestImpl();
sr.setBase( new Dn( BASE ) );
sr.setFilter( "(objectClass=*)" );
sr.setScope( SearchScope.SUBTREE );

PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setReturnECs( true );
ps.setCritical( true );

sr.addControl( ps );

final SearchCursor cursor = connection.search( sr );

final List entryList = new ArrayList();

Runnable r = new Runnable()
{

@Override
public void run()
{
try
{
while( cursor.next() )
{
entryList.add( cursor.getEntry() );
}
}
catch( Exception e )
{
throw new RuntimeException( e );
}
}
};

new Thread( r ).start();

connection.move( newOu.getDn(), newOu.getDn().getParent().getParent() );
Thread.sleep( 1000 );
assertFalse( entryList.isEmpty() );
assertEquals( 1, entryList.size() );
assertEquals( "uid=persist,ou=system", entryList.get( 0 
).getDn().getName() );

connection.close();
}

{ code}

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete follo

[jira] [Commented] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Emmanuel Lecharny (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931491#comment-13931491
 ] 

Emmanuel Lecharny commented on DIRAPI-178:
--

And none of SunOne and RedHat server works with your implementation ?

Btw here is a code sampe, as provided by Kiran :

{code}
/**
 * Test for DIRSERVER-1908 
 */
@Test
public void testPsearchMove() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection( 
"localhost", ldapServer.getPort() );
connection.bind( "uid=admin,ou=system", "secret" );

Entry newOu = new DefaultEntry( "uid=persist, ou=users,ou=system" );
newOu.add( "objectClass", "inetOrgPerson" );
newOu.add( "cn", "persist_cn" );
newOu.add( "sn", "persist_sn" );

connection.add( newOu );

SearchRequest sr = new SearchRequestImpl();
sr.setBase( new Dn( BASE ) );
sr.setFilter( "(objectClass=*)" );
sr.setScope( SearchScope.SUBTREE );

PersistentSearch ps = new PersistentSearchImpl();
ps.setChangesOnly( true );
ps.setReturnECs( true );
ps.setCritical( true );

sr.addControl( ps );

final SearchCursor cursor = connection.search( sr );

final List entryList = new ArrayList();

Runnable r = new Runnable()
{

@Override
public void run()
{
try
{
while( cursor.next() )
{
entryList.add( cursor.getEntry() );
}
}
catch( Exception e )
{
throw new RuntimeException( e );
}
}
};

new Thread( r ).start();

connection.move( newOu.getDn(), newOu.getDn().getParent().getParent() );
Thread.sleep( 1000 );
assertFalse( entryList.isEmpty() );
assertEquals( 1, entryList.size() );
assertEquals( "uid=persist,ou=system", entryList.get( 0 
).getDn().getName() );

connection.close();
}

{ code}

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the entries it searched, but the 
> printed entries are not changed entries. In the while block, I clear the list 
> of entries after first print, then I want to it print the entires I modified 
> later, but it doesn't print.
> @Test
>   public void testPsearchMove() throws Exception
>   {
>   LdapNetworkConnection connection = new LdapNetworkConnection(
>   "192.168.80.223", 50001);
>   connection.bind("cn=robert,cn=roles,dc=tibco,dc=com", "robert");
> //Entry newOu = new DefaultEntry("uid=persist, 
> ou=users,ou=system");
> //newOu.add("objectClass", "inetOrgPerson");
> //newOu.add("cn", "persist_cn");
> //newOu.add("sn", "persist_sn");
> //connection.add(newOu);
>   SearchRequest sr = new SearchRequestImpl();
>   sr.setBase(new Dn("dc=tibco,dc=com"));
>   sr.setFilter("(objectClass=inetorgperson)");
>   sr.setScope(SearchScope.SUBTREE);
>   sr.addControl(new PersistentSearchImpl());
>   final SearchCursor cursor = connection.search(sr);
>   final List entryList = new ArrayList();
>   Runnable r = new Runnable() {
>   @Override
>   public void run() {
>   try {
>   while (cursor.next()) {
>   
> entryList.add(cursor.getEntry());
> //
> System.out.println(cursor.getEntry());
>   }
>   } catch (Exception e) {
>   throw new RuntimeException(e);
>   }
>   }
>   };
>   new Thread(r).start();
> //connection.move(newOu.getDn(), 
> newOu.getDn().getParent().getParent());
>   while(true){
>   Thread.sleep(1000);
>   if(!entryList.isEmp

[jira] [Commented] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Robert Hou (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931477#comment-13931477
 ] 

Robert Hou commented on DIRAPI-178:
---

Sorry, before we use AD to do test for PS. As we know, AD don't support 
standant PS, it has another OID for PS control.
Then we tested currect four kinds of LDAP Server which all support standard PS, 
SunOne and RedHat can work, but IBM and Novell falied.

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the entries it searched, but the 
> printed entries are not changed entries. In the while block, I clear the list 
> of entries after first print, then I want to it print the entires I modified 
> later, but it doesn't print.
> @Test
>   public void testPsearchMove() throws Exception
>   {
>   LdapNetworkConnection connection = new LdapNetworkConnection(
>   "192.168.80.223", 50001);
>   connection.bind("cn=robert,cn=roles,dc=tibco,dc=com", "robert");
> //Entry newOu = new DefaultEntry("uid=persist, 
> ou=users,ou=system");
> //newOu.add("objectClass", "inetOrgPerson");
> //newOu.add("cn", "persist_cn");
> //newOu.add("sn", "persist_sn");
> //connection.add(newOu);
>   SearchRequest sr = new SearchRequestImpl();
>   sr.setBase(new Dn("dc=tibco,dc=com"));
>   sr.setFilter("(objectClass=inetorgperson)");
>   sr.setScope(SearchScope.SUBTREE);
>   sr.addControl(new PersistentSearchImpl());
>   final SearchCursor cursor = connection.search(sr);
>   final List entryList = new ArrayList();
>   Runnable r = new Runnable() {
>   @Override
>   public void run() {
>   try {
>   while (cursor.next()) {
>   
> entryList.add(cursor.getEntry());
> //
> System.out.println(cursor.getEntry());
>   }
>   } catch (Exception e) {
>   throw new RuntimeException(e);
>   }
>   }
>   };
>   new Thread(r).start();
> //connection.move(newOu.getDn(), 
> newOu.getDn().getParent().getParent());
>   while(true){
>   Thread.sleep(1000);
>   if(!entryList.isEmpty()){
>   System.out.println(entryList);
>   entryList.clear();
>   }
>   }
>   
> //assertFalse(entryList.isEmpty());
> //assertEquals(1, entryList.size());
> //assertEquals("uid=persist,ou=system", entryList.get(0).getDn()
> //.getName());
> //connection.close();
>   }



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DIRAPI-178) How to use Apache Directory API to do persistent search

2014-03-12 Thread Kiran Ayyagari (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRAPI-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931469#comment-13931469
 ] 

Kiran Ayyagari commented on DIRAPI-178:
---

I have added this test a while back in PersistentSearchIT, in the method 
testPsearchMove().

> How to use Apache Directory API to do persistent search
> ---
>
> Key: DIRAPI-178
> URL: https://issues.apache.org/jira/browse/DIRAPI-178
> Project: Directory Client API
>  Issue Type: Question
>Affects Versions: 1.0.0-M20
>Reporter: Robert Hou
>
> Persistent search in Directory Client API seems not work, the code I write as 
> below: I refer to the code under DIRSERVER-1908 to complete following code. 
> After the code run, it will print all the entries it searched, but the 
> printed entries are not changed entries. In the while block, I clear the list 
> of entries after first print, then I want to it print the entires I modified 
> later, but it doesn't print.
> @Test
>   public void testPsearchMove() throws Exception
>   {
>   LdapNetworkConnection connection = new LdapNetworkConnection(
>   "192.168.80.223", 50001);
>   connection.bind("cn=robert,cn=roles,dc=tibco,dc=com", "robert");
> //Entry newOu = new DefaultEntry("uid=persist, 
> ou=users,ou=system");
> //newOu.add("objectClass", "inetOrgPerson");
> //newOu.add("cn", "persist_cn");
> //newOu.add("sn", "persist_sn");
> //connection.add(newOu);
>   SearchRequest sr = new SearchRequestImpl();
>   sr.setBase(new Dn("dc=tibco,dc=com"));
>   sr.setFilter("(objectClass=inetorgperson)");
>   sr.setScope(SearchScope.SUBTREE);
>   sr.addControl(new PersistentSearchImpl());
>   final SearchCursor cursor = connection.search(sr);
>   final List entryList = new ArrayList();
>   Runnable r = new Runnable() {
>   @Override
>   public void run() {
>   try {
>   while (cursor.next()) {
>   
> entryList.add(cursor.getEntry());
> //
> System.out.println(cursor.getEntry());
>   }
>   } catch (Exception e) {
>   throw new RuntimeException(e);
>   }
>   }
>   };
>   new Thread(r).start();
> //connection.move(newOu.getDn(), 
> newOu.getDn().getParent().getParent());
>   while(true){
>   Thread.sleep(1000);
>   if(!entryList.isEmpty()){
>   System.out.println(entryList);
>   entryList.clear();
>   }
>   }
>   
> //assertFalse(entryList.isEmpty());
> //assertEquals(1, entryList.size());
> //assertEquals("uid=persist,ou=system", entryList.get(0).getDn()
> //.getName());
> //connection.close();
>   }



--
This message was sent by Atlassian JIRA
(v6.2#6252)