JBoss Community

Re: Multiple EntityManagers with different persistence units

created by Pasquale Imbemba in Beginner's Corner - View the full discussion

Yes, the example is quite simple. I shall attach the source code of the SLSB.

 

I tried to switch on SQL output in the persistence.xml (hibernate property value), but that didn't work. Here's my persistence.xml

 


<?xml version="1.0" encoding="UTF-8"?>
<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_1_0.xsd"
          version="1.0">
          <persistence-unit name="SPADEV">
                    <jta-data-source>java:/OracleDS</jta-data-source>
                    <properties>
                              <property name="hibernate.show_sql" value="false" />
                              <property name="hibernate.format_sql" value="false" />
                              <!-- <property name="hibernate.dialect" value="it.bz.tol.oracle.hibernate.OracleSpatialDialect" 
                                        /> -->
                              <property name="hibernate.dialect"
                                        value="org.hibernatespatial.oracle.OracleSpatial10gDialect" />
                    </properties>
          </persistence-unit>
          <persistence-unit name="MERCURIUS">
                    <jta-data-source>java:/DefaultDS</jta-data-source>
                    <properties>
                    <property name="hibernate.show_sql" value="true" />
                    <property name="hibernate.format_sql" value="true" />
                    </properties>
          </persistence-unit>
</persistence>

 

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community