AnsweredAssumed Answered

How to get Alfresco context and audit ScheduledJob in java?

Question asked by jrautner on Oct 11, 2017
Latest reply on Oct 17, 2017 by afaust

Hi eveybody,


i need to audit my scheduled job, which is defined in xml beans and java class, but i m not able to get context from java class or call auditComponent.recordValues() method. Is there some guide for this in java or did i miss something


this is my scheduledjob definition xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

<bean id="" class="">
<property name="serviceRegistry">
<ref bean="ServiceRegistry" />

<bean id="" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<property name="jobDataAsMap">
<entry key="jobExecuter">
<ref bean="" />
<entry key="jobLockService">
<ref bean="jobLockService" />

<bean id="" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="" />
<property name="cronExpression">
<property name="startDelay">

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" scope="singleton">
<property name="triggers">
<ref bean=""/>



this is my audit def/

<bean id="auditService" class="org.alfresco.repo.audit.AuditServiceImpl">
<property name="auditComponent">
<ref bean="auditComponent"/>

<!-- Audit component -->

<bean id="auditComponent" class="org.alfresco.repo.audit.AuditComponentImpl">
<property name="transactionService" ref="transactionService"/>
<property name="auditDAO" ref="auditDAO"/>
<property name="auditModelRegistry" ref="Audit"/>
<property name="propertyValueDAO" ref="propertyValueDAO"/>
<property name="userAuditFilter" ref="userAuditFilter"/>
<property name="auditFilter">
<bean class="org.alfresco.repo.audit.PropertyAuditFilter">
<property name="properties" ref="global-properties" />



Thank you for any help