码迷,mamicode.com
首页 > 编程语言 > 详细

hybris 异步另起线程

时间:2017-08-30 19:45:51      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:div   线程   als   ret   import   str   fixed   run   over   

 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                 @Override
15                 public void run()
16                 {
17                     
18                     autoMultiCommitApproved(orderEntries);
19                 }
20             });
21             EXECUTEOR.submit(sendThread);
22             
23             return;
24         }

 

hybris 异步另起线程

标签:div   线程   als   ret   import   str   fixed   run   over   

原文地址:http://www.cnblogs.com/wahaha603/p/7454618.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!