Assume you want to use MySQL as the service registry, this is what
we've added to our deployerConfigContext.xml to use a MySQL database
as service registry.

<bean
                id="serviceRegistryDao"
                class="org.jasig.cas.services.JpaServiceRegistryDaoImpl"
                p:entityManagerFactory-ref="entityManagerFactory" />
        <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="false" />
                        </bean>
                </property>
                <property name="jpaProperties">
                        <props>
                                <prop
key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
                                <prop key="hibernate.hbm2ddl.auto">update</prop>
                        </props>
                </property>
        </bean>
        <bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
                <property name="entityManagerFactory"
ref="entityManagerFactory" />
        </bean>

        <tx:annotation-driven transaction-manager="transactionManager" />

        <bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName" value="java:comp/env/jdbc/casdb"/>
        </bean>

And you will need (I think) to add to the <beans... at the top of the file

xmlns:tx="http://www.springframework.org/schema/tx";

and add

http://www.springframework.org/schema/tx

to xsi:schemaLocation

I pulled this out of one or a few tutorials in the CAS user manual
https://wiki.jasig.org/display/CASUM/Home

Thanks,
Eric

On Tue, Apr 19, 2011 at 5:43 PM, Erickh Sinurat <[email protected]> wrote:
> How to Configure CAS against mysql as backend database??

-- 
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