Skip to content

Implement a transaction factory service #4780

@xal1983

Description

@xal1983

The current approach to creating transaction scopes is a bit limiting. You can define the isolation level and timeout in TransactionalAttribute, but this becomes a static value that you cannot alter without releasing a new build.
Also, the attribute uses the default value for isolation level defined in DataOptions. However, because the value is fixed in the contructor, there is no way to adjust this after the fact.

Describe the solution you'd like
Make "Unspecified" the default isolation level for TransactionalAttribute, so that at the time of creating the Transaction, if the value for the TransactionalAttribute is "Unspecified", we can use the global configuration value.
Create a TransactionFactory service that the TransactionalDataPortal calls in order to create the transaction. This service can receive information about the type, dataportal operation, method name and the instance of the transactional attribute, allowing for fine control of the creation of the transaction.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions