-
-
Save odrotbohm/779630 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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:jdbc="http://www.springframework.org/schema/jdbc" | |
xmlns:j2ee="http://www.springframework.org/schema/j2ee" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd | |
http://www.springframework.org/schema/j2ee http://www.springframework.org/schema/j2ee/spring-j2ee-3.0.xsd | |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> | |
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> | |
<property name="dataSource" ref="datasource" /> | |
<property name="packagesToScan" value="com.mycomany.hbparentid" /> | |
<property name="hibernateProperties"> | |
<props> | |
<prop key="hibernate.hbm2ddl.auto">create</prop> | |
<prop key="hibernate.show_sql">true</prop> | |
</props> | |
</property> | |
</bean> | |
<!-- Local DataSource & transactions --> | |
<jdbc:embedded-database id="datasource" type="HSQL" /> | |
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> | |
<property name="sessionFactory" ref="sessionFactory"/> | |
</bean> | |
<tx:annotation-driven/> | |
<!-- or JTA usage --> | |
<j2ee:jndi-lookup id="datasource" jndi-name="java/DefaultDS" /> | |
<tx:jta-transaction-manager /> | |
<tx:annotation-driven /> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment