Process 18.0
New features and bugfix
Wildfly upgrade
The WildFly application server has switched from version 19.1.0 to 26.0.1.
Declaration of custom login module
Declaration of custom login module have change: a file jaas.config is build from file jaas_vdoc.config or jaas_vdoc-custom.config in /configurator.
To add custom login module locally
Duplicate jaas_vdoc.config to jaas_vdoc-custom.config and add your login module.
To add custom login module on mcm
Add the file jaas_vdoc-custom.config in a process-devops folder.
Correction of transaction behavior
Begin/commit/roolback transaction with no effect
Fixed begin/commit/rollback transaction methods that had no effect in some situations.
CommitTransaction can now throw exception
A commitTransaction is forbidden when the transaction is inactive. Until now if a transaction was inactive nothing was done. Now an Exception is thrown.
SetTransactionTimeout can now throw exception
A setTransactionTimeout(int transactionTimeout)
is forbidden when a transaction is active. Until now if a transaction was active nothing was done. Now an IllegalStateException is thrown.
Transaction managed by application server context
If the userTransaction cannot be retrieved (case of transactions managed by the server), the begin/commit/rollback cannot be performed. We don’t break the code execution, but we log a message like:
2021-12-22 14:37:17,951 ERROR [com.axemble.vdoc.core.helpers.TransactionHelper] (default task-10) Unable to commit transaction. The user transaction is unavailable in this context. (log DEBUG for full stack trace)
Enabling the debug we get the full stack trace.
We would have liked to throw an exception but in order not to break too much existing code we made the choice to simply log. In a future version, this situation will throw an exception instead of just writing a log.
Transactions in the packaging tasks context
The InstallServiceBean class that triggers all the packaging tasks was in Transaction Management CONTAINER mode (managed by the application server). It is now in Transaction Management BEAN mode (transaction managed by the code) and the packaging tasks can therefore perform begin/commit/rollback transactions.
Transactions in the trigger context
The execution context of the triggers is in Transaction Management CONTAINER mode but works without transaction if there is no transaction started. So most of the time we didn’t have a transaction and we couldn’t use begin/commit/rollback from the code triggered by the trigger (because of the CONTAINER mode). Triggers are now always executed within a transaction managed by the application server. The management of transactions from the code called in a trigger is therefore still forbidden.
Transactions in the Excel directory import
The ExcelDirectoryImport was executed in a Transaction Management CONTAINER mode but works without transaction if there is no transaction started. The begin/commit/roolback were therefore without effect within the excel import code. We activated a managed transaction that includes the execution of an ExcelDirectoryImport and removed the transaction management in the import code.