Not sure if this will help - as I'm using Struts2/Hibernate, appfuse 2.0.1
with full-source, but in my /src/main/resources/ApplicationContext-dao.xml,
I have the following to handle an AuditInfo interceptor:
<!-- Bean to catch successful login event and make user and originating
location info available. -->
<bean id="auditInfoSource"
class="com.acme.model.hibernate.AuditInfoListener">
</bean>
<!-- Entity Interceptor bean - sets audit fields for each persistent
object -->
<bean id="entityInterceptor"
class="com.acme.model.hibernate.AuditInterceptor"
depends-on="auditInfoSource">
<property name="auditInfoSource" ref="auditInfoSource"/>
</bean>
<!-- Hibernate SessionFactory -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactor
yBean" depends-on="entityInterceptor">
<property name="entityInterceptor"><ref
local="entityInterceptor"/></property>
<property name="dataSource" ref="dataSource"/>
<property name="configLocation"
value="classpath:hibernate.cfg.xml"/>
<property name="hibernateProperties">
<value>
hibernate.dialect=${hibernate.dialect}
hibernate.query.substitutions=true 'Y', false 'N'
hibernate.cache.use_second_level_cache=true
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
</value>
<!-- Turn batching off for better error messages under
PostgreSQL -->
<!-- hibernate.jdbc.batch_size=0 -->
</property>
</bean>
This implements pretty closely the AuditInfo pattern from the Hibernate
wiki, adjusted for Hibernate 3.2
HTH - Richard
> From: Markus Döring <[EMAIL PROTECTED]>
> Reply-To: <[email protected]>
> Date: Fri, 16 May 2008 22:09:37 +0200
> To: <[email protected]>
> Subject: [appfuse-user] hibernate (entity) interceptors in appfuse
>
> Hi,
> I would like to register a Hibernate audit interceptor which is
> tracking updates/inserts of persistent entities with the hibernate
> session in AppFuse. The sessionFactory bean definition is probably
> hidden in the appfuse jars, so I wonder if someone can give me any
> advice on how to do that. It seems one can also use hibernate event
> listeners and register them in hibernat.hbm.xml, but I have an
> interceptor already based on org.hibernate.EmptyInterceptor I would
> like to use.
>
> Matt mentioned one might use the HibernateExtensionPostProcessor for
> that, but I cant see how?
> http://www.nabble.com/Hibernate-Interceptor-td15482342s2369.html
>
> Any help greatly appreciated.
> thanks,
>
> Markus
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>