List of usage examples for org.springframework.jca.cci.core InteractionCallback doInInteraction
@Nullable
T doInInteraction(Interaction interaction, ConnectionFactory connectionFactory)
throws ResourceException, SQLException, DataAccessException;
From source file:org.springframework.jca.cci.core.CciTemplate.java
@Override @Nullable/* ww w .jav a2 s. c o m*/ public <T> T execute(final InteractionCallback<T> action) throws DataAccessException { Assert.notNull(action, "Callback object must not be null"); return execute((ConnectionCallback<T>) (connection, connectionFactory) -> { Interaction interaction = connection.createInteraction(); try { return action.doInInteraction(interaction, connectionFactory); } finally { closeInteraction(interaction); } }); }