Search This Blog

Monday, August 12, 2013

Coherence Logging in SOA

 

C:\temp\tangosol_coherence_override_1.xml

<coherence>
<cluster-config>
<unicast-listener>
<address system-property="tangosol.coherence.localhost">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.localport">8088</port>
<port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust>
<well-known-addresses>
<socket-address id="1">
<address system-property="tangosol.coherence.wka1">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka1.port">8088</port>
</socket-address>
<socket-address id="2">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8089</port>
</socket-address>
<socket-address id="3">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8090</port>
</socket-address>
<socket-address id="4">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8091</port>
</socket-address>
</well-known-addresses>
</unicast-listener>
</cluster-config>
</coherence>

C:\temp\tangosol_coherence_override_2.xml

<coherence>
<cluster-config>
<unicast-listener>
<address system-property="tangosol.coherence.localhost">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.localport">8089</port>
<port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust>
<well-known-addresses>
<socket-address id="1">
<address system-property="tangosol.coherence.wka1">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka1.port">8088</port>
</socket-address>
<socket-address id="2">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8089</port>
</socket-address>
<socket-address id="3">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8090</port>
</socket-address>
<socket-address id="4">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8091</port>
</socket-address>
</well-known-addresses>
</unicast-listener>
</cluster-config>
</coherence>

C:\temp\tangosol_coherence_override_3.xml

<coherence>
<cluster-config>
<unicast-listener>
<address system-property="tangosol.coherence.localhost">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.localport">8090</port>
<port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust>
<well-known-addresses>
<socket-address id="1">
<address system-property="tangosol.coherence.wka1">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka1.port">8088</port>
</socket-address>
<socket-address id="2">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8089</port>
</socket-address>
<socket-address id="3">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8090</port>
</socket-address>
<socket-address id="4">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8091</port>
</socket-address>
</well-known-addresses>
</unicast-listener>
</cluster-config>
</coherence>

C:\temp\tangosol_coherence_override_4.xml

<coherence>
<cluster-config>
<unicast-listener>
<address system-property="tangosol.coherence.localhost">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.localport">8091</port>
<port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust>
<well-known-addresses>
<socket-address id="1">
<address system-property="tangosol.coherence.wka1">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka1.port">8088</port>
</socket-address>
<socket-address id="2">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8089</port>
</socket-address>
<socket-address id="3">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8090</port>
</socket-address>
<socket-address id="4">
<address system-property="tangosol.coherence.wka2">xx.xx.xx.xx</address>
<port system-property="tangosol.coherence.wka2.port">8091</port>
</socket-address>
</well-known-addresses>
</unicast-listener>
</cluster-config>
</coherence>

Start the Coherence Cache on all the four servers using ,

java -cp coherence.jar -Dtangosol.coherence.management.remote=true -Dtangosol.coherence.session.localstorage=true -Dtangosol.coherence.override=c:\temp\tangosol_coherence_override_1.xml com.tangosol.net.DefaultCacheServer
 
java -cp coherence.jar -Dtangosol.coherence.management.remote=true -Dtangosol.coherence.session.localstorage=true -Dtangosol.coherence.override=c:\temp\tangosol_coherence_override_2.xml com.tangosol.net.DefaultCacheServer

java -cp coherence.jar -Dtangosol.coherence.management.remote=true -Dtangosol.coherence.session.localstorage=true -Dtangosol.coherence.override=c:\temp\tangosol_coherence_override_3.xml com.tangosol.net.DefaultCacheServer
 
java -cp coherence.jar -Dtangosol.coherence.management.remote=true -Dtangosol.coherence.session.localstorage=true -Dtangosol.coherence.override=c:\temp\tangosol_coherence_override_4.xml com.tangosol.net.DefaultCacheServer

For Coherence logging ,

Remove the entries , (especially ,  -Dtangosol.coherence.log=jdk)

-Dtangosol.coherence.clusteraddress=xx.x.x.x -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk
And set the following options , -Dtangosol.coherence.log.level=9 -Dtangosol.coherence.log=/tmp/coherence.log

export JAVA_OPTIONS="-Dtangosol.coherence.log.level=9 -Dtangosol.coherence.log=/tmp/coherence.log"

and start the SOA Server , you will find entries like this ,


WellKnownAddressList(Size=2,
  WKA{Address=xx.xx.x.x, Port=8088}
  WKA{Address=xx.x.x.x.x, Port=8088}
  )

For the ODL logging set the Coherence=TRACE:32 and also log level , oracle.integration.platform = TRACE:32
you will find entries like ,
[2013-08-12T15:35:00.316+05:30] [soa_server2] [NOTIFICATION] [] [Coherence] [tid: Logger@9750876 3.7.1.1] [userId: <anonymous>] [ecid: 0000K1lyeYmESOJpMkS4ye1I2BBN000002,0] [APP: soa-infra] 2013-08-12 15:34:58.482/125.893 Oracle Coherence 3.7.1.1 <Info> (thread=[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational configuration from "jar:file:/fmw11g/fmw1116/Middleware/oracle_common/modules/oracle.coherence/coherence.jar!/tangosol-coherence.xml"

No comments: