Search This Blog

Thursday, January 31, 2013

JMS Module Uniform Distributed Queue using WLST


This post is continous series of JMS configurations experimenting with Python. Here the JMS module configuration changes for the JMS will be stored to config.xml repository and its sub-deployment module descriptor in a separate file. JMS system module can be defined with name, target to servers or cluster, its related sub-deployments such as Queue or publisher/Subscriber topics.

The WebLogic JMS related Mbeans are constructed as follows :
  • JMSBean
  • JMSSystemReourceMBean
  • QueueBean
  • JMSConnectionFactoryBean
  • DistributedQueueBean
  • UniformDistributedQueueBean
  • SubdeploymentMBean

While configuring you need to understand that JMS system module, that consists of ConnectionFactory that give access to the JMS services, and there could be a different scenario on demand. The machines are high-powered, low powered are in the same cluster then JMS destinations must be distributed destinations with ‘Allocate members Uniformly’ option set to false and manually select more physical destination from the high powered machines.The configuring JMS module is going to have various sub-deployment components in it. First we need to configure the JMS Module name, target to the advanced deployment as sub-deployment. 


Now you need brainstrom, and provide your customized domain with JMS module details in the properties file, let me give you sample :
############################################################################### 
# JMS MODULE CONFIGURATION
############################################################################### 
total_default_jms_module=1
jms_mod_name1=jmsSystemModule
jms_mod_target1=my_cluster

Subdeployment in JMS Module

Most of the Admins not really aware of the use of subdeployment. We need to configure a subdeployment per JMS Module. While configuring the subdeployment we have to provide the target as JMS servers which are configured in the first section. Why we need a subdeployment is interesting topic  • To avoid network traffic between JMS components communication • It will group Connection factories, queues, topics

 • Easy to migrate
WebLogic - JMS Module configuration using WLST

###############################################################################
# JMS SUBDEPLOY CONFIGURATION
###############################################################################
total_subdply=1
subdeployment_name=aJmssub

JMS Connection Factory

We have configured the ConnectionFactory properties as follows
###############################################################################
# JMS CONNECTION FACTORY CONFIGURATION
##########
conf_jndi1=myConnectionFactory
conf_name1=MyConnectionFactory
Configuring Uniform distributed queue using WLST We have configured the Queue with Distributed option because we have multiple JMS providers. The Uniform Distributed Queue is the one of the best practice when you have Clustered WebLogic Domain. While configuring this you need a name for the Uniform Distributed Queue and a JNDI name for it.
###############################################################################
#   UNIFORM DISTRIBUTED QUEUE CONFIGURATION
###############################################################################
total_udq=3
udq_name1=jmsIncomingChannel
udq_jndi1=jms/incoming/response
The JMS Module configuration with Subdeployment target to JMS Servers configured earlier. ConnectionFactory, Uniform Distributed Queue target to subdeployment.
from java.util import Properties
from java.io import FileInputStream
from java.io import File
from java.io import FileOutputStream
from java import io
from java.lang import Exception
from java.lang import Throwable
import os.path
import sys

envproperty=""
if (len(sys.argv) > 1):
        envproperty=sys.argv[1]
else:
        print "Environment Property file not specified"
        sys.exit(2)
propInputStream=FileInputStream(envproperty)
configProps=Properties()
configProps.load(propInputStream)

def createJMSModule(jms_module_name,cluster_target_name):
        cd('/JMSServers')
        jmssrvlist=ls(returnMap='true')
       # jmssrvlist=['AjmsServer1','AjmsServer2']
        cd('/')
        module = create(jms_module_name, "JMSSystemResource")
        cluster = getMBean("Clusters/"+cluster_target_name)
        module.addTarget(cluster)
        cd('/SystemResources/'+jms_module_name)

        module.createSubDeployment(subdeployment_name)
        cd('/SystemResources/'+jms_module_name+'/SubDeployments/'+subdeployment_name)
        list=[]
        for j in jmssrvlist:
                s='com.bea:Name='+j+',Type=JMSServer'
                list.append(ObjectName(str(s)))
        set('Targets',jarray.array(list, ObjectName))


def getJMSModulePath(jms_module_name):
        jms_module_path = "/JMSSystemResources/"+jms_module_name+"/JMSResource/"+jms_module_name
        return jms_module_path

def createJMSTEMP(jms_module_name,jms_temp_name):
        jms_module_path= getJMSModulePath(jms_module_name)
        cd(jms_module_path)
        cmo.createTemplate(jms_temp_name)
        cd(jms_module_path+'/Templates/'+jms_temp_name)
        cmo.setMaximumMessageSize(20)

def createJMSUDQ(jms_module_name,jndi,jms_udq_name):
        jms_module_path = getJMSModulePath(jms_module_name)
        cd(jms_module_path)
        cmo.createUniformDistributedQueue(jms_udq_name)
        cd(jms_module_path+'/UniformDistributedQueues/'+jms_udq_name)
        cmo.setJNDIName(jndi)
    #    cmo.setDefaultTargetingEnabled(bool("true"))
        cmo.setSubDeploymentName(subdeployment_name)

def createJMSConnectionFactory(jms_module_name,cfjndi,jms_cf_name):
        jms_module_path = getJMSModulePath(jms_module_name)
        cd(jms_module_path)
        cf = create(jms_cf_name,'ConnectionFactory')
        jms_cf_path = jms_module_path+'/ConnectionFactories/'+jms_cf_name
        cd(jms_cf_path)
        cf.setJNDIName(cfjndi)
        cd (jms_cf_path+'/SecurityParams/'+jms_cf_name)
        #cf.setAttachJMXUserId(bool("false"))
        cd(jms_cf_path+'/ClientParams/'+jms_cf_name)
        cmo.setClientIdPolicy('Restricted')
        cmo.setSubscriptionSharingPolicy('Exclusive')
        cmo.setMessagesMaximum(10)
        cd(jms_cf_path+'/TransactionParams/'+jms_cf_name)
        #cmo.setXAConnectionFactory(bool("true"))
        cd(jms_cf_path)
        cmo.setDefaultTargetingEnabled(bool("true"))

adminUser=configProps.get("adminUser")
adminPassword=configProps.get("adminPassword")
adminURL=configProps.get("adminURL")

connect(adminUser,adminPassword,adminURL)

edit()
startEdit()

 # ====# JMS CONFIGURATION## ##########################################
total_temp=configProps.get("total_temp")
total_udq=configProps.get("total_udq")
total_conf=configProps.get("total_conf")
tot_djmsm=configProps.get("total_default_jms_module")
subdeployment_name=configProps.get("subdeployment_name")

a=1
while(a <= int(tot_djmsm)):
        var1=int(a)
        jms_mod_name=configProps.get("jms_mod_name"+ str(var1))
        cluster=configProps.get("jms_mod_target"+ str(var1))
        createJMSModule(jms_mod_name,cluster)
        i=1

        while(i <= int(total_temp)):
                t_name=configProps.get("temp_name"+ str(i))
                createJMSTEMP(jms_mod_name,t_name)
                i = i + 1

        j=1
        while(j <= int(total_udq)):
                udq_name=configProps.get("udq_name"+ str(j))
                udq_jndi=configProps.get("udq_jndi"+ str(j))
                createJMSUDQ(jms_mod_name,udq_jndi,udq_name)
                j = j + 1
        k = 1
        while(k <= int(total_conf)):
                conf_name=configProps.get("conf_name"+ str(k))
                conf_jndi=configProps.get("conf_jndi"+ str(k))
                createJMSConnectionFactory(jms_mod_name,conf_jndi,conf_name)
                k = k + 1
        a = a+1

save()
activate(block="true")
disconnect()
############################################################

The sample properties listed for helping out how to create here for your projects.
###############################################################################
# JMS SUBDEPLOY CONFIGURATION
###############################################################################
total_subdply=1
total_default_jms_module=1
total_conf=1
subdeployment_name=demoSub

###############################################################################
# JMS CONNECTION FACTORY CONFIGURATION
######################################################
conf_jndi1=demoCF
conf_name1=jms/demoCF

###############################################################################
#   UNIFORM DISTRIBUTED QUEUE CONFIGURATION
###############################################################################
 

total_temp=0
total_udq=2
udq_name1=jmsIncomingChannel
udq_jndi1=jms/incoming/response
temp_name1=jmsIncomingChannel1

udq_name2=jmsOutgoingChannel
udq_jndi2=jms/outgoing/response
temp_name2=jmsOutgoingChannel1

adminUser=weblogic
adminPassword=welcome1
adminURL=t3://192.168.1.106:8100
###############################################################################
# JMS MODULE CONFIGURATION
###############################################################################
total_default_jms_module=1
jms_mod_name1=demo_jmsmod
jms_mod_target1=democlstr

To execute this JMS Module with subdeployments you need to pass the properties file as argument
java weblogic.WLST jms_module.py jms_module.properties
pavanbsd@ubuntu:~/pybin$ wlst jmsmodnq.py jmsmodnq.properties

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://192.168.1.106:8100 with userid weblogic ...
Successfully connected to Admin Server "demoadmin" that belongs to domain "demodomain".

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

Location changed to edit tree. This is a writable tree with
DomainMBean as the root. To make changes you will need to start
an edit session via startEdit().

For more help, use help('edit')
You already have an edit session in progress and hence WLST will
continue with your edit session.

Starting an edit session ...
Started edit session, please be sure to save and activate your
changes once you are done.
drw-   jms_ms1
drw-   jms_ms2

MBean type JMSSystemResource with name demo_jmsmod has been created successfully.
MBean type ConnectionFactory with name jms/demoCF has been created successfully.
Saving all your changes ...
Saved all your changes successfully.
Activating all your changes, this may take a while ...
The edit lock associated with this edit session is released
once the activation is completed.
Activation completed
Disconnected from weblogic server: demoadmin

Keep writing back 🔙 your error screen shot comments and suggestions on this post. Keep smiling cheers!! 

Friday, January 25, 2013

JMS Server Configuration using WLST

Most of the message orient middleware architecture designs, while preparing the proof of concept for a new business domain they need to do multiple trails and errors. Configuring for such system resource task can be simplified with Python script. is one of the phases on other hand is setting up the thresholds and quota is next phase.
WebLogic  -  JMS Servers with File Store

Before entering into the scripting let us have brief JMS details, the basic types of JMS message communications are two:

  •  Point to Point (PTP) 
  • Publisher/Subscriber (Pub/Sub)
WLST JMS Server configuration
Usually JEE development lead or architect decides which kind of messaging could be suitable for the application. Once you got the “Sign-off” for the communication mechanism, the Middleware admin will be configuring the JMS system resources.
I like Jeff West video presentation about JMS Servers and their usage with uniform distributed Queue, Topic and newly introduced Partitioned distribution. For your reference embedding the video here.


Initially, we need a JMS persistence store configuration using WLST script, that enables you to configure as many JMS servers and persistence stores as required for an application deployment. The persistence store can be created with File Store or JDBC store options. As per your domain requirement you can specify the total number in the properties file. Suppose Architect team decided to use only File Stores then we can set 0 to JDBC total store so that the loop will be disabled for that.


What we do for JMS configuration using WLST?

The base JMS configuration is going to involve the following: a. Persistence store creation with Files: For each managed server where JMS servers configured there we need to create a File store. As best practice we create a dedicated folder where all the filestores can be stored per machine. Use the same directory structure for all machines where the filestores configured. b. Persistence store with JDBC: This we can use when your JMS message persistence requires huge message sizes. c. JMS server : we need to configure as many JMS servers as managed servers involve in JMS messaging
from java.util import Properties
from java.io import FileInputStream
from java.io import File
from java import io
from java.lang import Exception
from java.lang import Throwable
import os.path
import sys

def createFlstr(fstr_name,dir_name,target_name):
        cd('/')
        fst = create(fstr_name, "FileStore")
        cd('/FileStores/'+fstr_name)
        cmo.setDirectory(dir_name)
        fst.addTarget(getMBean("/Servers/"+target_name))

def createJDstr(jstr_name,ds_name,target_name,prefix):
        cd('/')
        jst = create(jstr_name, "JDBCStore")
        cd('/JDBCStores/'+jstr_name)
        cmo.setDataSource(getMBean('/SystemResources/'+ds_name))
        cmo.setPrefixName(prefix)
        jst.addTarget(getMBean("/Servers/"+target_name))

def createJMSsrvr(jms_srv_name,target_name,persis_store,page_dir, thrs_high, thrs_low, msg_size):
        cd('/')
        srvr = create(jms_srv_name, "JMSServer")
        cd('/Deployments/'+jms_srv_name)
        srvr.setPersistentStore(getMBean('/FileStores/'+persis_store))
#       srvr.setPersistentStore(getMBean('/JDBCStores/'+persis_store))
        srvr.setPagingDirectory(page_dir)
        srvr.addTarget(getMBean("/Servers/"+target_name))
        srvr.setBytesThresholdLow(long(thrs_low))
        srvr.setBytesThresholdHigh(long(thrs_high))
        srvr.setMaximumMessageSize(long(msg_size))

envproperty=""
if (len(sys.argv) > 1):
    envproperty=sys.argv[1]
else:
    print "Environment Property file not specified"
    sys.exit(2)
propInputStream=FileInputStream(envproperty)
configProps=Properties()
configProps.load(propInputStream)

adminUser=configProps.get("adminUser")
adminPassword=configProps.get("adminPassword")
adminURL=configProps.get("adminURL")

connect(adminUser,adminPassword,adminURL)

edit()
startEdit()

#=============# JMS SERVER and PERSISITENT STORE CONFIGURATION #=============#
total_fstore=configProps.get("total_fstore")
#total_jstore=configProps.get("total_jstore")
total_jmssrvr=configProps.get("total_jmssrvr")

j=1
while (j <= int(total_jmssrvr)):
        jms_srv_name=configProps.get("jms_srvr_name"+ str(j))
        trg=configProps.get("jms_srvr_target"+ str(j))
        persis_store=configProps.get("jms_srvr_persis_store_name"+str(j))
        page_dir=configProps.get("jms_srvr_pag_dir"+str(j))
        thrs_high=configProps.get("jms_srvr_by_threshold_high"+str(j))
        thrs_low=configProps.get("jms_srvr_by_threshold_low"+str(j))
        msg_size=configProps.get("jms_srvr_max_msg_size"+str(j))
        createFlstr(persis_store,page_dir,trg)
        createJMSsrvr(jms_srv_name,trg,persis_store,page_dir,thrs_high,thrs_low,msg_size)
        j = j+1
#==========================================================================================#
save()
activate()
To execute this script you need to workout on your properties file, indentation in the script.
$ java weblogic.WLST jms_servers.py jms_servers.properties

Generic advantage of this Script

Here most important thing is that when you wish that the persistance store could be a filestore then, it requires file path, if you are giving in the properties file assign absoulute path.
Sample properties file here
adminUser=weblogic
adminPassword=welcome1
adminURL=t3://192.168.1.106:8100
total_fstore=2
total_jmssrvr=2

jms_srvr_name1=jms_ms1
jms_srvr_target1=ms1
jms_srvr_persis_store_name1=jms_ms1_fs
jms_srvr_pag_dir1=/home/wlsdomains/demodomain/fs
jms_srvr_by_threshold_high1=10
jms_srvr_by_threshold_low1=5
jms_srvr_max_msg_size1=512

jms_srvr_name2=jms_ms2
jms_srvr_target2=ms2
jms_srvr_persis_store_name2=jms_ms2_fs
jms_srvr_pag_dir2=/home/wlsdomains/demodomain/fs
jms_srvr_by_threshold_high2=10
jms_srvr_by_threshold_low2=5
jms_srvr_max_msg_size2=512

Tuesday, January 8, 2013

Cluster manuplation with WLST

There could be situations where you might have seen this. such as in production environment one of the site will be decommissioned. All the site member machines hosting WebLogic Managed Servers will be kicked out of domain. finally the cluster will be removed.

In some cases your production environment might having business enhancement plans, so that there could be new geographical site will be added to to existing running domain then, there would be need of cluster or clusters addition to the domain and respective managed servers all added to it.

Here I got a thought that why don't we make a WLST script that will give you option of High Availability(HA) with above said options as well additon to it addtion of managed server and removal of managed servers.

OEPE is giving ready made scripts so I thought this would be easy to implement the logic.

Designing WebLogic Cluster

First you need to identify type of the cluster you need to implement. Single WebLogic Cluster can serve the minimum size of business requests. You need to identify the number of the server required on a cluster. You can choose Multi-tier cluster where you can have dedicated cluster for each service. After experiancing many production issues identified what all the configuration changes that makes standard and easy to handle the troubleshooting in production environments are collected and compiled as "Best practices" implementation for Managed server configuration with Jython script.

1. Log LEVELwith best suitable attributes
2. Log rotation for managed servers
3. Threadpool size settings with WLST
4. Diagnostic framework enabling with WLST

from java.util import *
from java.io import FileInputStream
from javax.management import *
import javax.management.Attribute
import sys

envproperty=""
if (len(sys.argv) > 1):
 envproperty=sys.argv[1]
else:
 print "Environment Property file not specified"
 sys.exit(2)

propInputStream=FileInputStream(envproperty)
configProps=Properties()
configProps.load(propInputStream)

def getp(x):
 """ This function will be used to fetch the properties file"""
        return configProps.get(x)
 

def logLevel(ms, k):
 lg = ms.getLog()
 lg.setFileName(''+domainHome+'/logs/bea/ms'+str(k)+'_'+domainName+'.log')
 lg.setLogFileSeverity('Info')
 lg.setRotationType('byTime')
 lg.setRotationTime("23:59")
 lg.setFileTimeSpan(24)
 lg.setDomainLogBroadcastSeverity('Error')
 lg.setMemoryBufferSeverity('Error')
 lg.setRedirectStdoutToServerLogEnabled(true)
 lg.setRedirectStderrToServerLogEnabled(true)
 lg.setStdoutSeverity('Error')
 
def setDiagnostics(ms, k):
 svrdiag = ms.getServerDiagnosticConfig()
 svrdiag.setDiagnosticContextEnabled(false)
 svrdiag.setDiagnosticStoreDir(''+domainHome+'/logs/store/diagnostics/ms'+str(k)+'_'+domainName+'/')

 defFileStore = ms.getDefaultFileStore()
 defFileStore.setDirectory(''+domainHome+'/logs/store/default/ms'+str(k)+'_'+domainName+'/')
  
 hvDataRetire = svrdiag.createWLDFDataRetirementByAge("HarvestDataRetirePolicy")
 hvDataRetire.setArchiveName(""+getp("ms_harvesarchivename")) 
 hvDataRetire.setEnabled(bool(getp("ms_harvesenabled")))
 hvDataRetire.setRetirementAge(int(getp("ms_harvesretireage")))
 hvDataRetire.setRetirementPeriod(int(getp("ms_harvesretireperiod")))
 hvDataRetire.setRetirementTime(int(getp("ms_harvesretiretime")))

 eventDataRetire = svrdiag.createWLDFDataRetirementByAge("EventDataRetirePolicy")
 eventDataRetire.setArchiveName(""+getp("ms_evtarchivename"))
 eventDataRetire.setEnabled(bool(getp("ms_evtenabled")))
 eventDataRetire.setRetirementAge(int(getp("ms_evtretireage")))
 eventDataRetire.setRetirementPeriod(int(getp("ms_evtretireperiod")))
 eventDataRetire.setRetirementTime(int(getp("ms_evtretiretime")))

def webserver_log(ms, k):
 wbsvr = ms.getWebServer()
 wbsvr.setPostTimeoutSecs(30)
 wbsvrlog = wbsvr.getWebServerLog()
 wbsvrlog.setFileName(''+domainHome+'/logs/ms'+str(k)+'_'+domainName+'_access.log')
 wbsvrlog.setLoggingEnabled(bool(getp("ms_accesslogenabled")))
 wbsvrlog.setLogFileFormat(""+getp("ms_accesslogformat"))
 wbsvrlog.setELFFields(""+getp("ms_extlogfomart"))
 wbsvrlog.setRotationType('byTime')
 wbsvrlog.setRotationTime("23:59")
 wbsvrlog.setFileTimeSpan(24)

 #execQ1 = ms.createExecuteQueue("weblogic.kernel.Default")
 #execQ1.setThreadCount(30)
 #execQ1.setThreadsIncrease(0) 
#####################################################################################
#  MANAGED SERVER CONFIGURATIONS
###################################################################################

def create_ms(k):
 ms = create(""+getp("man"+str(k)),'Server')
 ms.setListenAddress(""+getp("ms_listenaddress"+str(k)))
 ms.setListenPort(int(getp("ms_listenport"+str(k))))
 
 ms.setWeblogicPluginEnabled(bool(getp("ms_defaultwlplugin")))
 #ms.setUse81StyleExecuteQueues(true)
 ms.setMaxOpenSockCount(int(getp("ms_maxopensockcount")))
 ms.setNativeIOEnabled(bool(getp("ms_nativeioenabled")))
 ms.setStuckThreadMaxTime(int(getp("ms_stuckthreadmaxtime")))
 ms.setStuckThreadTimerInterval(int(getp("ms_stuckthreadtimerinterval")))
 ms.setLowMemoryGCThreshold(int(getp("ms_lowmemorygcthreshold")))
 ms.setLowMemorySampleSize(int(getp("ms_lowmemorysamplesize")))
 ms.setLowMemoryTimeInterval(int(getp("ms_lowmemorytimeinterval")))
 ms.setStagingMode(""+getp("ms_stagingmode"))
 ms.setAcceptBacklog(int(getp("ms_acceptbacklog")))
 ms.setLoginTimeoutMillis(int(getp("ms_logintimeoutmillis")))
 ms.setManagedServerIndependenceEnabled(bool(getp("ms_managedserverindependenceenabled")))
 ms.setTransactionLogFilePrefix(""+getp("ms_transactionlogfileprefix"))
 print ' ******* SETTTING MANAGED SERVER ATTRIBUTES for *********** '+getp("man"+str(k))
 logLevel(ms, k)
 setDiagnostics(ms, k)
 webserver_log(ms, k)
 ms.setCluster(clusTgt)
 
################ main program ####################################################
domainName=getp("domainName")
adminServerListenaddr=getp("adminServerListenaddr")
admin_listerport=getp("admlistenport")
adminURL="t3://"+adminServerListenaddr+":"+str(admin_listerport)
domainHome=getp("domainHome")

adminUser=getp("adminUser")
adminPassword=getp("adminPassword")
userConfigFile=""+domainHome+"/bin/userconfigfile.secure"
userKeyFile=""+domainHome+"/bin/userkeyfile.secure"

adminServerName=getp("adminServerName")
clusterName=getp("clusterName")
numMS=getp("total_mansrvr")

connect(adminUser,adminPassword,adminURL)
edit()
startEdit()
cd('/')
#####################################################################################
#  CLUSTER CONFIGURATIONS
#####################################################################################
print ' ******* CREATING CLUSTER *********** '
clu = cmo.createCluster(""+clusterName)
isMulticastTrue=getp("isMulticastTrue")
if (isMulticastTrue == "true"):
 clu.setMulticastAddress(getp("multi_address"))
 clu.setMulticastPort(getp("multi_port"))
else:
 clu.setClusterMessagingMode('unicast')

clu.setWeblogicPluginEnabled(true)
clu.setClusterAddress('')
#cd('/Clusters/'+clusterName+'/OverloadProtection/'+clusterName+'/ServerFailureTrigger/'+clusterName)
#clu.setMaxStuckThreadTime(300)
#clu.setStuckThreadCount(0)
#cd('/Clusters/'+clusterName+'/OverloadProtection/'+clusterName)
#clu.setPanicAction('system-exit')
#clu.setFailureAction('admin-state')
#clu.createServerFailureTrigger()
cd('/Clusters/'+clusterName)
clusTgt = cmo
cd('/')
for k in range(1, int(numMS)+1): 
 print getp("man"+str(k))
 create_ms(k) 
cd('/')
save()
activate(block="true")

disconnect()
#####################################################################################

Here I am publishing the sample properties file that I have tried on my Windows operating system, after the execution of basic domain running with Admin server. When we start the WebLogic 12c or 10.3.6 version on Windows 7 it is not able to open the 'Console'. Alternative solution for this is change the PermSize to 512m in the setDomainEnv.cmd select proper Java vendor and update the following lines.
 set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx512m -XX:PermSize=512m
 set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx512m -XX:PermSize=512m
Start the Admin server so that we can run the online WLST script to configure the number of managed server that are mentioned in the properties file. The properties file is extended for this Cluster implemenation is as follows:
#####################################################################################
# DOMAIN LEVEL CONFIGURATION
##################################################################################
domainTemplate=C:/Oracle/Middleware/wlserver_10.3/common/templates/domains/wls.jar
#Following property is the default property and should not be changed.
weblogicdomainpasspath=Security/base_domain/User/weblogic

adminUser=weblogic
adminPassword=weblogic123$
adminServerName=admin_cldom
adminServerListenaddr=localhost
admlistenport=7100

OverwriteDomain=true
domainName=cldom1
domainHome=C:/wldomains/cldom1

clusterName=cluster_cldom
isMulticastTrue=false
multi_address=
multi_port=
##################################################################################
# MANAGED SERVERS CONFIGURATIONS
##################################################################################
total_mansrvr=2

man1=rdms1_cldom
man2=rdms2_cldom

ms_listenaddress1=localhost
ms_listenaddress2=localhost

ms_listenport1=61001
ms_listenport2=61002

ms_selftunningthreadpoolsizemin=30
ms_selftunningthreadpoolsizemax=35
ms_defaultwlplugin=true
ms_maxopensockcount=1000
ms_nativeioenabled=true
ms_stuckthreadmaxtime=300
ms_stuckthreadtimerinterval=300
ms_lowmemorygcthreshold=5
ms_lowmemorysamplesize=10
ms_lowmemorytimeinterval=3600
ms_stagingmode=nostage
ms_acceptbacklog=65
ms_logintimeoutmillis=5000
ms_managedserverindependenceenabled=true
ms_transactionlogfileprefix=/xa_logs/cldom

ms_accesslogenabled=true
ms_accesslogformat=extended
ms_extlogfomart=c-ip date time cs-method sc-status time-taken bytes cs-uri cs(Referer)

ms_harvesarchivename=HarvestedDataArchive
ms_harvesenabled=true
ms_harvesretireage=168
ms_harvesretireperiod=24
ms_harvesretiretime=0

ms_evtarchivename=EventsDataArchive
ms_evtenabled=true
ms_evtretireage=168
ms_evtretireperiod=24
ms_evtretiretime=0
When we run the sample cluster domain on the Windows 7 the outcome is as follows:
C:\pbin>java weblogic.WLST cluster_conf.py mycldom.properties

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://localhost:7100 with userid weblogic ...
Successfully connected to Admin Server 'admin_cldom' that belongs to domain 'cld
om1'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

Location changed to edit tree. This is a writable tree with
DomainMBean as the root. To make changes you will need to start
an edit session via startEdit().

For more help, use help(edit)

Starting an edit session ...
Started edit session, please be sure to save and activate your
changes once you are done.
 ******* CREATING CLUSTER ***********
rdms1_cldom
MBean type Server with name rdms1_cldom has been created successfully.
 ******* SETTTING MANAGED SERVER ATTRIBUTES for *********** rdms1_cldom
rdms2_cldom
MBean type Server with name rdms2_cldom has been created successfully.
 ******* SETTTING MANAGED SERVER ATTRIBUTES for *********** rdms2_cldom
Saving all your changes ...
Saved all your changes successfully.
Activating all your changes, this may take a while ...
The edit lock associated with this edit session is released
once the activation is completed.
Activation completed
Disconnected from weblogic server: admin_cldom

Popular Posts