Example usage for javax.resource ResourceException ResourceException

List of usage examples for javax.resource ResourceException ResourceException

Introduction

In this page you can find the example usage for javax.resource ResourceException ResourceException.

Prototype

public ResourceException(Throwable cause) 

Source Link

Document

Constructs a new throwable with the specified cause.

Usage

From source file:org.teiid.test.teiid4441.FTPClientFactory.java

public FTPClient createClient() throws IOException, ResourceException {

    FTPClient client = createClientInstance();

    beforeConnectProcessing(client);/*from   w  ww. ja  v  a 2 s.com*/

    client.connect(this.host, this.port);

    if (!FTPReply.isPositiveCompletion(client.getReplyCode())) {
        throw new ResourceException("ftp_connect_failed");
    }

    if (!client.login(this.username, this.password)) {
        throw new IllegalStateException("ftp_login_failed"); //$NON-NLS-1$
    }

    afterConnectProcessing(client);

    return client;

}