|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DdlMultipleTransactionStmt
DdlMultipleTransactionStmt represents a DdlStmt that requires its work to divided among multiple repository transactions to avoid holding the repository transaction lock for excessive periods of time (and thereby blocking other statements).
NOTE jvs 11-Dec-2008: the implementations of executeUnlocked and completeAfterExecuteUnlocked should not reuse references to repository objects obtained during the initial repository transaction, as they may be stale. Instead, MOFID's should be used to reload references as needed.
Method Summary | |
---|---|
void |
completeAfterExecuteUnlocked(FarragoSessionDdlValidator ddlValidator,
FarragoSession session,
boolean success)
Provides access to the repository after execution of the DDL. |
boolean |
completeRequiresWriteTxn()
Checks whether the completeAfterExecuteUnlocked(
FarragoSessionDdlValidator, FarragoSession, boolean) method requires a
repository write transaction. |
void |
executeUnlocked(FarragoSessionDdlValidator ddlValidator,
FarragoSession session)
Executes long-running DDL actions. |
void |
prepForExecuteUnlocked(FarragoSessionDdlValidator ddlValidator,
FarragoSession session)
Provides access to the repository in preparation for the execution of DdlStmt. |
Methods inherited from interface net.sf.farrago.session.FarragoSessionDdlStmt |
---|
getModelElement, isDropRestricted, postCommit, postExecute, preExecute, preValidate, requiresCommit, runsAsDml |
Method Detail |
---|
void prepForExecuteUnlocked(FarragoSessionDdlValidator ddlValidator, FarragoSession session)
ddlValidator
- DDL validator for this statementFarragoReposTxnContext
void executeUnlocked(FarragoSessionDdlValidator ddlValidator, FarragoSession session)
ddlValidator
- DDL validator for this statementsession
- reentrant Farrago session which may be used to execute DML
statementsboolean completeRequiresWriteTxn()
completeAfterExecuteUnlocked(
FarragoSessionDdlValidator, FarragoSession, boolean)
method requires a
repository write transaction.
void completeAfterExecuteUnlocked(FarragoSessionDdlValidator ddlValidator, FarragoSession session, boolean success)
executeUnlocked(FarragoSessionDdlValidator, FarragoSession)
.
This method is invoked in a locked
repository
transaction. The method completeRequiresWriteTxn()
controls
whether the transaction read-only or not. This method may not access
and/or modify repository objects loaded in a previous transaction unless
they are reloaded by MOF ID. Be aware that objects may have been modified
by another session unless some external mechanism (for instance, the
"table-in-use" collection) guarantees that they have not been modified by
another statement.
Note that any repository modifications made during the execution of
this method will not be post-processed by DdlValidator
.
For instance, DdlValidator.checkJmiConstraints(RefObject)
is not
called, and therefore any mandatory default primitives are not
automatically set, which will cause errors later if the attributes have
not been explicitly initialized. See JmiObjUtil.setMandatoryPrimitiveDefaults(javax.jmi.reflect.RefObject)
.
ddlValidator
- DDL validator for this statementsession
- reentrant Farrago session which may be used to execute DML
statementssuccess
- whether the execution succeeded; detection of failure can
be used to recover
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |