What does the coherence-cluster-owned parameter control?

If the coherence-cluster-owned context parameter (found in the coherence-web.xml deployment descriptor) is set to true, the Coherence libraries (tangosol.jar and coherence.jar) will be deployed as part of your Java EE application. The Coherence*Web installer will place the libraries in the WEB-INF/lib directory of each web application found in your Java EE application and each web application will start and use its own cluster node. When a web application is stopped, the corresponding cluster node will be shutdown and all resources held by the node will be released.

If the coherence-cluster-owned context parameter is set to false, the Coherence*Web installer will not package the Coherence libraries into your Java EE application. In this case, all web applications in your Java EE application will share the same cluster node and the node will be shutdown only upon JVM exit. Be aware that if you set the coherence-cluster-owned context parameter to false, you must place tangosol.jar and coherence.jar in your application server's classpath.

You may want to set the coherence-cluster-owned parameter to true during development of your application (when you expect to iteratively change the persistent view of objects stored as session attributes) or if you are only using Coherence in a single web application. On the other hand, if you expect to deploy multiple web applications within the same JVM or if you are using Coherence in other components of your application (e.g. from within the EJB tier), you may want to set the coherence-cluster-owned parameter to false. Doing so will allow all application components to share cached data (including session attributes). For this reason, you must also be sure to add the classes of all cached objects that you expect to share across different application components to your application server's classpath.