Lzy.sh oracle coherence-37_on_weblogic_1036
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Lzy.sh oracle coherence-37_on_weblogic_1036

  • 590 views
Uploaded on

Configure & Setup Oracle Coherence on Weblogic 10.3.6

Configure & Setup Oracle Coherence on Weblogic 10.3.6

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
590
On Slideshare
590
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
4
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. lzy.sh http://lzy.sh/oracle-coherence-3-7-on-weblogic-10-3-6/Oracle Coherence 3.7 on Weblogic 10.3.6Recently, we completed a project to implement Oracle Coherence 3.7.1.1. on Weblogic 10.3.6 and the steps aredocumented f or a quick ref erence.1) Install CoherenceOracle Coherence is by def ault installed with the Oracle Weblogic 10.3.6 and located at the same f older level asWEBLOGIC_HOME. Just look f or coherence_3.7 f older.This is a three node weblogic cluster.Deploy the libraries and target them to the Weblogic cluster. These libraries are available at$COHERENCE_HOME/lib/coherence-web.jar$COHERENCE_HOME/lib/coherence.jar$Weblogic_Home/common/deployable-libraries/active-cache-1.0.jarHere is the wlst to deploy the coherence libraries to your weblogic cluster that will be used as a client, thisrequires a properties f ile as well.
  • 2. #!/usr/bin/pythonloadProperties("/fmw/domains/scripts/fmw.props")# deploy libs# variablesdeployableLibList=active-cache-1.0.jarcoherenceLibList=coherence-web.jar,coherence.jar# connect stringconnect(username,password,t3s://+adminMachine+.mydomain.com:+adminSSLPort)# deploy looplibs = deployableLibList.split(,)for lib in libs:deploy(,wlHome+/common/deployable-libraries/+lib,targets=WLclusterName,libraryModule=true)libs = coherenceLibListfor lib in libs:deploy(,wlHome+/coherence_3.7/lib/+lib,targets=WLclusterName,libraryModule=true)exit()The f mw.props:username=weblogicpassword=myPasswordadminSSLPort=31000adminMachine=myserverwlHome=/fmw/products/wlserver_10.3WLclusterName=wl_st12) Create the coherence cluster & servers using Weblogic Admin Console.On the next Screen which looks like below, specif y the “Unicast Port” and uncheck “Unicast Port AutoAdjust” (we would like to have a better control on the TCP ports used by Java processes).
  • 3. The Coherence cluster is targeted to the WLS cluster. The Webapp which is the Coherence client will also bedeployed on the same WLS cluster.You can now f inish your Coherence Cluster Conf iguration.Next create the Coherence Servers one on each node.a) cache_tst_01 on myTestMachine01.mydomain.comb) cache_tst_02 on myTestMachine02.mydomain.comb) cache_tst_03 on myTestMachine03.mydomain.com
  • 4. Uncheck “Unicast Port Auto Adjust”.Repeat the steps to create additional coherence servers.Once created the coherence server summary looks as below.In order to start the coherence servers, update the “server start” tab of these JVMs by providing relevantsvalues toJava HomeJava VendorBEA HomeRoot DirectoryThe Coherence JVMs will not start if coherence.server_10.3.5.0.jar & coherence.jar are not f ound in theclasspath. So, go ahead and update the classpath with the location of these jar f iles.<Install_f older>/modules/f eatures/weblogic.server.modules.coherence.server_10.3.5.0.jar:<COHERENCE_HOME>/lib/coherence.jar
  • 5. select the server start tab and in the “Arguments” box and enter the properties belowFor example on cache_tst_01:-Xverbose:gcreport,memory,gcpause -XverboseTimeStamp -Xverboselog:/fmw/log/myDomain/my_cache_cluster/cache_tst_01.gc -Xms1536m -Xmx1536m jamagent.jamrunjamconshost=myEMhost.myDomain.com jamconsport=3800 jampool=my_cache_clusterjamjvmid=my_cache_cluster/cache_tst_01 -Dtangosol.coherence.mode=prod -Dtangosol.coherence.machine=myTestMachine01.myDomain.com -Doracle.coherence.machine=myTestMachine01.myDomain.com -Dtangosol.coherence.cluster=my_cache_cluster-Dtangosol.coherence.localhost=myTestMachine01.myDomain.com -Dtangosol.coherence.localport=8888 -Dtangosol.coherence.session.localstorage=true -Dtangosol.coherence.log=/fmw/log/myDomain/my_cache_cluster/cache_tst_01.out -Dtangosol.coherence.override=/fmw/domains/myDomain/config/coherence/my_cache_cluster/tangosol-coherence-override.xml -Dtangosol.coherence.management.remote=true -Doracle.coherence.jamjvmid=my_cache_cluster/cache_tst_01There are some options in here f or conf iguring Enterprise Manager 12c that will be detailed in another post.Those can be ignored f or now.A tangosol override f ile is used to maintain coherence operational settings across the domain and in thisenvironment it is conf igured to be same on all nodes.temp-overrideThis completes the Coherence Server setup.Here is a sample coherence WLST script, note the EM12c options are removed and will be included in thesecond post conf iguring EM12c f or coherence management. This also requires a properties f ile and youshould see what is needed by looking at the below script.
  • 6. #!/usr/bin/python# Configuration Script for Coherence# Read Properties FileloadProperties("/fmw/domains/scripts/fmw.props")# Split if more than one.CachemgdName = CachemgdNameList.split(,)machineName = MachineNameList.split(,)CachemgdPort = CachemgdPortList.split(,)machineAddress = MachineAddressList.split(,)# need to change number values type to integerclusterNodesInt = int(clusterNodes)# Connect Stringconnect(username,password,t3s://+adminHost+:+adminSSLPort)edit()startEdit()# Create Cache Clustercd(/)print Creating +CacheClusterName+ :cmo.createCoherenceClusterSystemResource(CacheClusterName)cd(/CoherenceClusterSystemResources/+CacheClusterName)set(Targets,jarray.array([ObjectName(com.bea:Name=+WLclusterName+,Type=Cluster)], ObjectName))cd(Resource/+CacheClusterName+/CoherenceClusterParams/+CacheClusterName)cmo.setUnicastPortAutoAdjust(false)cmo.setUnicastListenAddress(localhost)cmo.setUnicastListenPort(8888)# Create the Coherence JVMsdef CreateCachemgd(CachemgdNamefnc,CachemgdPortfnc,machineNamefnc,machineAddressfnc,clusterNamefnc):cd(/)print "Creating mgdServer " +CachemgdNamefnc+ ":"cmo.createCoherenceServer(CachemgdNamefnc)cd(/CoherenceServers/+CachemgdNamefnc)cmo.setMachine(getMBean(/Machines/+machineNamefnc))cmo.setCoherenceClusterSystemResource(getMBean(/CoherenceClusterSystemResources/+clusterNamefnc))cmo.setUnicastListenAddress(machineAddressfnc)cmo.setUnicastListenPort(CachemgdPortfnc)cmo.setUnicastPortAutoAdjust(false)cd(/CoherenceServers/+CachemgdNamefnc+/CoherenceServerStart/+CachemgdNamefnc)cmo.setJavaHome(javaHome)cmo.setRootDirectory(domainDir+/+domainName)cmo.setJavaVendor(Oracle)cmo.setBeaHome(beaHome)cmo.setClassPath(beaHome+/modules/features/weblogic.server.modules.coherence.server_10.3.5.0.jar:+beaHome+/coherence_3.7/lib/coherence.jar)cmo.setArguments(-Duser.timezone=GMT -Xverbose:gcreport,memory,gcpause -XverboseTimeStamp -Xverboselog:/fmw/log/+domainName+/+CacheClusterName+/+CachemgdNamefnc+.gc -Xms1536m -Xmx1536m -Dtangosol.coherence.mode=prod-Dtangosol.coherence.machine=+machineAddressfnc+ -Doracle.coherence.machine=+machineAddressfnc+ -Dtangosol.coherence.cluster=+CacheClusterName+ -Dtangosol.coherence.localhost=+machineAddressfnc+ -Dtangosol.coherence.localport=+str(CachemgdPortfnc)+ -Dtangosol.coherence.session.localstorage=true -Dtangosol.coherence.log=/fmw/log/+domainName+/+CacheClusterName+/+CachemgdNamefnc+.out -Dtangosol.coherence.override=+domainDir+/+domainName+/config/coherence/+CacheClusterName+/tangosol-coherence-override.xml -Dtangosol.coherence.management.remote=true)nodes = 1while nodes < = clusterNodesInt:CachemgdPortInt = int(CachemgdPort[(nodes-1)])CreateCachemgd(CachemgdName[(nodes-1)],CachemgdPortInt,machineName[(nodes-1)],machineAddress[(nodes-1)],CacheClusterName)nodes += 1save()activate()exit()3) Update WLS JVMs to join the Coherence ClusterThe webapp which uses coherence is deployed on WLS cluster.Next steps will prepare the WLS JVMs to join the Coherence cluster and WKA (Well Known Address) list asmembersOn wl_pr1_01, add the below settings to arguments within the “server start” options.-Dtangosol.coherence.distributed.localstorage=false -Dtangosol.coherence.mode=prod -Dtangosol.coherence.localport.adjust=false -Dtangosol.coherence.machine=myTestMachine01.mydomain.com -Doracle.coherence.machine=myTestMachine01.mydomain.com -Dtangosol.coherence.member=wl_pr1_01 -Dtangosol.coherence.localhost=myTestMachine01.mydomain.com -Dtangosol.coherence.localport=9999 -
  • 7. Dtangosol.coherence.override=/fmw/domains/myDomain/config/coherence/my_cache_cluster/tangosol-coherence-override.xmlSimilarly f or the other JVMs.Local storage f lag (-Dtangosol.coherence.distributed.localstorage=f alse) is set to f alse since the WLS jvmsare clients.To activate the changes, restart the WLS servers and Coherence servers.To conf irm all the members successf ully join the coherence cluster, ref er to the coherence logs.For inf ormation on conf iguring Enterprise Manager 12c f or Oracle Coherence please see this post.