public synchronized String getNextId() { if (lastId<nextId) { getNewBlock(); } long _nextId = nextId++; return Long.toString(_nextId); }
public DbIdGenerator() { reset(); }
protected void initIdGenerator() { if (idGenerator == null) { CommandExecutor idGeneratorCommandExecutor = null; if (idGeneratorDataSource != null) { ProcessEngineConfigurationImpl processEngineConfiguration = new StandaloneProcessEngineConfiguration(); processEngineConfiguration.setDataSource(idGeneratorDataSource); processEngineConfiguration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_FALSE); processEngineConfiguration.init(); idGeneratorCommandExecutor = processEngineConfiguration.getCommandExecutorTxRequiresNew(); } else if (idGeneratorDataSourceJndiName != null) { ProcessEngineConfigurationImpl processEngineConfiguration = new StandaloneProcessEngineConfiguration(); processEngineConfiguration.setDataSourceJndiName(idGeneratorDataSourceJndiName); processEngineConfiguration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_FALSE); processEngineConfiguration.init(); idGeneratorCommandExecutor = processEngineConfiguration.getCommandExecutorTxRequiresNew(); } else { idGeneratorCommandExecutor = commandExecutorTxRequiresNew; } DbIdGenerator dbIdGenerator = new DbIdGenerator(); dbIdGenerator.setIdBlockSize(idBlockSize); dbIdGenerator.setCommandExecutor(idGeneratorCommandExecutor); idGenerator = dbIdGenerator; } }
protected void initIdGenerator() { if (idGenerator == null) { CommandExecutor idGeneratorCommandExecutor = null; if (idGeneratorDataSource != null) { ProcessEngineConfigurationImpl processEngineConfiguration = new StandaloneProcessEngineConfiguration(); processEngineConfiguration.setDataSource(idGeneratorDataSource); processEngineConfiguration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_FALSE); processEngineConfiguration.init(); idGeneratorCommandExecutor = processEngineConfiguration.getCommandExecutorTxRequiresNew(); } else if (idGeneratorDataSourceJndiName != null) { ProcessEngineConfigurationImpl processEngineConfiguration = new StandaloneProcessEngineConfiguration(); processEngineConfiguration.setDataSourceJndiName(idGeneratorDataSourceJndiName); processEngineConfiguration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_FALSE); processEngineConfiguration.init(); idGeneratorCommandExecutor = processEngineConfiguration.getCommandExecutorTxRequiresNew(); } else { idGeneratorCommandExecutor = commandExecutorTxRequiresNew; } DbIdGenerator dbIdGenerator = new DbIdGenerator(); dbIdGenerator.setIdBlockSize(idBlockSize); dbIdGenerator.setCommandExecutor(idGeneratorCommandExecutor); idGenerator = dbIdGenerator; } }
protected void initIdGenerator() { if (idGenerator == null) { CommandExecutor idGeneratorCommandExecutor = null; if (idGeneratorDataSource != null) { ProcessEngineConfigurationImpl processEngineConfiguration = new StandaloneProcessEngineConfiguration(); processEngineConfiguration.setDataSource(idGeneratorDataSource); processEngineConfiguration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_FALSE); processEngineConfiguration.init(); idGeneratorCommandExecutor = processEngineConfiguration.getCommandExecutorTxRequiresNew(); } else if (idGeneratorDataSourceJndiName != null) { ProcessEngineConfigurationImpl processEngineConfiguration = new StandaloneProcessEngineConfiguration(); processEngineConfiguration.setDataSourceJndiName(idGeneratorDataSourceJndiName); processEngineConfiguration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_FALSE); processEngineConfiguration.init(); idGeneratorCommandExecutor = processEngineConfiguration.getCommandExecutorTxRequiresNew(); } else { idGeneratorCommandExecutor = commandExecutorTxRequiresNew; } DbIdGenerator dbIdGenerator = new DbIdGenerator(); dbIdGenerator.setIdBlockSize(idBlockSize); dbIdGenerator.setCommandExecutor(idGeneratorCommandExecutor); idGenerator = dbIdGenerator; } }
public DbIdGenerator() { reset(); }
public synchronized String getNextId() { if (lastId<nextId) { getNewBlock(); } long _nextId = nextId++; return Long.toString(_nextId); }
public static void resetIdGenerator(ProcessEngineConfigurationImpl processEngineConfiguration) { IdGenerator idGenerator = processEngineConfiguration.getIdGenerator(); if (idGenerator instanceof DbIdGenerator) { ((DbIdGenerator) idGenerator).reset(); } }
public synchronized String getNextId() { if (lastId<nextId) { getNewBlock(); } long _nextId = nextId++; return Long.toString(_nextId); }
public static void resetIdGenerator(ProcessEngineConfigurationImpl processEngineConfiguration) { IdGenerator idGenerator = processEngineConfiguration.getIdGenerator(); if (idGenerator instanceof DbIdGenerator) { ((DbIdGenerator) idGenerator).reset(); } }
public DbIdGenerator() { reset(); }
public static void resetIdGenerator(ProcessEngineConfigurationImpl processEngineConfiguration) { IdGenerator idGenerator = processEngineConfiguration.getIdGenerator(); if (idGenerator instanceof DbIdGenerator) { ((DbIdGenerator) idGenerator).reset(); } }