Package org.teiid.net

Examples of org.teiid.net.ConnectionException


        try {
          this.result = this.getService(ILogon.class).logon(this.connectionProperties);
        } catch (LogonException e) {
            // Propagate the original message as it contains the message we want
            // to give to the user
            throw new ConnectionException(e, e.getMessage());
        } catch (TeiidComponentException e) {
          if (e.getCause() instanceof CommunicationException) {
            throw (CommunicationException)e.getCause();
          }
            throw new CommunicationException(e);
View Full Code Here


                    }
                  }
              } catch (LogonException e) {
                  // Propagate the original message as it contains the message we want
                  // to give to the user
                  throw new ConnectionException(e, e.getMessage());
              } catch (TeiidComponentException e) {
                if (e.getCause() instanceof CommunicationException) {
                  throw (CommunicationException)e.getCause();
                }
                  throw new CommunicationException(e, JDBCPlugin.Util.getString("PlatformServerConnectionFactory.Unable_to_find_a_component_used_in_logging_on_to")); //$NON-NLS-1$
View Full Code Here

    } else {
      ILogon logonInstance = this.serverInstance.getService(ILogon.class);
      try {
        this.logon(logonInstance, true);
      } catch (LogonException e) {
        throw new ConnectionException(e);
      } catch (TeiidComponentException e) {
        throw new CommunicationException(e);
      }
    }
  }
View Full Code Here

   
    TeiidURL url;
    try {
      url = new TeiidURL(connectionProperties.getProperty(TeiidURL.CONNECTION.SERVER_URL));
    } catch (MalformedURLException e1) {
      throw new ConnectionException(e1);
    }
   
    String discoveryStrategyName = connectionProperties.getProperty(TeiidURL.CONNECTION.DISCOVERY_STRATEGY, URL);

    ServerDiscovery discovery;

    if (URL.equalsIgnoreCase(discoveryStrategyName)) {
      discovery = new UrlServerDiscovery();
    } else {
      try {
        discovery = (ServerDiscovery)ReflectionHelper.create(discoveryStrategyName, null, this.getClass().getClassLoader());
      } catch (TeiidException e) {
        throw new ConnectionException(e);
      }
    }
   
    discovery.init(url, connectionProperties);
   
View Full Code Here

        SQLStates.CONNECTION_EXCEPTION_STALE_CONNECTION);
    testCreateThrowable(
        new ConnectException("A test connection attempt exception"), //$NON-NLS-1$
        SQLStates.CONNECTION_EXCEPTION_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION);
    testCreateThrowable(
        new ConnectionException("A test MM Connection Exception"), //$NON-NLS-1$
        SQLStates.CONNECTION_EXCEPTION_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION);
    testCreateThrowable(new IOException(
        "A test Generic java.io.IOException"), //$NON-NLS-1$
        SQLStates.CONNECTION_EXCEPTION_STALE_CONNECTION);
    testCreateThrowable(
View Full Code Here

TOP

Related Classes of org.teiid.net.ConnectionException

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.