| 1 |
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_9_3.dtd"> |
| 2 |
|
| 3 |
<Configure id="Server" class="org.eclipse.jetty.server.Server"> |
| 4 |
|
| 5 |
<!-- ===================================================================== --> |
| 6 |
<!-- Read hotrod-client.properties file --> |
| 7 |
<!-- ===================================================================== --> |
| 8 |
<New id="properties" class="java.util.Properties"> |
| 9 |
<Call name="load"> |
| 10 |
<Arg> |
| 11 |
<New class="java.io.FileInputStream"> |
| 12 |
<Arg><Property name="jetty.base" default="."/>/resources/hotrod-client.properties</Arg> |
| 13 |
</New> |
| 14 |
</Arg> |
| 15 |
</Call> |
| 16 |
</New> |
| 17 |
|
| 18 |
<!-- ===================================================================== --> |
| 19 |
<!-- Convert properties to configuration --> |
| 20 |
<!-- ===================================================================== --> |
| 21 |
<New class="org.infinispan.client.hotrod.configuration.ConfigurationBuilder"> |
| 22 |
<Call name="withProperties"> |
| 23 |
<Arg><Ref refid="properties"/></Arg> |
| 24 |
</Call> |
| 25 |
<Call name="marshaller"> |
| 26 |
<Arg> |
| 27 |
<New class="org.infinispan.commons.marshall.ProtoStreamMarshaller"/> |
| 28 |
</Arg> |
| 29 |
</Call> |
| 30 |
<Call name="addContextInitializer"> |
| 31 |
<Arg> |
| 32 |
<New class="org.eclipse.jetty.session.infinispan.InfinispanSerializationContextInitializer"/> |
| 33 |
</Arg> |
| 34 |
</Call> |
| 35 |
<Call id="config" name="build"/> |
| 36 |
</New> |
| 37 |
|
| 38 |
<!-- ===================================================================== --> |
| 39 |
<!-- Get a reference to the remote cachemanager. --> |
| 40 |
<!-- ===================================================================== --> |
| 41 |
<New id="hotrodMgr" class="org.infinispan.client.hotrod.RemoteCacheManager"> |
| 42 |
<Arg><Ref refid="config"/></Arg> |
| 43 |
</New> |
| 44 |
|
| 45 |
<!-- ===================================================================== --> |
| 46 |
<!-- Get a reference to the remote cache. --> |
| 47 |
<!-- ===================================================================== --> |
| 48 |
<Ref refid="hotrodMgr"> |
| 49 |
<Call id="cache" name="getCache"> |
| 50 |
<Arg><Property name="jetty.session.infinispan.remoteCacheName" default="sessions"/></Arg> |
| 51 |
</Call> |
| 52 |
</Ref> |
| 53 |
|
| 54 |
<!-- ===================================================================== --> |
| 55 |
<!-- Set queryMgrFactory reference to NullQueryManagerFactory --> |
| 56 |
<!-- ===================================================================== --> |
| 57 |
<New id="queryMgrFactory" class="org.eclipse.jetty.session.infinispan.NullQueryManagerFactory"/> |
| 58 |
|
| 59 |
</Configure> |