+ ldapService.getAddress() + " has been successfully unbound.", "Success!",
+ requestor.getLocalAddress() + " has been successfully unbound.", "Success!",
                public void actionPerformed( java.awt.event.ActionEvent e )                {                    int input = JOptionPane.showConfirmDialog( SessionsFrame.this,                        "Selecting no will send a notice of disconnect ONLY.  "                            + "\nSelecting yes will send both.  Cancel will abort unbind.",                        "Send graceful disconnect before disconnect notice?", JOptionPane.YES_NO_CANCEL_OPTION );                    IoAcceptor acceptor = minaRegistry.getAcceptor( ldapService.getTransportType() );                    List sessions = new ArrayList( acceptor.getManagedSessions( ldapService.getAddress() ) );                    //                    ServerLdapContext ctx;                    //                    try                    //                    {                    //                        ctx = ( ServerLdapContext ) SessionRegistry.getSingleton()                    //                            .getLdapContext( requestor, null, false );                    //                    }                    //                    catch ( NamingException ne )                    //                    {                    //                        JOptionPane.showInternalMessageDialog( SessionsFrame.this,                     //                            ne.getMessage(), "Encountered an Error", JOptionPane.ERROR_MESSAGE );                    //                        log.warn( "Could not access requestor's context.", ne );                    //                        return;                    //                    }                    //                    DirectoryService service = ctx.getService();                    //                    StartupConfiguration cfg = service.getConfiguration().getStartupConfiguration();                    // might add an exit vm feature using the default from the                     // configuration property                    if ( input == JOptionPane.CANCEL_OPTION )                    {                        return;                    }                    else if ( input == JOptionPane.NO_OPTION )                    {                        GracefulShutdownHandler.sendNoticeOfDisconnect( sessions, requestor );                        minaRegistry.unbind( ldapService );                        isServiceBound = false;                        unbindItem.setEnabled( isServiceBound );                        bindItem.setEnabled( !isServiceBound );                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for "                            + ldapService.getAddress() + " has been successfully unbound.", "Success!",                            JOptionPane.INFORMATION_MESSAGE );                        refresh();                        return;                    }                    else                    {                        ShutdownDialog dialog = new ShutdownDialog();                        setCenteredPosition( SessionsFrame.this, dialog );                        dialog.setModal( true );                        dialog.setVisible( true );                        if ( dialog.isSendCanceled() )                        {                            log.debug( "GracefulShutdown was canceled." );                            JOptionPane.showMessageDialog( SessionsFrame.this, "Shutdown has been canceled.",                                "Graceful Shutdown Aborted", JOptionPane.OK_OPTION );                            return;                        }                        log.debug( "GracefulShutdown parameters captured." );                        int timeOffline = dialog.getTimeOffline();                        int delay = dialog.getDelay();                        GracefulDisconnect graceful = new GracefulDisconnect( timeOffline, delay );                        GracefulShutdownHandler.sendGracefulDisconnect( sessions, graceful, requestor );                        minaRegistry.unbind( ldapService );                        isServiceBound = false;                        unbindItem.setEnabled( isServiceBound );                        bindItem.setEnabled( !isServiceBound );                        // do progress dialog with bypass button to wait for delay time                        if ( delay > 0 )                        {                            ShutdownProgress progress = new ShutdownProgress();                            setCenteredPosition( SessionsFrame.this, progress );                            progress.setModal( true );                            progress.setTime( delay * 1000 );                            Thread t = new Thread( progress );                            t.start();                            progress.setVisible( true );                        }                        // now send the notice of disconnect                        GracefulShutdownHandler.sendNoticeOfDisconnect( sessions, requestor );                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for "                            + ldapService.getAddress() + " has been successfully unbound.", "Success!",                            JOptionPane.OK_OPTION );                        refresh();                    }                }