Java Reference
In-Depth Information
<property name="dataSource" ref="dataSource" />
<property name="configLocation">
<property name="configurationClass">
<property name="hibernateProperties">
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.format_sql">false</prop>
<prop key="">update</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<bean id="transactionManager"
<property name="sessionFactory" ref="sessionFactory" />
<bean id="placeholderProperties"
<property name="location" value="" />
<property name="systemPropertiesModeName"
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="order" value="1" />
As you can see, the vast majority of launch-context.xml is the default. The main changes are the
addition of the JMS resources and Hibernate resources at the end. Note the TransactionManager
configured by default has been replaced with the one you're using for this job.
The last piece of configuration that you need to do in order for the pieces of this job to work together
is the hibernate.cfg.xml file. Because you're using annotations to do the mapping, the
hibernate.cfg.xml file is nothing more than a list of classes that are mapped. Listing 11-11 contains the
source of the file for this example.
Search WWH ::

Custom Search