Code example for DataSource

Methods: getConnection

0
        realPassword = password;
      } 
 
      if (realUser == null)
      { 
        final Connection connection = ds.getConnection();
        if (connection == null)
        { 
          throw new SQLException("JNDI DataSource is invalid; it returned null without throwing a meaningful error.");
        } 
        if (connection instanceof OlapConnection)
        { 
          return (OlapConnection) connection;
        } 
        if (connection instanceof OlapWrapper)
        { 
          final OlapWrapper wrapper = (OlapWrapper) connection;
          return wrapper.unwrap(OlapConnection.class);
        } 
        throw new SQLException("Unable to unwrap the connection: " + connectionPath); //$NON-NLS-1$
      }