public interface Procedure
The execution of a procedure has the following features:
ServiceContext
)
or using a programmatic service (see ProgrammaticService
),commit threshold
has been specified.ReadOnlyProcedure
).
See also
Concurrency and isolation levels.information
can be added.A procedure is executed by calling one of the following methods:
Modifier and Type | Method and Description |
---|---|
void |
execute(ProcedureContext aContext)
The implementation of this method defines what this procedure actually does on the current
repository.
|
void execute(ProcedureContext aContext) throws Exception
If this method throws an exception, the container properly handles it so as to preserve integrity, by cancelling the current transaction.
Furthermore, if a ProcedureContext
method raises an exception, then any
preceding modifications made on the repository are first cancelled before the client code
gets the exception. This additional feature ensures
that the repository and cache remain consistent, even if the client code catches exceptions.
Performance warning: in semantic mode and if the current transaction has already performed some updates, cancelling the transaction can impact general performance. For more information, see Performance guidelines.
The following constraints apply:
This method is called each time one of following methods is called:
ServiceContext.execute(Procedure)
or ProgrammaticService.execute(Procedure)
.
Hence, it is possible that, for a single instance of this interface, this method could
be called concurrently by several threads. This depends on how the developer
manages the Procedure
instances in integrated
or programmatic
service.
Exception
TableTrigger