use of org.apache.cxf.ws.rm.persistence.RMStoreException in project cxf by apache.
the class RMTxStore method createDestinationSequence.
// RMStore interface
public void createDestinationSequence(DestinationSequence seq) {
String sequenceIdentifier = seq.getIdentifier().getValue();
String endpointIdentifier = seq.getEndpointIdentifier();
String protocolVersion = encodeProtocolVersion(seq.getProtocol());
if (LOG.isLoggable(Level.FINE)) {
LOG.info("Creating destination sequence: " + sequenceIdentifier + ", (endpoint: " + endpointIdentifier + ")");
}
Connection con = verifyConnection();
PreparedStatement stmt = null;
SQLException conex = null;
try {
beginTransaction();
stmt = getStatement(con, CREATE_DEST_SEQUENCE_STMT_STR);
stmt.setString(1, sequenceIdentifier);
String addr = seq.getAcksTo().getAddress().getValue();
stmt.setString(2, addr);
stmt.setString(3, endpointIdentifier);
stmt.setString(4, protocolVersion);
stmt.execute();
commit(con);
} catch (SQLException ex) {
abort(con);
conex = ex;
throw new RMStoreException(ex);
} finally {
releaseResources(stmt, null);
updateConnectionState(con, conex);
}
}
Aggregations