}
protected void createSequence(ClassDescriptor cld, String sequenceName) throws Exception
{
Statement stmt = null;
StatementManagerIF stmtMan = getBrokerForClass().serviceStatementManager();
// arminw: never try to remove existing sequences, because this may lead in unexpected behaviour
// if the reason for the create call isn't a missing sequence (e.g. network problems)
// try
// {
// stmt = stmtMan.getGenericStatement(cld, Query.NOT_SCROLLABLE);
// stmt.execute(getPlatform().dropSequenceQuery(sequenceName));
// }
// catch (Exception ignore)
// {
// // ignore it
// }
// finally
// {
// try
// {
// stmtMan.closeResources(stmt, null);
// }
// catch (Exception ignore)
// {
// // ignore it
// }
// }
try
{
stmt = stmtMan.getGenericStatement(cld, Query.NOT_SCROLLABLE);
stmt.execute(getPlatform().createSequenceQuery(sequenceName, getConfigurationProperties()));
}
finally
{
try
{
stmtMan.closeResources(stmt, null);
}
catch (Exception e)
{
e.printStackTrace();
}