We have an application which uses a Spring container on the server which uses EJB3 entities and Hibernate to persist data in a PostgreSQL database.
I'd like to add another connection to a separate database using a separate EntityManager, but the vendor of the DBMS (Trifox Vortex) does not have a DataSource type driver.
Can the Hibernate EntityManager use a simple JDBC-compliant driver to implement EJB3 JPA persistence of Entities?
Do I need to have a specific Hibernate Dialect for the DBMS I'm connecting to?
For what it's worth, here's the XML definition of our current Entity Manager Factory in Spring:
Code:
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="UniWorks-EntityPersistenceUnit"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaDialect">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect"/>
</property>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="${db.showsql}"/>
<property name="generateDdl" value="${db.generate}"/>
<property name="databasePlatform" value="org.hibernate.dialect.PostgreSQLDialect"/>
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">${db.hbm2ddl}</prop>
</props>
</property>
</bean>