Package org.copperengine.core.persistent
Class OracleSimpleDialect
- java.lang.Object
-
- org.copperengine.core.persistent.AbstractSqlDialect
-
- org.copperengine.core.persistent.OracleSimpleDialect
-
- All Implemented Interfaces:
DatabaseDialect
,org.copperengine.management.DatabaseDialectMXBean
public class OracleSimpleDialect extends AbstractSqlDialect
Oracle implementation of theScottyDBStorageInterface
.
-
-
Field Summary
-
Fields inherited from class org.copperengine.core.persistent.AbstractSqlDialect
ACQUIRE_BLOCKING_WAIT_SEC, dbBatchingLatencyMSec, defaultStaleResponseRemovalTimeout, multiEngineMode, queryUpdateQueueState, selectQueueSizeStmtStatistic, serializer, supportsClob, supportsMultipleEngines
-
-
Constructor Summary
Constructors Constructor Description OracleSimpleDialect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addLimitation(java.lang.StringBuilder sql, int max)
protected void
addLimitationAndOffset(java.lang.StringBuilder sql, int max, int offset)
BatchCommand
createBatchCommand4error(Workflow<?> w, java.lang.Throwable t, DBProcessingState dbProcessingState, Acknowledge ack)
BatchCommand
createBatchCommand4NotifyNoEarlyResponseHandling(Response<?> response, Acknowledge ack)
protected java.sql.PreparedStatement
createDeleteStaleResponsesStmt(java.sql.Connection c, int MAX_ROWS)
protected java.sql.PreparedStatement
createDequeueStmt(java.sql.Connection c, java.lang.String ppoolId, int max)
protected java.sql.PreparedStatement
createQueryAllActiveStmt(java.sql.Connection c, java.lang.String className, int max)
protected java.sql.PreparedStatement
createUpdateStateStmt(java.sql.Connection c, int max)
protected void
doLock(java.sql.Connection con, java.lang.String lockContext)
Locks on the lockContext, implement this to provide multiple engine support It will block wait until the lock was successfully hold, must be used together withAbstractSqlDialect.releaseLock(java.sql.Connection, java.lang.String)
protected void
doReleaseLock(java.sql.Connection con, java.lang.String lockContext)
Releases the lock on the lockContext, use together withAbstractSqlDialect.lock(Connection, String)
java.lang.String
getDialectDescription()
void
insert(Workflow<?> wf, java.sql.Connection con)
int
queryQueueSize(java.lang.String processorPoolId, int max, java.sql.Connection con)
java.util.Date
readDatabaseClock(java.sql.Connection con)
Read the current system time from the underlying database system-
Methods inherited from class org.copperengine.core.persistent.AbstractSqlDialect
checkDbConsistency, computeLockId, countAuditTrailInstances, countWorkflowInstances, createBatchCommand4Finish, createBatchCommand4Notify, createBatchCommand4registerCallback, createReadStmt, decode, deleteBroken, deleteFiltered, deleteStaleResponse, deleteWaiting, dequeue, getDbBatchingLatencyMSec, getDefaultStaleResponseRemovalTimeout, getResourceAsString, getResourceAsString, getWorkflowPersistencePlugin, insert, isBlank, isRemoveWhenFinished, lock, notify, queryAllActive, queryAuditTrailInstances, queryAuditTrailMessage, queryObjectState, queryWorkflowInstances, read, releaseLock, restart, restartAll, restartFiltered, resumeBrokenBusinessProcesses, setDbBatchingLatencyMSec, setDefaultStaleResponseRemovalTimeout, setEngineId, setEngineIdProvider, setMultiEngineMode, setRemoveWhenFinished, setRuntimeStatisticsCollector, setSerializer, setWfRepository, setWorkflowPersistencePlugin, shutdown, splitt, startup, updateQueueState
-
-
-
-
Method Detail
-
createUpdateStateStmt
protected java.sql.PreparedStatement createUpdateStateStmt(java.sql.Connection c, int max) throws java.sql.SQLException
- Specified by:
createUpdateStateStmt
in classAbstractSqlDialect
- Throws:
java.sql.SQLException
-
createDequeueStmt
protected java.sql.PreparedStatement createDequeueStmt(java.sql.Connection c, java.lang.String ppoolId, int max) throws java.sql.SQLException
- Specified by:
createDequeueStmt
in classAbstractSqlDialect
- Throws:
java.sql.SQLException
-
createDeleteStaleResponsesStmt
protected java.sql.PreparedStatement createDeleteStaleResponsesStmt(java.sql.Connection c, int MAX_ROWS) throws java.sql.SQLException
- Specified by:
createDeleteStaleResponsesStmt
in classAbstractSqlDialect
- Throws:
java.sql.SQLException
-
createBatchCommand4error
public BatchCommand createBatchCommand4error(Workflow<?> w, java.lang.Throwable t, DBProcessingState dbProcessingState, Acknowledge ack)
- Specified by:
createBatchCommand4error
in interfaceDatabaseDialect
- Specified by:
createBatchCommand4error
in classAbstractSqlDialect
-
createBatchCommand4NotifyNoEarlyResponseHandling
public BatchCommand createBatchCommand4NotifyNoEarlyResponseHandling(Response<?> response, Acknowledge ack) throws java.lang.Exception
- Specified by:
createBatchCommand4NotifyNoEarlyResponseHandling
in classAbstractSqlDialect
- Throws:
java.lang.Exception
-
getDialectDescription
public java.lang.String getDialectDescription()
-
createQueryAllActiveStmt
protected java.sql.PreparedStatement createQueryAllActiveStmt(java.sql.Connection c, java.lang.String className, int max) throws java.sql.SQLException
- Specified by:
createQueryAllActiveStmt
in classAbstractSqlDialect
- Throws:
java.sql.SQLException
-
doLock
protected void doLock(java.sql.Connection con, java.lang.String lockContext) throws java.sql.SQLException
Description copied from class:AbstractSqlDialect
Locks on the lockContext, implement this to provide multiple engine support It will block wait until the lock was successfully hold, must be used together withAbstractSqlDialect.releaseLock(java.sql.Connection, java.lang.String)
- Overrides:
doLock
in classAbstractSqlDialect
- Parameters:
con
- connection object on which the lock will be acquired onlockContext
- String for the lock name (Will be transformed to an int byAbstractSqlDialect.computeLockId(String)
.- Throws:
java.sql.SQLException
- If anything goes wrong in acquiring the lock on the database
-
doReleaseLock
protected void doReleaseLock(java.sql.Connection con, java.lang.String lockContext)
Description copied from class:AbstractSqlDialect
Releases the lock on the lockContext, use together withAbstractSqlDialect.lock(Connection, String)
- Overrides:
doReleaseLock
in classAbstractSqlDialect
- Parameters:
con
- connection object on which the lock will be released onlockContext
- String for the lock name
-
insert
public void insert(Workflow<?> wf, java.sql.Connection con) throws java.lang.Exception
- Specified by:
insert
in interfaceDatabaseDialect
- Overrides:
insert
in classAbstractSqlDialect
- Throws:
java.lang.Exception
-
readDatabaseClock
public java.util.Date readDatabaseClock(java.sql.Connection con) throws java.sql.SQLException
Description copied from interface:DatabaseDialect
Read the current system time from the underlying database system- Specified by:
readDatabaseClock
in interfaceDatabaseDialect
- Overrides:
readDatabaseClock
in classAbstractSqlDialect
- Parameters:
con
- database connection- Returns:
- Current database clock time
- Throws:
java.sql.SQLException
- Any sql error happening in here.
-
queryQueueSize
public int queryQueueSize(java.lang.String processorPoolId, int max, java.sql.Connection con) throws java.sql.SQLException
- Specified by:
queryQueueSize
in interfaceDatabaseDialect
- Overrides:
queryQueueSize
in classAbstractSqlDialect
- Throws:
java.sql.SQLException
-
addLimitation
protected void addLimitation(java.lang.StringBuilder sql, int max)
- Specified by:
addLimitation
in classAbstractSqlDialect
-
addLimitationAndOffset
protected void addLimitationAndOffset(java.lang.StringBuilder sql, int max, int offset)
- Specified by:
addLimitationAndOffset
in classAbstractSqlDialect
-
-