Best Practices from Oracle Development's A‑Team

Which managed server needs Java Object Cache and how to verify JOC is running

Lyudmil Pelov


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.

Main Article

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=, 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/
oracle.ias.cache.CacheUtil watch

If you want to learn more about the JOC, how it works or how to monitor it, follow the link HERE.


Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Recent Content