<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="SessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
scope="singleton">
<property name="hibernateProperties">
<props>
<prop key="hibernate.archive.autodetection">class, hbm</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.connection.autocommit">true</prop>
</props>
</property>
<property name="packagesToScan">
<list>
<value>com.persistence.entity</value>
</list>
</property>
<property name="dataSource" ref="defaultDS" />
</bean>
<bean id="defaultDS" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:defaultDS</value>
</property>
</bean>
</beans>
No comments:
Post a Comment