6 Replies Latest reply: Dec 7, 2012 11:12 AM by tbeets RSS

    ActiveCache: Custom Operational Config File Not Working

    tbeets
      I have an app that uses ActiveCache (WLS 10.3.4) to reference a Coherence Cluster WLS resource (EAR scope) and inject a cache. Works fine and as expected with non-default host and port information (unicast and multicast) configured through WLS Console.

      I now want to move to a more detailed Coherence operational configuration and am trying to define the Coherence Cluster WLS resource using a Custom Coherence Configuration File per the docs. I can define the Coherence Cluster resource with an import of the configuration file without a problem; however, at runtime, my application cluster is always instantiated with the Coherence default host and port and no settings from my configuration file.

      Here is the custom Coherence Cluster configuration file -- I named it tangosol-coherence-override.xml to be consistent with the Oracle doc:
      <?xml version='1.0' ?>
      
      <coherence xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
      xml-override="/tangosol-coherence-override.xml">
      
       <cluster-config>
         
        <unicast-listener>
          <port system-property="tangosol.coherence.localport">8888</port>
          <port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust>
        </unicast-listener>
        
        <multicast-listener>
          <address system-property="tangosol.coherence.clusteraddress">231.3.3.3</address>
          <port system-property="tangosol.coherence.clusterport">10000</port>
          <time-to-live system-property="tangosol.coherence.ttl">4</time-to-live>
        </multicast-listener>
        
       </cluster-config>
      
       <logging-config>
        <severity-level system-property="tangosol.coherence.log.level">5</severity-level>
        <character-limit system-property="tangosol.coherence.log.limit">0</character-limit>
       </logging-config>
       
      </coherence>
      In the server logs I do see a log item indicating that my custom config file is being used per the resource definition, but the other Coherence startup logs show using all defaults (coherence.jar) with no other messages about my custom config:
      <Jan 26, 2012 3:49:30 PM PST> <Info> <weblogic-coherence-integration> <innuendo.qualcomm.com> <wlserver1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <0000JKSR40SEkJd5pfS4yY1F8UPo000002> <1327621770861> <BEA-000001> <Initializing Coherence cluster scoped to classloader weblogic.utils.classloaders.GenericClassLoader@78fa8ddf finder: weblogic.utils.classloaders.CodeGenClassFinder@1325659a annotation: QEPSemaphore@ using custom config file /usr/local/workspace/dev/ofm1114ga/user_projects/domains/WL1034Domain/config/coherence/SemaphoreCluster/tangosol-coherence-override.xml>
      Anyone have success with this aspect of ActiveCache?

      -Todd
        • 1. Re: ActiveCache: Custom Operational Config File Not Working
          User738616-Oracle
          Hi,

          You need to define the property -Dtangosol.coherence.override=<custom_override_file_location> in WLS startup scripts.

          Hope this helps!

          Regards,
          NJ
          • 2. Re: ActiveCache: Custom Operational Config File Not Working
            tbeets
            Thanks for the reply and suggestion NJ. If I was not using ActiveCache management, that is what I would expect to do; however, I believe that ActiveCache should manage this implicitly and (in my case) at EAR scope rather than server scope.

            Let me clarify my setup:

            In EAR's weblogic-application.xml:
            ...
              <library-ref>
                <library-name>active-cache</library-name>
              </library-ref>
            
              <!-- Coherence
                Shared Library "coherence" in target instance
                merging $FMW_HOME/coherence_3.6/lib/coherence.jar
                -->
              <library-ref>
                <library-name>coherence</library-name>
              </library-ref>
            
              <coherence-cluster-ref>
                <coherence-cluster-name>QEPSemaphoreCluster</coherence-cluster-name>
              </coherence-cluster-ref>
            
              <prefer-application-packages>
                <package-name>com.tangosol.*</package-name>
                <package-name>weblogic.coherence.service.*</package-name>
                <package-name>com.oracle.coherence.common.*</package-name>
              </prefer-application-packages>
            ...
            When I define the Coherence Cluster resource "inline" through WLS Console, EAR-scoped instantiation of cluster using the cluster settings works as expected/documented:
            <?xml version='1.0' encoding='UTF-8'?>
            <weblogic-coherence xmlns="http://xmlns.oracle.com/weblogic/weblogic-coherence"
            xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-coherence http://xmlns.oracle.com/weblogic/weblogic-coherence/1.0/weblogic-coherence.xsd">
              <name>QEPSemaphoreCluster</name>
              <coherence-cluster-params>
                <unicast-listen-address></unicast-listen-address>
                <unicast-listen-port>8888</unicast-listen-port>
                <unicast-port-auto-adjust>true</unicast-port-auto-adjust>
                <multicast-listen-address>231.3.3.3</multicast-listen-address>
                <multicast-listen-port>10000</multicast-listen-port>
              </coherence-cluster-params>
            </weblogic-coherence>
            When I alternatively define the Coherence Cluster resource by importing an external operational config override file, the override settings are not used and instead default Coherence cluster settings are used (i.e. defaults in coherence.jar):
            <?xml version='1.0' encoding='UTF-8'?>
            <weblogic-coherence xmlns="http://xmlns.oracle.com/weblogic/weblogic-coherence"
            xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-coherence http://xmlns.oracle.com/weblogic/weblogic-coherence/1.0/weblogic-coherence.xsd">
              <name>QEPSemaphoreClusterExt</name>
              <custom-cluster-configuration-file-name>/usr/local/workspace/mywork/QEPSemaphore/QEPSemaphoreCommon/tangosol-coherence-override.xml</custom-cluster-configuration-file-name>
              <custom-cluster-configuration-file-last-updated-timestamp>1327988258871</custom-cluster-configuration-file-last-updated-timestamp>
            </weblogic-coherence>
            • 3. Re: ActiveCache: Custom Operational Config File Not Working
              tbeets
              By the way, it's not apparent from my last post, but the referenced Coherence Cluster name in weblogic-application.xml is changed to match the Coherence Cluster resource name for the desired case (i.e. QEPSemaphoreCluster or QEPSemaphoreClusterExt)...
              • 4. Re: ActiveCache: Custom Operational Config File Not Working
                User738616-Oracle
                Hi,

                Got your problem! Please note that the document specifies "If you specify cluster-related properties by importing a custom configuration file, the properties specified in the file must not be the same properties that were specified using WLST or the WebLogic Server Administration Console."

                Make sure that you dont specify any of the properties that you want to override using the configuration file in WLS console.

                Hope this helps!

                Cheers,
                NJ
                • 5. Re: ActiveCache: Custom Operational Config File Not Working
                  tbeets
                  Thanks NJ. Yes. When I specify (import) the external config file, I'm exclusively using the file (and not mixing). You can see this by the second weblogic-coherence descriptor file where only the file reference exists.

                  It would be great if a forum member who has this working would chime in. The only example I've seen blogged of this is unclear to me because the blogger doesn't describe exactly what external-file operational configuration settings are made and thus wondering whether it's having the actual affect he thinks it is or whether coherence.jar defaults are just working in his blog case.

                  [http://blogs.oracle.com/felcey/entry/using_weblogic_server_activecache_for]

                  I will probably open a support case, but hoping to get some yey or ney whether folks are actually seeing this feature work in their environments.

                  -Todd
                  • 6. Re: ActiveCache: Custom Operational Config File Not Working
                    tbeets
                    This issue was a bug and Oracle has issued a patch:

                    Bug: 13732966
                    Patch: 14932332

                    The patch was made for WLS 10.3.4 so the fix may be rolled into later versions already.

                    -Todd