1 Reply Latest reply: Feb 26, 2013 4:14 PM by user738616 RSS

    Coherence*web incompatible with custom coherence configuration?

    985743
      Hi,

      I am trying to setup a web application within a weblogic 10.3.6 server with coherence*web as the session manager, and using a custom coherence configuration for diferent test and production environments. Apart from the session management, the application makes explicit use of several coherence caches.

      The problem is that on server startup, only the configuration of coherence*web and the default configuration files are loaded. As these files do not contain the cache names used by the application, it fails at runtime. Curiously, when I force a server stop, the custom configuration is loaded just after the session management module is shutdown and before the JVM is stopped.

      Here are the (simplified) logs from coherence:

      -----
      [STARTUP]
      Loaded operational configuration from "zip:/..../WEB-INF/lib/coherence-3.7.1.5.jar!/tangosol-coherence.xml"
      Loaded operational overrides from "zip:/..../WEB-INF/lib/_wl_cls_gen.jar!/tangosol-coherence-override.xml"
      Loaded Reporter configuration from "zip:/..../WEB-INF/lib/coherence-3.7.1.5.jar!/reports/report-group.xml"
      Created a new cluster "cluster:0xFCDB"
      Started cluster Name=cluster:0xFCDB
      Loaded cache configuration from "zip:..../WEB-INF/lib/_wl_cls_gen.jar!/coherence-cache-config.xml"
      Configured session model "SplitHttpSessionCollection"

      -----
      [SHUTDOWN]
      Loaded operational configuration from "zip:/..../WEB-INF/lib/coherence-3.7.1.5.jar!/tangosol-coherence.xml"
      Loaded operational overrides from "zip:/..../WEB-INF/lib/_wl_cls_gen.jar!/tangosol-coherence-override.xml"
      Shutting down Coherence session management module.
      Loaded cache configuration from "zip:/..../WEB-INF/lib/_wl_cls_gen.jar!/coherence/coherence-cache-config_DEVEL.xml"
      Loaded cache configuration from "zip:/..../WEB-INF/lib/_wl_cls_gen.jar!/coherence/coherence-cache-config-base.xml"
      -----

      The weblogic startup arguments contain:
      -Dtangosol.coherence.cacheconfig=coherence/coherence-cache-config_DEVEL.xml
      -Dtangosol.coherence.override=tangosol-coherence-override.xml

      And the contents of the override configuration is:

      <coherence xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config">
      <logging-config>
      <destination>log4j</destination>
      <severity-level>6</severity-level>
      <character-limit>0</character-limit>
      </logging-config>
      <configurable-cache-factory-config>
      <class-name>com.oracle.coherence.environment.extensible.ExtensibleEnvironment</class-name>
      <init-params>
      <init-param>
      <param-type>java.lang.String</param-type>
      <param-value system-property="tangosol.coherence.cacheconfig">coherence/coherence-cache-config_DEVEL.xml</param-value>
      </init-param>
      </init-params>
      </configurable-cache-factory-config>
      </coherence>



      So it looks like, while coherence*web is "active", my custom configuration is simply ignored, or better delayed until coherence*web is stopped. I know the paths and property names are correct, because I see them being loaded in the logs, but they are not loaded at the right time.

      Is there any way to make both configurations to coexist?
        • 1. Re: Coherence*web incompatible with custom coherence configuration?
          user738616
          Hi,

          Extract the session-cache-config.xml from coherence-web-spi.war and modify it to add application caches. Remember to keep the name of the config file as session-cache-config.xml

          HTH

          Cheers,
          _NJ