2

How to configure Infinispan in wildfly's config files (standalone.xml or domain.xml) so that cached objects are always serialized (stored by value and not by reference).

From the documentation of Infinispan storeAsBinary setting can be enabled, so that objects are stored to cache by value and not by reference (which is enabled by default). http://infinispan.org/docs/6.0.x/user_guide/user_guide.html

There is no documentation how to do that when Infinispan is part of Wildfly server.

My question is how do you enable 'storeAsBinary' when Infinispan (6.0.2) is part of Wildfly AS (8.1).

klemenp
  • 76
  • 4
  • Server guide http://infinispan.org/docs/7.1.x/infinispan_server_guide/infinispan_server_guide.html documents how the server is used. – Radim Vansa Mar 13 '15 at 07:06

1 Answers1

3

When you use Infinispan in client-server mode, accessing the data through Hot Rod, Memcached or REST, the data are automatically serialized on client and the server stores them only as byte arrays.

Radim Vansa
  • 5,686
  • 2
  • 25
  • 40
  • Thanks Flavius. You're right, But I'm not using Infinispan as a standalone server, but embedded in Wildfly AS. – klemenp Mar 13 '15 at 09:24
  • Ah, in that case I am afraid you're unlucky, it seems that this is not exposed in the schema (probably neither in config parser). Still, if you use CDI, you can create configuration programmatically - see this example: https://github.com/infinispan/infinispan-quickstart/blob/master/cdi/src/main/java/org/infinispan/quickstart/cdi/config/Config.java – Radim Vansa Mar 13 '15 at 09:55