@Override
    public Object openConnection()
    throws ConnectionException, AdapterException {
        try {
            int k = hostport.indexOf(':');
            if (k<0) throw new AdapterException("Invalid host:port specification - " + hostport);
            connection = new SoccomClient(hostport.substring(0,k), Integer.parseInt(hostport.substring(k+1)));
            return connection;
        } catch (SoccomException e) {
            if (e.getErrorCode()==SoccomException.CONNECT)
                throw new ConnectionException(ConnectionException.CONNECTION_DOWN, e.getMessage(), e);
            else throw new AdapterException(e.getErrorCode(), e.getMessage(), e);
        }
    }
@ Override public Object openConnection ( ) throws ConnectionException , AdapterException { try { int k = hostport . indexOf ( ':' ) ; if ( k < 0 ) throw new AdapterException ( "Invalid host:port specification - " + hostport ) ; connection = new SoccomClient ( hostport . substring ( 0 , k ) , Integer . parseInt ( hostport . substring ( k + 1 ) ) ) ; return connection ; } catch ( SoccomException e ) { if ( e . getErrorCode ( ) == SoccomException . CONNECT ) throw new ConnectionException ( ConnectionException . CONNECTION_DOWN , e . getMessage ( ) , e ) ; else throw new AdapterException ( e . getErrorCode ( ) , e . getMessage ( ) , e ) ; } }
This method must be implemented for PoolableAdapter