Example usage for org.springframework.jca.cci.core CciTemplate CciTemplate

List of usage examples for org.springframework.jca.cci.core CciTemplate CciTemplate

Introduction

In this page you can find the example usage for org.springframework.jca.cci.core CciTemplate CciTemplate.

Prototype

public CciTemplate(ConnectionFactory connectionFactory, @Nullable ConnectionSpec connectionSpec) 

Source Link

Document

Construct a new CciTemplate, given a ConnectionFactory to obtain Connections from.

Usage

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

/**
 * Create a template derived from this template instance,
 * inheriting the ConnectionFactory and other settings but
 * overriding the ConnectionSpec used for obtaining Connections.
 * @param connectionSpec the CCI ConnectionSpec that the derived template
 * instance is supposed to obtain Connections for
 * @return the derived template instance
 * @see #setConnectionSpec/*from   w  w  w  . j  a  v  a 2  s.co  m*/
 */
public CciTemplate getDerivedTemplate(ConnectionSpec connectionSpec) {
    CciTemplate derived = new CciTemplate(obtainConnectionFactory(), connectionSpec);
    RecordCreator recordCreator = getOutputRecordCreator();
    if (recordCreator != null) {
        derived.setOutputRecordCreator(recordCreator);
    }
    return derived;
}