Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a means by which to configure Hibernate Dialect Based on jta-data-source?
    primarykey
    data
    text
    <p>Assuming an ejb-jar with the following persistence.xml configuration: </p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"&gt; &lt;persistence-unit name="com.mystrotv.mdn.admanager.entity"&gt; &lt;jta-data-source&gt;/dataSource/MystroDS_Tx&lt;/jta-data-source&gt; &lt;properties&gt; &lt;property name="jboss.entity.manager.jndi.name" value="java:/EntityManagers/AdManagerPersistenceContext"/&gt; &lt;property name="jboss.entity.manager.factory.jndi.name" value="java:/EntityManagers/AdManagerPersistenceUnit"/&gt; &lt;property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/&gt; &lt;property name="hibernate.hbm2ddl.auto" value="validate"/&gt; &lt;property name="hibernate.max_fetch_depth" value="5"/&gt; &lt;property name="hibernate.validator.apply_to_ddl" value="false" /&gt; &lt;property name="hibernate.validator.autoregister_listeners" value="false" /&gt; &lt;/properties&gt; &lt;/persistence-unit&gt; &lt;/persistence&gt; </code></pre> <p>I would like to define the hibernate dialect based on the JTA data source. If it is oracle, I use the dialect indicated below, if postgres, I use a different dialect. Does anyone know how to do this or can point me to documentation on how to do it? Google has failed to turn up the needed information. The app will be deployed in a JBoss app server but I want to support other app servers as well. Furthermore, we have two deployment models, one uses postgres and one uses oracle and Id rather not have to build two Ears to support a one line difference in a config file. </p> <p>Thanks in advance. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload