forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtool-components.xml
138 lines (123 loc) · 7.08 KB
/
tool-components.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="org.sakaiproject.tool.api.SessionManager"
name="org.sakaiproject.tool.api.SessionStore"
class="org.sakaiproject.tool.impl.SessionComponent"
init-method="init"
destroy-method="destroy">
<lookup-method name="idManager" bean="org.sakaiproject.id.api.IdManager" />
<lookup-method name="threadLocalManager" bean="org.sakaiproject.thread_local.api.ThreadLocalManager" />
<lookup-method name="toolManager" bean="org.sakaiproject.tool.api.ActiveToolManager"/>
<lookup-method name="rebuildBreakdownService" bean="org.sakaiproject.tool.api.RebuildBreakdownService" />
<lookup-method name="clusterManager" bean="org.sakaiproject.cluster.api.ClusterService"/>
<property name="clusterableTools">
<!-- The tool id's should be used for any clusterable tool. A clusterable tool, is any tool that can
guarantee that everything that tool
puts in the session is itself clusterable, and in the case of Terracotta, is documented in the
tc-config.xml file. This value is a String, instead of a Set of values, to allow for overriding
the contents in the sakai.properties file. -->
<value>sakai.login,sakai.membership</value>
</property>
<property name="inactiveInterval"><value>1800</value></property>
<property name="checkEvery"><value>60</value></property>
<!-- session journaler is null by default -->
<!--
<property name="sessionListener" ref="org.sakaiproject.tool.api.SessionAttributeListener.journaler" />
-->
</bean>
<!--
RebuildBreakdownServiceImpl is responsible for converting Session data into Serializable
objects, storing them internally, and then converting them back into Session objects, in support
of Session clustering
Also can be used for general serialization
-->
<bean id="org.sakaiproject.tool.api.RebuildBreakdownService"
class="org.sakaiproject.tool.impl.RebuildBreakdownServiceImpl"
init-method="init">
<property name="memoryService" ref="org.sakaiproject.memory.api.MemoryService"/>
<property name="serverConfigurationService" ref="org.sakaiproject.component.api.ServerConfigurationService"/>
<property name="sessionManager" ref="org.sakaiproject.tool.api.SessionManager"/>
<property name="usageSessionService" ref="org.sakaiproject.event.api.UsageSessionService"/>
</bean>
<!-- uncomment this if sessionListener property is enabled above -->
<!--
<bean id="org.sakaiproject.tool.api.SessionAttributeListener.journaler"
class="org.sakaiproject.tool.impl.attribs.SessionAttributeJournaler">
<property name="toolManager" ref="org.sakaiproject.tool.api.ToolManager" />
<property name="enableJournal" value="true" />
</bean>
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="beans">
<map>
<entry key="Journaler:name=sessionJournaler" value-ref="org.sakaiproject.tool.api.SessionAttributeListener.journaler"/>
</map>
</property>
</bean>
-->
<!-- register one component to be both the ToolManager and the ActiveToolManager -->
<bean id="org.sakaiproject.tool.api.ActiveToolManager"
name="org.sakaiproject.tool.api.ToolManager"
class="org.sakaiproject.tool.impl.ActiveToolComponent"
init-method="init"
destroy-method="destroy">
<lookup-method name="sessionManager" bean="org.sakaiproject.tool.api.SessionManager" />
<lookup-method name="functionManager" bean="org.sakaiproject.authz.api.FunctionManager" />
<lookup-method name="threadLocalManager" bean="org.sakaiproject.thread_local.api.ThreadLocalManager" />
<lookup-method name="serverConfigurationService" bean="org.sakaiproject.component.api.ServerConfigurationService"/>
<lookup-method name="securityService" bean="org.sakaiproject.authz.api.SecurityService" />
<lookup-method name="siteService" bean="org.sakaiproject.site.api.SiteService" />
<property name="resourceLoader">
<bean factory-bean="org.sakaiproject.tool.impl.ToolResourceFactory" factory-method="createInstance"/>
</property>
</bean>
<bean id="org.sakaiproject.tool.impl.ToolResourceFactory" class="org.sakaiproject.tool.impl.ToolResourceFactory">
<property name="serverConfigurationService" ref="org.sakaiproject.component.api.ServerConfigurationService"/>
</bean>
<!-- Export active session data over JMX -->
<bean id="org.sakaiproject.tool.api.MBeanExporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
<property name="beans">
<map>
<entry key="org.sakaiproject:name=Sessions" value-ref="org.sakaiproject.tool.impl.JMXSessionComponent" />
</map>
</property>
<property name="server">
<bean class="java.lang.management.ManagementFactory" factory-method="getPlatformMBeanServer"/>
</property>
<property name="assembler">
<bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler">
<property name="managedMethods">
<value>getServerId,getServerInstance,getServerIdInstance,getActive05Min,getActive10Min,getActive15Min,getSessionsCount,getSessionsIds,getActive,getSession,invalidateSession,killSession</value>
</property>
</bean>
</property>
</bean>
<!-- annotated MBean bean -->
<bean id="org.sakaiproject.tool.impl.JMXSessionComponent" class="org.sakaiproject.tool.impl.JMXSessionComponent">
<property name="sessionManager" ref="org.sakaiproject.tool.api.SessionManager" />
<property name="serverConfigurationService" ref="org.sakaiproject.component.api.ServerConfigurationService" />
</bean>
<!-- use annotations to manage MBeans -
Cannot use this because -> Could not generate CGLIB subclass of class [class org.sakaiproject.search.mbeans.SearchServiceManagement]: Common causes of this problem include using a final class or a non-visible class
<bean id="sakaiSpringMBeanAttributeSource"
class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/>
<bean id="sakaiSpringMBeanAssembler"
class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
<property name="attributeSource" ref="sakaiSpringMBeanAttributeSource"/>
</bean>
<bean id="sakaiSpringMBeanNamingStrategy"
class="org.springframework.jmx.export.naming.MetadataNamingStrategy">
<property name="attributeSource" ref="sakaiSpringMBeanAttributeSource"/>
</bean>
<bean id="sakaiSpringMBeanExporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="assembler" ref="sakaiSpringMBeanAssembler"/>
<property name="namingStrategy" ref="sakaiSpringMBeanNamingStrategy"/>
<property name="server">
<bean class="java.lang.management.ManagementFactory" factory-method="getPlatformMBeanServer"/>
</property>
<property name="autodetect" value="true"/>
</bean>
-->
</beans>