*
* @throws NamingException if there are failures encountered while unbinding
*/
public void ldapUnbind() throws NamingException
{
UnbindOperationContext opCtx = new UnbindOperationContext( getSession() );
try
{
opCtx.addRequestControls( JndiUtils.fromJndiControls( getDirectoryService().getLdapCodecService(),
requestControls ) );
}
catch ( DecoderException e1 )
{
throw new NamingException( I18n.err( I18n.ERR_309, "unbind encoder exception" ) );
}
try
{
super.getDirectoryService().getOperationManager().unbind( opCtx );
}
catch ( Exception e )
{
JndiUtils.wrap( e );
}
try
{
responseControls = JndiUtils.toJndiControls( getDirectoryService().getLdapCodecService(),
opCtx.getResponseControls() );
}
catch ( EncoderException e )
{
throw new NamingException( I18n.err( I18n.ERR_309, "unbind encoder exception" ) );
}