Happy to share auditTrailContext.xml: (my deployerConfigContext.xml snippet for 
entityManager and c3po is below in case you want to see that also).

Cheers,

Bryan

auditTrailConfig.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:p="http://www.springframework.org/schema/p";
       xmlns:aop="http://www.springframework.org/schema/aop";
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd";>
 
  <description>
  Configuration file for the Inspektr package which handles auditing for Java 
applications.
  If enabled this should be modified to log audit and statistics information 
the same way
  your local applications do.  The default is currently to log to the console 
which is good
  for debugging/testing purposes.
  </description>
 
  <aop:aspectj-autoproxy/> 
 
  <bean id="auditTrailManagementAspect" 
class="com.github.inspektr.audit.AuditTrailManagementAspect">
    <!-- String applicationCode -->
    <constructor-arg index="0" value="CAS" />
 
    <!-- PrincipalResolver auditablePrincipalResolver -->
    <constructor-arg index="1" ref="auditablePrincipalResolver" />
     
    <!-- List<AuditTrailManager> auditTrailManagers -->
    <constructor-arg index="2">
      <list>
        <bean 
class="com.github.inspektr.audit.support.ConsoleAuditTrailManager" />
        <!--
        Uncomment following for writing logs to database via JDBC.
        See below for definition of auditManager bean.
        -->
         <ref local="auditManager" /> 
      </list>
    </constructor-arg>
 
    <!-- Map<String,AuditActionResolver> auditActionResolverMap -->
    <constructor-arg index="3">
      <map>
        <entry key="AUTHENTICATION_RESOLVER">
          <ref local="authenticationActionResolver" />
        </entry>
        <entry key="CREATE_TICKET_GRANTING_TICKET_RESOLVER">
          <ref local="ticketCreationActionResolver" />
        </entry>
        <entry key="DESTROY_TICKET_GRANTING_TICKET_RESOLVER">
          <bean 
class="com.github.inspektr.audit.spi.support.DefaultAuditActionResolver" />
        </entry>
        <entry key="GRANT_SERVICE_TICKET_RESOLVER">
          <ref local="ticketCreationActionResolver" />
        </entry>
        <entry key="GRANT_PROXY_GRANTING_TICKET_RESOLVER">
          <ref local="ticketCreationActionResolver" />
        </entry>
        <entry key="VALIDATE_SERVICE_TICKET_RESOLVER">
          <ref local="ticketValidationActionResolver" />
        </entry>
      </map>
    </constructor-arg>
     
    <!-- Map<String,AuditResourceResolver> auditResourceResolverMap -->
    <constructor-arg index="4">
      <map>
        <entry key="AUTHENTICATION_RESOURCE_RESOLVER">
          <bean 
class="org.jasig.cas.audit.spi.CredentialsAsFirstParameterResourceResolver" />
        </entry>
        <entry key="CREATE_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER">
          <ref local="returnValueResourceResolver" />
        </entry>
        <entry key="DESTROY_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER">
          <ref local="ticketResourceResolver" />
        </entry>
        <entry key="GRANT_SERVICE_TICKET_RESOURCE_RESOLVER">
          <bean class="org.jasig.cas.audit.spi.ServiceResourceResolver" />
        </entry>
        <entry key="GRANT_PROXY_GRANTING_TICKET_RESOURCE_RESOLVER">
          <ref local="returnValueResourceResolver" />
        </entry>
        <entry key="VALIDATE_SERVICE_TICKET_RESOURCE_RESOLVER">
          <ref local="ticketResourceResolver" />
        </entry>
      </map>
    </constructor-arg>
  </bean>
 
  <bean id="auditablePrincipalResolver" 
class="org.jasig.cas.audit.spi.TicketOrCredentialPrincipalResolver">
      <constructor-arg index="0" ref="ticketRegistry" />
  </bean>
 
  <bean id="authenticationActionResolver"
    class="com.github.inspektr.audit.spi.support.DefaultAuditActionResolver">
    <!-- String successSuffix -->
    <constructor-arg index="0" value="_SUCCESS" />
     
    <!-- String failureSuffix -->
    <constructor-arg index="1" value="_FAILED" />
  </bean>
   
  <bean id="ticketCreationActionResolver"
    class="com.github.inspektr.audit.spi.support.DefaultAuditActionResolver">
    <!-- String successSuffix -->
    <constructor-arg index="0" value="_CREATED" />
     
    <!-- String failureSuffix -->
    <constructor-arg index="1" value="_NOT_CREATED" />
  </bean>
   
  <bean id="ticketValidationActionResolver"
    class="com.github.inspektr.audit.spi.support.DefaultAuditActionResolver">
    <!-- String successSuffix -->
    <constructor-arg index="0" value="D" />
     
    <!-- String failureSuffix -->
    <constructor-arg index="1" value="_FAILED" />
  </bean>
   
  <bean id="returnValueResourceResolver"
     
class="com.github.inspektr.audit.spi.support.ReturnValueAsStringResourceResolver"
 />
      
  <bean id="ticketResourceResolver"
    class="org.jasig.cas.audit.spi.TicketAsFirstParameterResourceResolver" />
 
  <!--
  Uncomment following beans for JDBC support.
  Assumes there is a dataSource bean that defines a valid JDBC data source.
  -->
 
  <bean id="inspektrTransactionManager"
    class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
    p:dataSource-ref="dataSource"
  />
 
  <bean id="inspektrTransactionTemplate"
    class="org.springframework.transaction.support.TransactionTemplate"
    p:transactionManager-ref="inspektrTransactionManager"
    p:isolationLevelName="ISOLATION_READ_COMMITTED"
    p:propagationBehaviorName="PROPAGATION_REQUIRED"
  />
   
  <bean id="auditManager" 
class="com.github.inspektr.audit.support.JdbcAuditTrailManager">
    <constructor-arg index="0" ref="inspektrTransactionTemplate" />
    <property name="dataSource" ref="dataSource" />
  </bean>
  
deployerContextConfig.xml snippet:

<!-- This is the EntityManagerFactory configuration for Hibernate -->



    <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.Oracle10gDialect</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="com.mchange.v2.c3p0.ComboPooledDataSource"
    p:driverClass="oracle.jdbc.driver.OracleDriver"
    p:jdbcUrl="${cas.database.url}"
    p:user="${cas.database.user}"
    p:password="${cas.database.password}"
    p:initialPoolSize="8"
    p:minPoolSize="8"
    p:maxPoolSize="64"
    p:maxIdleTimeExcessConnections="0"
    p:checkoutTimeout="0"
    p:acquireIncrement="3"
    p:acquireRetryAttempts="30"
    p:acquireRetryDelay="100"
    p:idleConnectionTestPeriod="0"
    
  />
  
  
</beans>

-----Original Message-----
From: Marvin Addison [mailto:[email protected]] 
Sent: Wednesday, April 18, 2012 3:14 PM
To: [email protected]
Subject: Re: [cas-user] Memcached Ticket Registry - Unresolved

> I am hoping to avoid downloading the inspektr source and stepping through all 
> the code. I pretty sure it is some minor config error but I am not sure where 
> to look. My ticketRegistry.xml is right off the wiki for using memcahed.

Can you share your auditing config?  If you have a resolver that needs a 
connection to some resource, then connection errors could manifest this way in 
that they'd throw in both the success and failure cases I mentioned.

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