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

Introduction

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:

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: