Code example for LoginException

0
_rootContext.close();
        }  
        catch (NamingException e) 
        { 
            throw new LoginException("error closing root context: " + e.getMessage());
        } 
 
        return super.commit(); 
    } 
 
    public boolean abort() throws LoginException  
    { 
        try  
        { 
            _rootContext.close();
        }  
        catch (NamingException e) 
        { 
            throw new LoginException("error closing root context: " + e.getMessage());
        }