Hi,
we deploy to a Tomcat server. There we bind a JNDI data source in the server
config. This way you get rid of your connection properties in
persistence.xml and camel-context.xml:
<bean id="myDataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/jdbc/MY_DATASOURCE</value>
</property>
<property name="lookupOnStartup" value="true" />
<property name="cache" value="true" />
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="myPersistenceUnit" />
<property name="dataSource" ref="myDataSource" />
<property name="loadTimeWeaver">
<bean
class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"
/>
</property>
</bean>
Best,
Alfred
--
View this message in context:
http://camel.465427.n5.nabble.com/JPA-DB-Connection-Properties-tp3355378p3357545.html
Sent from the Camel - Users mailing list archive at Nabble.com.