随笔-200  评论-90  文章-8  trackbacks-0
       前段时间碰到这个问题,今天记下来,我想在之后的版本中应该不会有这样的问题了?在网上找到了解决办法是这样的,在spring的配制文件里加入这样一句即可:
<prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>


<!-- 配置sessionFactory, 注意这里引入的包的不同  -->
    
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        
<property name="dataSource">
            
<ref local="dataSource" />
        
</property>
        
<property name="mappingResources">
            
<list>
                
<value>com/ihandy/airwap/beans/Hotflight.hbm.xml</value>
                
<value>com/ihandy/airwap/beans/Area.hbm.xml</value>
                
<value>com/ihandy/airwap/beans/AirAssociatorInfo.hbm.xml</value>
                
<value>com/ihandy/airwap/beans/OrderDetail.hbm.xml</value>
                
<value>com/ihandy/airwap/beans/OrderQuest.hbm.xml</value>
            
</list>
        
</property>
        
<property name="hibernateProperties">
            
<props>
                
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
                
<prop key="hibernate.show_sql">true</prop>
                
<prop key="hibernate.c3p0.minPoolSize">2</prop>
                
<prop key="hibernate.c3p0.maxPoolSize">5</prop>
                
<prop key="hibernate.c3p0.timeout">600</prop>
                
<prop key="hibernate.c3p0.max_statement">200</prop>
                
<prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
            
</props>
        
</property>
    
</bean>
posted on 2006-11-27 11:13 一凡 阅读(1013) 评论(0)  编辑  收藏 所属分类: JAVA FRAMEWORK

只有注册用户登录后才能发表评论。


网站导航: