Making Coherence play nice in your test environment

This issue has popped up a couple of times for me recently, so I thought I would do a quick post on it.

When you are running a number of Fusion Middleware environments in the same IP subnet, as you might be in a test environment for example, the default Coherence startup parameters can cause you some issues.

A quick and easy way to avoid these issues, is to change the Coherence clusterport setting, and add the Coherence ttl setting, as shown in the example below.  You can do this by updating the EXTRA_JAVA_PROPERTIES variable in the setDomainEnv.sh script inside your domain’s bin directory.

EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES}
  -Dsoa.archives.dir=${SOA_ORACLE_HOME}/soa
  -Dsoa.oracle.home=${SOA_ORACLE_HOME}
  -Dsoa.instance.home=${DOMAIN_HOME}
  -Djava.net.preferIPv4Stack=true
  -Dweblogic.security.SSL.ignoreHostnameVerification=true
  -Dhttp.nonProxyHosts=localhost|10.240.37.80|slc01ats|*.oracle.com
  -Dtangosol.coherence.clusteraddress=227.7.7.9
  -Dtangosol.coherence.clusterport=9838
  -Dtangosol.coherence.ttl=0
  -Dtangosol.coherence.log=jdk
  -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl
  -Dweblogic.transaction.blocking.commit=true
  -Dweblogic.transaction.blocking.rollback=true
  -Djavax.net.ssl.trustStore=${WL_HOME}/server/lib/DemoTrust.jks"
export EXTRA_JAVA_PROPERTIES

Ideally, you want to set tangosol.coherence.clusterport to a different value for each separate cluster.  Set tangosol.coherence.ttl to 0 as shown above.

About Mark Nelson

Mark Nelson is a Developer Evangelist at Oracle, focusing on microservices and AI. Mark has served as a Section Leader in Stanford's Code in Place program that has introduced tens of thousands of people to the joy of programming, he is a published author, a reviewer and contributor, a content creator and a lifelong learner. He enjoys traveling, meeting people and learning about foods and cultures of the world. Mark has worked at Oracle since 2006 and before that at IBM since 1994.
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a comment