Package org.teiid.dqp.service

Examples of org.teiid.dqp.service.SessionServiceException


          String vdbVersion = properties.getProperty(TeiidURL.JDBC.VDB_VERSION);
          vdb = getActiveVDB(vdbName, vdbVersion);
        }

        if (sessionMaxLimit > 0 && getActiveSessionsCount() >= sessionMaxLimit) {
            throw new SessionServiceException(RuntimePlugin.Util.getString("SessionServiceImpl.reached_max_sessions", new Object[] {new Long(sessionMaxLimit)})); //$NON-NLS-1$
        }
       
        if (!domains.isEmpty() && authenticate) {
          // Authenticate user...
          // if not authenticated, this method throws exception
View Full Code Here


   
    int firstIndex = vdbName.indexOf('.');
    int lastIndex = vdbName.lastIndexOf('.');
    if (firstIndex != -1) {
      if (firstIndex != lastIndex || vdbVersion != null) {
        throw new SessionServiceException(RuntimePlugin.Util.getString("ambigious_name", vdbName, vdbVersion)); //$NON-NLS-1$
      }
      vdbVersion = vdbName.substring(firstIndex+1);
      vdbName = vdbName.substring(0, firstIndex);
    }
   
    try {
      if (vdbVersion == null) {
        vdbVersion = "latest"; //$NON-NLS-1$
        vdb = this.vdbRepository.getVDB(vdbName);
      }
      else {
        vdb = this.vdbRepository.getVDB(vdbName, Integer.parseInt(vdbVersion));
      }        
    } catch (NumberFormatException e) {
      throw new SessionServiceException(e, RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._3", vdbVersion)); //$NON-NLS-1$
    }
   
    if (vdb == null) {
      throw new SessionServiceException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._1", vdbName, vdbVersion)); //$NON-NLS-1$
    }
   
    if (vdb.getStatus() != VDB.Status.ACTIVE) {
      throw new SessionServiceException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, vdbVersion)); //$NON-NLS-1$
    }
    if (vdb.getConnectionType() == ConnectionType.NONE) {
      throw new SessionServiceException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._4", vdbName, vdbVersion)); //$NON-NLS-1$
    }
    return vdb;
  }
View Full Code Here

TOP

Related Classes of org.teiid.dqp.service.SessionServiceException

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.