ctx.setRequestControls( JndiUtils.toJndiControls( ctxCtls ) );
isReady = true;
LOG.debug( "PSearchListener is ready and about to issue persistent search request." );
list = ctx.search( "", "objectClass=*", null );
LOG.debug( "PSearchListener search request returned." );
EntryChangeControl ecControl = null;
while ( list.hasMore() )
{
LOG.debug( "PSearchListener search request got an item." );
javax.naming.ldap.Control[] controls = null;
SearchResult sresult = list.next();
if ( sresult instanceof HasControls )
{
controls = ( ( HasControls ) sresult ).getControls();
if ( controls != null )
{
for ( javax.naming.ldap.Control control : controls )
{
if ( control.getID().equals(
EntryChangeControl.CONTROL_OID ) )
{
EntryChangeControlDecoder decoder = new EntryChangeControlDecoder();
ecControl = ( EntryChangeControl ) decoder.decode( control.getEncodedValue(), new EntryChangeControl() );
}
}
}
}