Example usage for javax.resource NotSupportedException NotSupportedException

List of usage examples for javax.resource NotSupportedException NotSupportedException

Introduction

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

Prototype

public NotSupportedException(Throwable cause) 

Source Link

Document

Constructs a new throwable with the specified cause.

Usage

From source file:me.jtalk.socketconnector.SocketResourceAdapter.java

@Override
public void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec)
        throws ResourceException {
    log.info("Endpoint activation request received for class {0}",
            endpointFactory.getEndpointClass().getCanonicalName());
    if (!this.running.get()) {
        throw new ResourceException("This resource adapter is stopped");
    }//from w  w  w  .  ja va 2 s. c  om
    if (!(spec instanceof TCPActivationSpec)) {
        throw new NotSupportedException(
                "Activation spec supplied has unsupported type " + spec.getClass().getCanonicalName());
    } else {
        log.info("Endpoint activation for class {0}", endpointFactory.getEndpointClass().getCanonicalName());
        this.activateTCP(endpointFactory, (TCPActivationSpec) spec);
        log.info("Endpoint activated for class {0}", endpointFactory.getEndpointClass().getCanonicalName());
    }
}

From source file:eu.luminis.httpjca.HttpManagedConnection.java

/**
 * Returns an <code>javax.resource.spi.LocalTransaction</code> instance.
 *
 * @return LocalTransaction instance//from w  w w.j  a v  a2s .c  o  m
 * @throws ResourceException generic exception if operation fails
 */
public LocalTransaction getLocalTransaction() throws ResourceException {
    throw new NotSupportedException("getLocalTransaction() not supported");
}

From source file:eu.luminis.httpjca.HttpManagedConnection.java

/**
 * Returns an <code>javax.transaction.xa.XAresource</code> instance. 
 *
 * @return XAResource instance//ww  w .  j  a  va 2 s  . c o m
 * @throws ResourceException generic exception if operation fails
 */
public XAResource getXAResource() throws ResourceException {
    throw new NotSupportedException("getXAResource() not supported");
}

From source file:org.springframework.jca.cci.connection.SingleConnectionFactory.java

@Override
public Connection getConnection(ConnectionSpec connectionSpec) throws ResourceException {
    throw new NotSupportedException("SingleConnectionFactory does not support custom ConnectionSpec");
}

From source file:org.springframework.jca.context.SpringContextResourceAdapter.java

/**
 * This implementation always throws a NotSupportedException.
 *//*from   w ww .  ja v a  2 s.com*/
@Override
public void endpointActivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec)
        throws ResourceException {

    throw new NotSupportedException("SpringContextResourceAdapter does not support message endpoints");
}