Skip to content

Commit

Permalink
[Fix #3642] Removing not stricly needed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Oct 10, 2024
1 parent 7a01dad commit de4a66b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*
*/
public class DefaultUnitOfWorkManager implements UnitOfWorkManager {
private static DefaultUnitOfWorkManager instance = new DefaultUnitOfWorkManager(new CollectingUnitOfWorkFactory());
private static final DefaultUnitOfWorkManager instance = new DefaultUnitOfWorkManager(new CollectingUnitOfWorkFactory());
// uses thread local to associate unit of works to execution context/thread
private ThreadLocal<UnitOfWork> currentUnitOfWork = new ThreadLocal<>();
// uses pass through unit of work as fallback if no unit of work has been started
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.kie.kogito.process.impl.DefaultWorkItemHandlerConfig;
import org.kie.kogito.services.identity.NoOpIdentityProvider;
import org.kie.kogito.services.signal.DefaultSignalManagerHub;
import org.kie.kogito.services.uow.CollectingUnitOfWorkFactory;
import org.kie.kogito.services.uow.DefaultUnitOfWorkManager;

public class LightProcessRuntimeServiceProvider extends AbstractProcessRuntimeServiceProvider {
Expand All @@ -31,7 +32,7 @@ public LightProcessRuntimeServiceProvider() {
new DefaultWorkItemHandlerConfig(),
new DefaultProcessEventListenerConfig(),
new DefaultSignalManagerHub(),
DefaultUnitOfWorkManager.get(),
new DefaultUnitOfWorkManager(new CollectingUnitOfWorkFactory()),
new NoOpIdentityProvider());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import org.kie.kogito.jobs.ProcessJobDescription;
import org.kie.kogito.services.identity.NoOpIdentityProvider;
import org.kie.kogito.services.jobs.impl.LegacyInMemoryJobService;
import org.kie.kogito.services.uow.CollectingUnitOfWorkFactory;
import org.kie.kogito.services.uow.DefaultUnitOfWorkManager;
import org.kie.kogito.signal.SignalManager;
import org.kie.kogito.uow.UnitOfWorkManager;
Expand All @@ -97,7 +98,7 @@ public ProcessRuntimeImpl(Application application, InternalWorkingMemory working
this.kruntime = workingMemory.getKnowledgeRuntime();
initProcessInstanceManager();
initSignalManager();
unitOfWorkManager = DefaultUnitOfWorkManager.get();
unitOfWorkManager = new DefaultUnitOfWorkManager(new CollectingUnitOfWorkFactory());
jobService = new LegacyInMemoryJobService(kogitoProcessRuntime, unitOfWorkManager);
this.processEventSupport = new KogitoProcessEventSupportImpl(new NoOpIdentityProvider());
if (isActive()) {
Expand Down

0 comments on commit de4a66b

Please sign in to comment.