SHARE
TWEET

Untitled

a guest Nov 13th, 2013 11 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- Setup hibernate -->
  2.     <bean id="propertyConfigurer"
  3.          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
  4.          p:location="/WEB-INF/jdbc.properties" />
  5.    
  6.     <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
  7.         <property name="dataSource" ref="dataSource" />
  8.         <property name="packagesToScan" value="com.socialacademy.model" />
  9.         <property name="hibernateProperties">
  10.             <props>
  11.                 <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
  12.                 <prop key="hibernate.dialect">${hibernate.dialect}</prop>
  13.             </props>
  14.         </property>
  15.     </bean>
  16.  
  17.     <bean id="dataSource" class="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
  18.         <property name="driverClassName" value="${jdbc.driverClassName}" />
  19.         <property name="url" value="${jdbc.url}" />
  20.         <property name="username" value="${jdbc.user}" />
  21.         <property name="password" value="${jdbc.pass}" />
  22.     </bean>
  23.  
  24.     <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  25.         <property name="sessionFactory" ref="sessionFactory" />
  26.     </bean>
  27.    
  28.     <bean id="persistenceExceptionTranslationPostProcessor" class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top