Example usage for javax.resource.cci Interaction close

List of usage examples for javax.resource.cci Interaction close

Introduction

In this page you can find the example usage for javax.resource.cci Interaction close.

Prototype

public void close() throws ResourceException;

Source Link

Document

Closes the current Interaction and release all the resources held for this instance by the resource adapter.

Usage

From source file:org.springframework.jca.cci.core.CciTemplate.java

/**
 * Close the given CCI Interaction and ignore any thrown exception.
 * This is useful for typical finally blocks in manual CCI code.
 * @param interaction the CCI Interaction to close
 * @see javax.resource.cci.Interaction#close()
 *///www  .  java  2 s.  c o  m
private void closeInteraction(@Nullable Interaction interaction) {
    if (interaction != null) {
        try {
            interaction.close();
        } catch (ResourceException ex) {
            logger.trace("Could not close CCI Interaction", ex);
        } catch (Throwable ex) {
            // We don't trust the CCI driver: It might throw RuntimeException or Error.
            logger.trace("Unexpected exception on closing CCI Interaction", ex);
        }
    }
}