测试电子书是否能打印出代码的颜色


/* blaaaaaaaaaaaaaa
*/
 public Object execute(HibernateCallback action) throws DataAccessException {    
        Session session = (!this.allowCreate)SessionFactoryUtils.getSession(getSessionFactory(),  
                          false);       
        SessionFactoryUtils.getSession(getSessionFactory(),  
                                       getEntityInterceptor(),   
                                       getJdbcExceptionTranslator()));       
        boolean existingTransaction = TransactionSynchronizationManager.hasResource(  
                                        getSessionFactory());     
        if (!existingTransaction && getFlushMode() == FLUSH_NEVER) {     
             session.setFlushMode(FlushMode.NEVER);    
 }        
 try {            
      Object result = action.doInHibernate(session);             
      flushIfNecessary(session, existingTransaction);             
      return result;      
 }      
 catch (HibernateException ex) {            
 throw convertHibernateAccessException(ex);       
 }       
 finally {       
     SessionFactoryUtils.closeSessionIfNecessary(    
     session, getSessionFactory());       
     }   
 }  

你可能感兴趣的:(java)