Jboss cli command for adding a nested xml element

Viewed 359

We are using keycloak as Identity provider for our application. We need to configure offlineSessions eviction policy in standalone-ha.xml file. So in standalone-ha.xml file we have an entry like bellow.

<distributed-cache name="offlineSessions">
</distributed-cache>

we need to change it to

<distributed-cache name="offlineSessions">
  <object-memory size="200"/>
</distributed-cache>

In JBoss cli there is a command write-attribute that will add an attribute to an existing element but here we need to add a nested element. Is there any command in JBoss cli for this?

1 Answers

You'd need to add the object memory resource.

/subsystem=infinispan/cache-container=example/distributed-cache=offlineSessions/memory=object:add(size=200)
Related