-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
infinispan-remote.xml
84 lines (74 loc) · 3.36 KB
/
infinispan-remote.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
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<!-- ===================================================================== -->
<!-- Read hotrod-client.properties file -->
<!-- ===================================================================== -->
<New id="properties" class="java.util.Properties">
<Call name="load">
<Arg>
<New class="java.io.FileInputStream">
<Arg><Property name="jetty.base"/>/resources/hotrod-client.properties</Arg>
</New>
</Arg>
</Call>
</New>
<!-- ===================================================================== -->
<!-- Convert properties to configuration -->
<!-- ===================================================================== -->
<New class="org.infinispan.client.hotrod.configuration.ConfigurationBuilder">
<Call name="withProperties">
<Arg><Ref refid="properties"/></Arg>
</Call>
<Call name="marshaller">
<Arg>
<New class="org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller"/>
</Arg>
</Call>
<Call id="config" name="build"/>
</New>
<!-- ===================================================================== -->
<!-- Get a reference to the remote cachemanager. -->
<!-- ===================================================================== -->
<New id="hotrodMgr" class="org.infinispan.client.hotrod.RemoteCacheManager">
<Arg><Ref refid="config"/></Arg>
</New>
<!-- ===================================================================== -->
<!-- Set up custom session serialization. -->
<!-- ===================================================================== -->
<Call id="serial_context" class="org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller" name="getSerializationContext">
<Arg>
<Ref refid="hotrodMgr"/>
</Arg>
<Call name="registerProtoFiles">
<Arg>
<New class="org.infinispan.protostream.FileDescriptorSource">
<Call name="addProtoFiles">
<Arg>
<Array type="java.lang.String">
<Item>/session.proto</Item>
</Array>
</Arg>
</Call>
</New>
</Arg>
</Call>
<Call name="registerMarshaller">
<Arg>
<New class="org.eclipse.jetty.session.infinispan.SessionDataMarshaller"/>
</Arg>
</Call>
</Call>
<!-- ===================================================================== -->
<!-- Get a reference to the remote cache. -->
<!-- ===================================================================== -->
<Ref refid="hotrodMgr">
<Call id="cache" name="getCache">
<Arg><Property name="jetty.session.infinispan.remoteCacheName" default="sessions"/></Arg>
</Call>
</Ref>
<!-- ===================================================================== -->
<!-- Set queryMgrFactory reference to NullQueryManagerFactory -->
<!-- ===================================================================== -->
<New id="queryMgrFactory" class="org.eclipse.jetty.session.infinispan.NullQueryManagerFactory"/>
</Configure>