]
Mario Fusco updated DROOLS-5483:
--------------------------------
Sprint: 2020 Week 28-30 (from Jul 6)
RulesByteArray is never persistent into SessionInfo Table
---------------------------------------------------------
Key: DROOLS-5483
URL:
https://issues.redhat.com/browse/DROOLS-5483
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.39.0.Final
Reporter: Agustino Alim
Assignee: Mario Fusco
Priority: Major
Hello,
When I deploy KIE Application into Karaf which doesn't support build-in capability
of TransactionSynchronizationRegistry, so it will fallback into implementation with
ThreadLocal
[
https://github.com/kiegroup/drools/blob/master/drools-persistence/drools-...]
What's happening is during commit, the transaction resource is always clear no matter
the caller own the transaction or not.
{code:java}
public void commit(boolean transactionOwner) {
if ( transactionOwner ) {
try {
this.ut.commit();
} catch ( Exception e ) {
logger.warn( "Unable to commit transaction", e);
throw new RuntimeException( "Unable to commit transaction",
e );
}
}
transactionResources.get().clear();
}
{code}
This causes rulesbytearray field in sessioninfo table is not persisted.
Please refer to comment from ngs-mtech
on [JtaTransactionManager.java|https://github.com/kiegroup/drools/commit/...
[
https://github.com/kiegroup/drools/commit/6189bdfaed78d540b464b83bcf6de5b...]