1 2 3 import de.hybris.platform.core.Registry; 4 import de.hybris.platform.core.TenantAwareThreadFactory; 5 6 private static final ExecutorService EXECUTEOR = java.util.concurrent.Executors.newFixedThreadPool(10); 7 8 if(Boolean.TRUE.toString().equalsIgnoreCase(isMultiApproved) && CollectionUtils.isNotEmpty(orderEntries)){ 9 LOG.info("autoCommitApprove size "+orderEntries.size());10 final TenantAwareThreadFactory factory = new TenantAwareThreadFactory(Registry.activateMasterTenant(),11 JaloSession.getCurrentSession());12 final Thread sendThread = factory.newThread(new Runnable()13 {14 @Override15 public void run()16 {17 18 autoMultiCommitApproved(orderEntries);19 }20 });21 EXECUTEOR.submit(sendThread);22 23 return;24 }