We have already written a good article about how to configure Java Object Cache in clustered environment which you can find it HERE.
There are two things on top of that, I would like to share with you regarding the Java Object Cache: which managed server needs JOC and how to verify if JOC is running.
The documentation section here, says that the JOC should be configured on all servers running Oracle Web Service Manager (OWSM) and Oracle WebCenter Portal’s Spaces application. The tricky part here is where the OWSM runs. The application you have to look for in your WebLogic Administration Console is the “wsm-pm”
If you click on the application and then go to the target tab…
…you will see there all managed servers targets. These are the servers for which you have to configure JOC. By default the wsp-pm does not run on all those servers but only on the utilities, spaces and custom portal managed server. If you want to secure web services from custom application or existing web services like for example from WebCenter Content, you have to target OWSM to the managed server which runs the application. After that you should extend your JOC configuration to cover this server as well.
Next important step is how to validate that the JOC runs?
First option will be to look inside the diagnostic log file from your managed server (<managed_server_name-diagnostig.log>) and search inside for JOC string. After you configure JOC you have to restart the managed servers and into the log files you should see following:
[2013-03-14T14:17:57.685+01:00] [WC_CustomPortal] [NOTIFICATION]  [oracle.as.cache.Lifecycle] [tid: [STANDBY].ExecuteThread: ‘2’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [ecid: 0000Jpd36SXFw000jzwkno1HGSrd000002,0] [APP: wsm-pm] JOC is initialized from oracle.mds.internal.cache.JOCCacheProvider.createNamedCacheInternal, ver=220.127.116.11.0, distribute=true, vid=1, coordinator=0, discover list=[[localhost:9991] segID=1, SSL]
This message appears only if the wsm-pm application targets the managed server you run.
Another possibility to verify the JOC is to use CacheWatcher as described HERE. The issue here is that the ORACLE_HOME is not clear to everyone, since there is also modules folder inside the middleware folder as well. If you use as classpath the middleware modules folder, you will get following error message:
Exception in thread “main” java.lang.NoClassDefFoundError: oracle.ias.cache.CacheUtil
In that case, make sure that your classpath goes to oracle_common/modules folder, to get this running, as following:
./java -classpath “/u01/app/oracle/product/Middleware/oracle_common/modules/oracle.javacache_11.1.1/
If you want to learn more about the JOC, how it works or how to monitor it, follow the link HERE.
All site content is the property of Oracle Corp. Redistribution not allowed without written permission