Changes between Version 21 and Version 22 of v6/pgsummary


Ignore:
Timestamp:
05/31/2012 09:48:02 AM (14 years ago)
Author:
huangzhong
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • v6/pgsummary

    v21 v22  
    109109} catch (Exception e) { 
    110110  et.rollback(); 
     111} finally { 
     112  em.close(); 
    111113} 
    1121143.使用JDBC 
     
    174176java.lang.IllegalStateException: Not allowed to create transaction on shared EntityManager - use Spring transactions or 
    175177EJB CMT instead 
    176 异常,初步估计和驱动有关,换成以下两种写法正常 
     178异常,初步估计和驱动有关,换成以下两种写法正常(建议使用方法1,统一使用容器进行管理) 
    1771791. 
    178180final EntityManager em = EnvUtils.getEnv().getEm(); 
     
    198200    } catch (Exception e) { 
    199201        et.rollback(); 
     202    }finally { 
     203        em.close(); 
    200204    } 
    201205}}}