Package org.teiid.net

Examples of org.teiid.net.CommunicationException


   *
   * Tests various simple exceptions to see if the expected SQLState is
   * returend.
   */
  public void testCreateThrowable_01() {
    testCreateThrowable(new CommunicationException(
        "A test MM Communication Exception"), //$NON-NLS-1$
        SQLStates.CONNECTION_EXCEPTION_STALE_CONNECTION);
    testCreateThrowable(
        new ConnectException("A test connection attempt exception"), //$NON-NLS-1$
        SQLStates.CONNECTION_EXCEPTION_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION);
View Full Code Here


   * Tests various nested exceptions to see if the expected SQLState is
   * returend.
   */
  public void testCreateThrowable_02() {
    testCreateThrowable(
        new CommunicationException(new ConnectException(
            "A test java.net.ConnectException"), //$NON-NLS-1$
            "Test Communication Exception with a ConnectException in it"), //$NON-NLS-1$
        SQLStates.CONNECTION_EXCEPTION_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION);
    testCreateThrowable(new CommunicationException(new SocketException(
        "A test java.net.SocketException"), //$NON-NLS-1$
        "Test Communication Exception with a SocketException in it"), //$NON-NLS-1$
        SQLStates.CONNECTION_EXCEPTION_STALE_CONNECTION);
    testCreateThrowable(
        new TeiidException(new SocketTimeoutException(
View Full Code Here

    Thread.sleep(70);
    logon.ping();
  }
 
  @Test(expected=CommunicationException.class) public void testImmediateFail() throws Exception {
    SocketServerConnection connection = createConnection(new CommunicationException());
    ILogon logon = connection.getService(ILogon.class);
    logon.ping();
  }
View Full Code Here

    ILogon logon = connection.getService(ILogon.class);
    logon.ping();
  }
 
  @Test(expected=CommunicationException.class) public void testImmediateFail1() throws Exception {
    SocketServerConnection connection = createConnection(new CommunicationException());
    connection.setFailOver(true);
    ILogon logon = connection.getService(ILogon.class);
    logon.ping();
  }
View Full Code Here

    @Override
    public ResultsFuture<?> ping()
        throws TeiidComponentException, CommunicationException {
      if (t != null) {
        if (t instanceof CommunicationException) {
          CommunicationException ce = (CommunicationException)t;
          t = null;
          throw ce;
        }
        TeiidComponentException e = new TeiidComponentException(t);
        t = null;
View Full Code Here

TOP

Related Classes of org.teiid.net.CommunicationException

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.