Code example for LoginException

0
    public boolean abort() throws LoginException { 
         
        try { 
            krbTicket.destroy();
        } catch (DestroyFailedException e) {
            throw new LoginException();
        } 
 
        client = null;
        krbTicket = null;
         
        return true; 
    } 
 
    public boolean commit() throws LoginException { 
        subject.getPrincipals().add(client);
        subject.getPrivateCredentials().add(krbTicket);
        return true; 
    } 
 
    public void initialize(Subject subject, CallbackHandler callbackHandler,