0

We have some generic code that operates on the caches in an Infinispan cache container. The code identifies certain caches for which a certain operation has to be performed by a custom property. The cache container and caches are configured through infinspan.xml or the Infinispan subsystem in WildFly.

Previously we would set a custom property on the datastore of the cache. With Infinispan 10+ this is no longer possible. We would have to implement a custom persistence store in order to set arbitrary properties on a cache. This seems like overkill especially since our caches are not persistent.

Is there a way to achieve this from an infinspan.xml, eg. without putting a custom object under a well known key in the cache?

Edit

The previous configuration looked something like this:

<local-cache name="stackoverflow-cache" configuration="default-configuration">
  <data-container>
    <property name="custom-property-key">custom-property-value</property>
  </data-container>
</local-cache>

With version 10 of the Infinispan schema this is no longer supported.

Philippe Marschall
  • 4,452
  • 1
  • 34
  • 52
  • you you elaborate what is missing for Infinispan 10 for you custom properties? Where are you setting those? Is it an Infinispan configuration property? – pruivo Sep 14 '20 at 09:57
  • @pruivo I added a sample configuration that we used – Philippe Marschall Sep 21 '20 at 15:40
  • Are you using a custom `DataContainer`, like ``? If so, custom data container is not supported anymore. If you just need some properties in the configuration, I may have a workaround for you, to add them... just let me know. – pruivo Sep 22 '20 at 13:48
  • @pruivo no, we're not using a custom `DataContainer` and our caches are not persistent. We just set some properties to identify certain caches. – Philippe Marschall Sep 23 '20 at 08:24

1 Answers1

1

I've made an example of how you can set some custom properties in the configuration here. It isn't trivial...

If you are using Infinispan server, you need a Jar with your classes and put it in server/lib folder.

Let me know if it fits your use case (I hope I didn't misunderstand it).

ps. since you control the parser, you can set your own XML structure if you want.

pruivo
  • 1,214
  • 7
  • 7