Hi everyone,
 I deploy a cas-server-3.5.2. And now it works fine.
 I use QueryDatabaseAuthenticationHandler to solve the password when login, and 
use
 JpaServiceRegistryDaoImpl for returning more info to client when 
authenticating from cas.
 But I have to use two-separate data source for both 
QueryDatabaseAuthenticationHandler and JpaServiceRegistryDaoImpl, even though 
they are the equivalent. it will cause "connection is closed" exception when I 
login while I use one-single datasource for both 
QueryDatabaseAuthenticationHandler and JpaServiceRegistryDaoImpl. 

My question is how can I merge these two datasource to one? Because in some 
situation I can just use one datasource configuration. 
followings are the configuration:

        <bean 
class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
         <property name="dataSource" ref="casDataSource" />
         <property name="sql" value="select pwd from user where username = ?" 
/> 

        </bean>

        <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.HibernateJpaVendoAdapter">

         <property name="generateDdl" value="true"/>

         <property name="showSql" value="true" />

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

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