Beginner |
|
Joined: Sat Aug 01, 2009 5:28 am Posts: 42
|
it easy with spring
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean" scope="singleton"> <property name="jndiName" value="/jdbc/TestDatasource" /> <property name="resourceRef" value="true" /> </bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="mappingResources"> <list> <value>database/Mytable.hbm.xml</value> </list> </property>
</bean>
_________________ Warm Regards, Tarun Walia
|
|