Package org.teiid.client.security

Examples of org.teiid.client.security.InvalidSessionException


    } catch (SessionServiceException e) {
      throw new TeiidComponentException(e);
    }
   
    if (sessionInfo == null) {
      throw new InvalidSessionException();
    }
   
    SessionToken st = sessionInfo.getSessionToken();
    if (!st.equals(checkSession)) {
      throw new InvalidSessionException();
    }
    this.updateDQPContext(sessionInfo);
  }
View Full Code Here


  @Override
  public void closeSession(String sessionID) throws InvalidSessionException {
    LogManager.logDetail(LogConstants.CTX_SECURITY, new Object[] {"closeSession", sessionID}); //$NON-NLS-1$
    if (sessionID == null) {
      throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
    }
    SessionMetadata info = this.sessionCache.remove(sessionID);
    if (info == null) {
      throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
    }
    if (info.getVDBName() != null) {
            try {
          dqp.terminateSession(info.getSessionId());
            } catch (Exception e) {
View Full Code Here

  }

  private SessionMetadata getSessionInfo(String sessionID)
      throws InvalidSessionException {
    if (sessionID == null) {
      throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
    }
    SessionMetadata info = this.sessionCache.get(sessionID);
    if (info == null) {
      throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
    }
    return info;
  }
View Full Code Here

      }
     
      @Override
      public void assertIdentity(SessionToken checkSession)
          throws InvalidSessionException, TeiidComponentException {
        throw new InvalidSessionException();
      }

    }, null);
    server.registerClientService(FakeService.class, new TestSocketRemoting.FakeServiceImpl(), null);
    return new SocketListener(address.getPort(), address.getAddress().getHostAddress(), 1024, 1024, 1, config, server, BufferManagerFactory.getStandaloneBufferManager());
View Full Code Here

  @Test public void testNotification() throws Exception {
    XAConnectionImpl xaConn = new XAConnectionImpl(new XAConnectionImpl.ConnectionSource() {
      @Override
      public ConnectionImpl createConnection() throws SQLException {
        ConnectionImpl c = Mockito.mock(ConnectionImpl.class);
        Mockito.doThrow(new SQLException(new InvalidSessionException())).when(c).commit();
        return c;
      }
    });
    ConnectionEventListener cel = Mockito.mock(ConnectionEventListener.class);
    xaConn.addConnectionEventListener(cel);
View Full Code Here

TOP

Related Classes of org.teiid.client.security.InvalidSessionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.