Hi all,
I've been trying to figure out if it's possible to enable/disable the eclipselink shared cache (2nd level cache) via the jboss-cli.
In certain cloud deployments we would like to be able to disable it, ideally without having to edit our persistence.xml.
Does anyone know if this is achievable?
I've included my persistence.xml below. Happy to provide any other details that might help.
persistence.xml
<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd" version="2.1"> <persistence-unit name="AppPu"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <jta-data-source>app.datasource</jta-data-source> <exclude-unlisted-classes>false</exclude-unlisted-classes> <shared-cache-mode>DISABLE_SELECTIVE</shared-cache-mode> <properties> <property name="eclipselink.persistence-context.flush-mode" value="commit" /> <property name="eclipselink.jdbc.batch-writing" value="jdbc" /> <property name="eclipselink.jdbc.batch-writing.size" value="500"/> <property name="eclipselink.session-event-listener" value="com.demo.app.common.eclipselink.GeometryInitializer"/> <property name="eclipselink.logging.logger" value="DefaultLogger"/> <property name="eclipselink.logging.file" value="sqldump.log"/> <property name="eclipselink.logging.parameters" value="true"/> </properties> </persistence-unit> </persistence>