> In the instructions it says to add this to the deployerConfigContext.xml:
> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> (in
> my case OracleDialect).  I am not sure where this goes in the xml file

Here's our config from the Oracle days:

  <!--
  JDBC based service registry implementation.
  The name of this bean should remain "serviceRegistryDao".
   -->
  <bean id="serviceRegistryDao"
    class="org.jasig.cas.services.JpaServiceRegistryDaoImpl">
    <property name="entityManagerFactory" ref="entityManagerFactory" />
  </bean>

  <bean
    id="dataSource"
    class="com.mchange.v2.c3p0.ComboPooledDataSource"
    p:driverClass="oracle.jdbc.driver.OracleDriver"
    p:jdbcUrl="${database.url}"
    p:user="${database.user}"
    p:password="${database.password}"
    p:initialPoolSize="${database.pool.minSize}"
    p:minPoolSize="${database.pool.minSize}"
    p:maxPoolSize="${database.pool.maxSize}"
    p:maxIdleTimeExcessConnections="${database.pool.maxIdleTime}"
    p:checkoutTimeout="${database.pool.maxWait}"
    p:acquireIncrement="${database.pool.acquireIncrement}"
    p:acquireRetryAttempts="${database.pool.acquireRetryAttempts}"
    p:acquireRetryDelay="${database.pool.acquireRetryDelay}"
    p:idleConnectionTestPeriod="${database.pool.idleConnectionTestPeriod}"
    p:preferredTestQuery="select 1 from dual"
  />

  <bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="dataSource" ref="dataSource"/>
    <property name="jpaVendorAdapter">
      <bean 
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
        <property name="generateDdl" value="true"/>
        <property name="showSql" value="true" />
      </bean>
    </property>
    <property name="jpaProperties">
      <props>
        <prop 
key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
        <prop key="hibernate.hbm2ddl.auto">update</prop>
      </props>
    </property>
  </bean>

I would recommend using a pooled data source, and we have been very
pleased with c3p0.  The alternative would be commons-dbcp.

> Also I assume I need to modify my pom.xml to include a dependency for the
> Oracle ojdbc14.jar

No.  JDBC drivers are best placed in the classpath of the servlet
container, e.g. $TOMCAT_HOME/lib (for TC6) or $TOMCAT_HOME/common/lib
(TC5).

M

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to