<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

	<bean id="org.sakaiproject.event.api.EventTrackingService"
			class="org.sakaiproject.event.impl.ClusterEventTracking"
			init-method="init"
			destroy-method="destroy"
			singleton="true">

		<lookup-method name="sqlService" bean="org.sakaiproject.db.api.SqlService" />
		<lookup-method name="serverConfigurationService" bean="org.sakaiproject.component.api.ServerConfigurationService" />
		<lookup-method name="timeService" bean="org.sakaiproject.time.api.TimeService" />
		<lookup-method name="usageSessionService" bean="org.sakaiproject.event.api.UsageSessionService" />
		<lookup-method name="sessionManager" bean="org.sakaiproject.tool.api.SessionManager" />

 		<property name="checkDb"><value>true</value></property>
 		<property name="autoDdl"><value>${auto.ddl}</value></property>
 		<property name="period"><value>5</value></property>
 		<property name="batchWrite"><value>true</value></property>
	</bean>

	<!-- alternate, non-storage, non-clustered impl -->
	<!--
	<bean id="org.sakaiproject.event.api.EventTrackingService"
			class="org.sakaiproject.event.impl.BasicEventTracking"
			init-method="init"
			destroy-method="destroy"
			singleton="true">

		<lookup-method name="usageSessionService" bean="org.sakaiproject.event.api.UsageSessionService" />
		<lookup-method name="sessionManager" bean="org.sakaiproject.tool.api.SessionManager" />

	</bean>
	-->

	<bean id="org.sakaiproject.event.api.NotificationService"
			class="org.sakaiproject.event.impl.DbNotificationService"
			init-method="init"
			destroy-method="destroy"
			singleton="true">

		<lookup-method name="eventTrackingService" bean="org.sakaiproject.event.api.EventTrackingService" />
		<lookup-method name="serverConfigurationService" bean="org.sakaiproject.component.api.ServerConfigurationService" />
		<lookup-method name="idManager" bean="org.sakaiproject.id.api.IdManager" />
		<lookup-method name="sqlService" bean="org.sakaiproject.db.api.SqlService" />

 		<property name="tableName"><value>SAKAI_NOTIFICATION</value></property>
 		<property name="locksInDb"><value>false</value></property>
 		<property name="autoDdl"><value>${auto.ddl}</value></property>

 		<property name="emailToReplyable"><value>false</value></property>
 		<property name="emailFromReplyable"><value>false</value></property>
	</bean>

	<bean id="org.sakaiproject.event.api.UsageSessionService"
			class="org.sakaiproject.event.impl.UsageSessionServiceAdaptor"
			init-method="init"
			destroy-method="destroy"
			singleton="true">

		<lookup-method name="timeService" bean="org.sakaiproject.time.api.TimeService" />
		<lookup-method name="sqlService" bean="org.sakaiproject.db.api.SqlService" />
		<lookup-method name="serverConfigurationService" bean="org.sakaiproject.component.api.ServerConfigurationService" />
		<lookup-method name="threadLocalManager" bean="org.sakaiproject.thread_local.api.ThreadLocalManager" />
		<lookup-method name="sessionManager" bean="org.sakaiproject.tool.api.SessionManager" />
		<lookup-method name="eventTrackingService" bean="org.sakaiproject.event.api.EventTrackingService" />
		<lookup-method name="authzGroupService" bean="org.sakaiproject.authz.api.AuthzGroupService" />
		<lookup-method name="idManager" bean="org.sakaiproject.id.api.IdManager" />
		<lookup-method name="userDirectoryService" bean="org.sakaiproject.user.api.UserDirectoryService" />

		<property name="autoDdl"><value>${auto.ddl}</value></property>
	</bean>

</beans>
