jsp 关键字:查询,事务,粒度

作者:袖梨 2022-07-02

/**
  * 该方法上加事务,传播途径为required
  * @param params
  * @return
  */
 public List getObject(Map params)  {
  //先从memcached中取得数据
  List o1 = memcachedClient.getFromCache(params);
  
  
  if (o1 == null) {
   ol = ObjectDao.getfromDB(params);
   memcachedClient.putToCache(params, o1);
  }
  
  return o1;
 }

相关文章

精彩推荐

一聚教程网

Copyright © 2010-2022

111cn.net All Rights Reserved