/**
* @see org.apache.slide.store.SequenceStore#nextSequenceValue(java.lang.String)
*/
public long nextSequenceValue(String sequenceName) throws ServiceAccessException {
if (!isSequenceSupported()) {
throw new ServiceAccessException(this, "Sequences not supported");
}
Connection connection = null;
try {
connection = getNewConnection();
return ((SequenceAdapter) adapter).nextSequenceValue(connection, sequenceName);
} catch (SQLException e) {
throw new ServiceAccessException(this, e);
} finally {
if (connection != null) {
try {
if (!tmCommits) {
connection.commit();
}
} catch (SQLException e) {
throw new ServiceAccessException(this, e);
} finally {
try {
connection.close();
} catch (SQLException e) {
getLogger().log(e, LOG_CHANNEL, Logger.WARNING);