JOC on Clustered environment.

125 views
Skip to first unread message

bhavish b

unread,
Dec 9, 2013, 9:38:14 AM12/9/13
to webcen...@googlegroups.com
Hello All,

We have multiple Managed servers mapped to a Cluster and we need to enable Distributed Java Object Cache. Currently, each Managed Servers are having independent regions and the objects are not getting shared. How do I get this working. Referred http://docs.oracle.com/cd/E15586_01/core.1111/e10106/ha_cachewatch.htm to setup distributed cache.

Is there a tutorial or any application which I can refer?

Thanks,
Bhavish 

Yannick Ongena

unread,
Dec 9, 2013, 9:42:28 AM12/9/13
to webcen...@googlegroups.com

Bhavish,

 

Have a look at the EDG:  http://docs.oracle.com/cd/E29542_01/core.1111/e12037/extend_wc.htm#CHDIFEJH

This describes the process for enabling the JOC in a clustered environment.

Although the documentation talks about Spaces, the same works for Custom Portal managed server. Just provide the cluster name and managed servers.

 

Hope this helps

Regards

Yannick

--
--
You received this message because you are subscribed to the WebCenter Enterprise Methodology Group (http://groups.google.com/group/webcenter-emg). To unsubscribe send email to webcenter-em...@googlegroups.com
 
All content to the WebCenter EMG lies under the Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/). Any content sourced must be attributed back to the WebCenter EMG with a link to the Google Group (http://groups.google.com/group/webcenter-emg).
 
---
You received this message because you are subscribed to the Google Groups "WebCenter EMG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webcenter-em...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

bhavish b

unread,
Dec 9, 2013, 9:53:36 AM12/9/13
to webcen...@googlegroups.com
Yannick,

I have done similar steps but yet individual Managed Servers have their own Regions.

In my code to define region I have done the following -
 Cache.open("C:\\Softwares\\Middleware\\user_projects\\domains\\webcenterdomain\\config\\fmwconfig\\servers\\WC_MS_1\\javacache.xml");
 CacheAccess access = CacheAccess.getAccess("CACHE_REGION");

Am I in the right direction?

Thanks,
Bhavish

Yannick Ongena

unread,
Dec 9, 2013, 9:56:12 AM12/9/13
to webcen...@googlegroups.com

can you upload the javacache.xml as this will have the configuration for the distributed cache.

 

How do you know the cache is not distributed?

bhavish b

unread,
Dec 9, 2013, 10:03:11 AM12/9/13
to webcen...@googlegroups.com

My current setup is 2 Managed Servers mapped to cluster running on the same server.

Whenever I put cache an object to 1 Managed Server, I was not able to fetch from the other Managed server. Ideally, any object in the cache should be replicated / visible on any managed server. Is my understanding correct?

JavaCache.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cache-configuration xmlns="http://www.oracle.com/oracle/ias/cache/configuration11" clean-interval="60" system="false" cache-dump-path="jocdump" private="false" max-size="10" max-objects="5000">
    <communicationService enabled="true">
        <v2 auto-recover="false" enable-ssl="false" init-retry-delay="2000" init-retry="300" ssl-config-file=".sslConfig">
            <packet-distributor dedicated-coordinator="false" startable="true" enable-router="false">
                <distributor-location ssl="true" port="9999" host="localhost"/>
            </packet-distributor>
        </v2>
    </communicationService>
    <logging default-level="ALL" location="javacache.log" override-parent="true"/>
    <dms enabled="false"/>
</cache-configuration>
Message has been deleted

Yannick Ongena

unread,
Dec 9, 2013, 11:33:13 AM12/9/13
to webcen...@googlegroups.com

Your config is not entirely correct.

You also need to define the listener.

 

In your case the correct config would be

            <packet-distributor dedicated-coordinator="false" startable="true" enable-router="false">

               <listener-address host="localhost" port="9999" ssl="false" /

                <distributor-location ssl="true" port="9999" host="localhost"/>

            </packet-distributor>

This might resolve the problem.

bhavish b

unread,
Dec 9, 2013, 12:17:51 PM12/9/13
to webcen...@googlegroups.com
Verified the changes and it still does not work. 
Few questions 
1. Should the changes be replicated on both the Managed servers - I have done the changes on both the Managed servers.
2. How should we load / define the cache regions in the distributed environment? 
3. How are the regions created in multiple JVM, how does the distribution of cache happen? 
4. Is it mandatory to implement custom CacheLoader while creating Regions.

I was not able to find answers and have been going through the following links - http://docs.oracle.com/cd/B14099_19/web.1012/b14012/objcache.htm & http://www.oracle.com/technetwork/middleware/ias/index-083181.html links. Do we have any other document or books to refer?

Thanks,
Bhavish

Yannick Ongena

unread,
Dec 9, 2013, 12:34:10 PM12/9/13
to webcen...@googlegroups.com

Bhavish,

 

1) Yes you need to make the changes to both the servers. Are both servers on the same machine? If so, you can copy the file from one folder to another. They need to be identical. If they are on different machines, you need to change the configuration.

 

As for the other questions, I however do not have enough experience with using the JOC in custom code. I only configure the JOC for webcenter but I never used it in custom code so I cannot answer those questions. Maybe someone else from the group may be able to do so.

 

I however have some information on a command line tool that allows you to query the JOC and get statistics so you can "debug" the JOC. I will need to look for that information. If I find it will reply to this chain and provide some information and links to the documentation.

Reply all
Reply to author
Forward
0 new messages