- This topic has 1 reply, 2 voices, and was last updated 18 years, 12 months ago by Brian Fernandes.
-
AuthorPosts
-
Michael J CaugheyParticipantGiven that there is support for both Hibernate and Spring, it would be nice to have support for Hibernate in Spring.
Would be nice if DBExplorer modified beans.xml
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>java/PPOCDS</value> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean"> <property name="dataSource"> <ref local="dataSource" /> </property> <property name="mappingResources"> <list> <value>com/wellpoint/ref/data/hibernate/domain/Address.hbm.xml</value> <value>com/wellpoint/ref/data/hibernate/domain/Addresses.hbm.xml</value> <value>com/wellpoint/ref/data/hibernate/domain/Addresstype.hbm.xml</value> <value>com/wellpoint/ref/data/hibernate/domain/Person.hbm.xml</value> <value>com/wellpoint/ref/data/hibernate/domain/Phone.hbm.xml</value> <value>com/wellpoint/ref/data/hibernate/domain/Phones.hbm.xml</value> <value>com/wellpoint/ref/data/hibernate/domain/Phonetype.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> </props> </property> </bean>
or does it andI’m missing it some how?
Thanks,
Michael
Brian FernandesModeratorMichael,
Actually we do modify your bean configuration file. I assume you are talking about the LocalSessionFactoryBean and the mappingResources element?
If you check your project properties, and set the bean XML file in question as the active configuration file, when you generate mappings, they will automatically be added to the mappingResources element.
Otherwise, the spring beans editor’s datasource wizard allows you to create a datasource bean which can be filled in with information from an existing DataSource profile.Let us know if you need further assistance or have other ideas 🙂
Best,
Brian. -
AuthorPosts