rss
SOATUBE
Oracle
Custom Search SOABYTE here

Wednesday, November 25, 2015

Adding managed servers to domain/cluster and basic tuning via wlst

Place addNodes.properties file,AddManagedServerToDomain.py and runAddManagedServerToDomain.sh inside a folder and execute ./runAddManagedServerToDomain.sh to run the program.Here we are adding 3rd managed server (myhost2:8001) to cluster.
#*****************************************************
# Environment details
#*****************************************************
ADMIN_USERNAME = weblogic
ADMIN_PASSWORD = welcome1
ADMIN_URL = t3://<hostname>:<port>
CLUSTER_NAME = MyCluster

##*****************************************************
##   Set Log Rotation by Time                         *
##*****************************************************
# How to rotate
RotationType = byTime
# When to roate
RotationTime = 00:00
# For how much time
FileTimeSpan = 24

##*****************************************************
##   Max Message Size Configurations                  *
##*****************************************************

MaxMessageSize = 50000000


##*****************************************************
##  Cluster Address                                   *
##*****************************************************

ClusterAddress = myhost1:8001,myhost1:8002,myhost2:8001

##*****************************************************
#   Machine Names to be added                         *
##*****************************************************

MachineNames = MyMachine_3

##*****************************************************
##  Listen Adresses(repeat twice for 2 servers per VM)*
##*****************************************************

ListenAddresses = myhost2

##*****************************************************
##   Listen Ports (8001/8002 for 2 servers per VM)    *
##*****************************************************

ListenPorts = 8001

##*****************************************************
##   ServerNames(to be created)                       *
##*****************************************************

ServerNames = SoaServer_3

##*****************************************************
##   Server Number(to be added)                      *
##*****************************************************

ServerNumbers = 3

##*****************************************************
##   New SAF Agents to be created                     *
##*****************************************************

SAFAgentsNames = OSM_SAFAgent_03



########################################################################################
# Adding Nodes to domain Automation                                                    #
# @Amiya Kumar                                                                         #
# Restart the servers after running this script.                                       #
#Do not change the discription                                                         #
########################################################################################


#Running the script                                                                    #
#Run runaddNodeAutomationWLST.sh                                                        #
########################################################################################

from java.io import FileInputStream
import java.lang
import string
import sys
import os

#read properties file
propInputStream = FileInputStream("addNodes.properties");
configProps = Properties();
configProps.load(propInputStream);

#Connecting to Server
adminusername = configProps.get('ADMIN_USERNAME');
adminpassword = configProps.get('ADMIN_PASSWORD');
adminurl = configProps.get('ADMIN_URL');
clusterName = configProps.get('CLUSTER_NAME');
connect(adminusername, adminpassword, adminurl);
MachineNames = configProps.get('MachineNames');
MachineNameList = String(MachineNames).split(",");
ListenAddresses = configProps.get('ListenAddresses');
ListenAddressList = String(ListenAddresses).split(",");
ServerNames = configProps.get('ServerNames');
ServerNameList = String(ServerNames).split(",");
ServerNumbers = configProps.get('ServerNumbers');
ServerNumberList = String(ServerNumbers).split(",");
ListenPorts = configProps.get('ListenPorts');
ListenPortList = String(ListenPorts).split(","); 

#Creating Managed servers and related resources
def createManagedServersandResources():
 domainConfig();
 i=0;
 j=0;
 k=0;
 l=0;
 m=0;
 while i<len(MachineNameList) and j<len(ListenAddressList) and k<len(ServerNameList) and l<len(ServerNumberList) and m<len(ListenPortList):
  edit();
  startEdit();
  MachineName = MachineNameList[i]
  ListenAddress = ListenAddressList[j]
  ServerName = ServerNameList[k]
  ServerNumber = ServerNumberList[l]
  ListenPort = ListenPortList[m]
  #####Creating Machine########
  cd('/')
  cmo.createUnixMachine(MachineName)
  cd('/Machines/'+MachineName+'/NodeManager/'+MachineName+'/')
  cmo.setNMType('SSL')
  cmo.setListenAddress(ListenAddress)
  cmo.setListenPort(5556)
  cmo.setDebugEnabled(false)
  ######Creating Managed Server and adding to existing cluster and machine created above######
  cd('/')
  cmo.createServer(ServerName)
  cd('/Servers/'+ServerName+'/')
  cmo.setListenAddress(ListenAddress)
  cmo.setListenPort(int(ListenPort))
  cmo.setCluster(getMBean('/Clusters/'+clusterName+'/'))

  cd('/Servers/'+ServerName+'/SSL/'+ServerName+'/')
  cmo.setExportKeyLifespan(500)
  cmo.setUseServerCerts(false)
  cmo.setSSLRejectionLoggingEnabled(true)
  cmo.setAllowUnencryptedNullCipher(false)
  cmo.setInboundCertificateValidation('BuiltinSSLValidationOnly')
  cmo.setOutboundCertificateValidation('BuiltinSSLValidationOnly')
  cmo.setHostnameVerificationIgnored(true)
  cmo.setHostnameVerifier(None)
  cmo.setTwoWaySSLEnabled(false)
  cmo.setClientCertificateEnforced(false)
  cmo.setJSSEEnabled(false)

  cd('/Servers/'+ServerName+'/')
  cmo.setMachine(getMBean('/Machines/'+MachineName+'/'))

  ######Creating Persistent stores#######
  cd('/')
  cmo.createFileStore('AIADataStore_'+ServerNumber)
  cd('/FileStores/AIADataStore_'+ServerNumber+'/')
  cmo.setDirectory('AIADataStore_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))

  cd('/')
  cmo.createJDBCStore('AIAJDBCDataStore_'+ServerNumber)
  cd('/JDBCStores/AIAJDBCDataStore_'+ServerNumber+'/')
  cmo.setDataSource(getMBean('/SystemResources/AIAJMSDS'))
  cmo.setPrefixName('AIAJDBCDataStore_'+ServerNumber)
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))
  cd('/')
  cmo.createFileStore('BPMJMSFileStore_auto_'+ServerNumber)
  cd('/FileStores/BPMJMSFileStore_auto_'+ServerNumber+'/')
  cmo.setDirectory('BPMJMSFileStore_auto_'+ServerNumber)
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))
  cd('/')
  cmo.createFileStore('SOAJMSFileStore_auto_'+ServerNumber)
  cd('/FileStores/SOAJMSFileStore_auto_'+ServerNumber+'/')
  cmo.setDirectory('SOAJMSFileStore_auto_'+ServerNumber)
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))
  cd('/')
  cmo.createFileStore('UMSJMSFileStore_auto_'+ServerNumber)
  cd('/FileStores/UMSJMSFileStore_auto_'+ServerNumber+'/')
  cmo.setDirectory('UMSJMSFileStore_auto_'+ServerNumber)
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName)) 

  ########Creating JMS Servers########
  cd('/')
  cmo.createJMSServer('AIAJDBCJMSServer_'+ServerNumber)
  cd('/Deployments/AIAJDBCJMSServer_'+ServerNumber+'/')
  cmo.setPersistentStore(getMBean('/JDBCStores/AIAJDBCDataStore_'+ServerNumber))
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))
  cd('/')
  cmo.createJMSServer('AIAJMSServer_'+ServerNumber)
  cd('/Deployments/AIAJMSServer_'+ServerNumber+'/')
  cmo.setPersistentStore(getMBean('/FileStores/AIADataStore_'+ServerNumber))
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))
  cd('/')
  cmo.createJMSServer('BPMJMSServer_auto_'+ServerNumber)
  cd('/Deployments/BPMJMSServer_auto_'+ServerNumber+'/')
  cmo.setPersistentStore(getMBean('/FileStores/BPMJMSFileStore_auto_'+ServerNumber))
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))
  cd('/')
  cmo.createJMSServer('SOAJMSServer_auto_'+ServerNumber)
  cd('/Deployments/SOAJMSServer_auto_'+ServerNumber+'/')
  cmo.setPersistentStore(getMBean('/FileStores/SOAJMSFileStore_auto_'+ServerNumber))
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))
  cd('/')
  cmo.createJMSServer('UMSJMSServer_auto_'+ServerNumber)
  cd('/Deployments/UMSJMSServer_auto_'+ServerNumber+'/')
  cmo.setPersistentStore(getMBean('/FileStores/UMSJMSFileStore_auto_'+ServerNumber))
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))

  ##########Creating BPM Subdeployments###########
  cd('/SystemResources/BPMJMSModule')
  cmo.createSubDeployment('BPMJMSServer_'+ServerNumber)
  cd('/SystemResources/BPMJMSModule/SubDeployments/BPMJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=BPMJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))

  ##########Adding resources to BPMJMSModules########

  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule')
  cmo.createTopic('MeasurementTopic_auto_'+ServerNumber)
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/Topics/MeasurementTopic_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/bpm/MeasurementTopic_auto_'+ServerNumber)
  cmo.setSubDeploymentName('BPMJMSServer_'+ServerNumber)
  cd('/SystemResources/BPMJMSModule/SubDeployments/BPMJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=BPMJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule') 
  cmo.createTopic('PeopleQueryTopic_auto_'+ServerNumber)
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/Topics/PeopleQueryTopic_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/bpm/PeopleQueryTopic_auto_'+ServerNumber)
  cmo.setSubDeploymentName('BPMJMSServer_'+ServerNumber)
  cd('/SystemResources/BPMJMSModule/SubDeployments/BPMJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=BPMJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/Topics/MeasurementTopic_auto_'+ServerNumber+'/Thresholds/MeasurementTopic_auto_'+ServerNumber+'/')
  cmo.setMessagesLow(9223372036854775807)
  cmo.setMessagesHigh(9223372036854775807)
  cmo.setBytesHigh(9223372036854775807)
  cmo.setBytesLow(9223372036854775807)
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/Topics/MeasurementTopic_auto_'+ServerNumber)
  cmo.setMaximumMessageSize(2147483647)
  cmo.setQuota(getMBean('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/Quotas/MeasurementQuota'))
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/DistributedTopics/dist_MeasurementTopic_auto')
  cmo.createDistributedTopicMember('MeasurementTopic_auto_'+ServerNumber)
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/DistributedTopics/dist_MeasurementTopic_auto/DistributedTopicMembers/MeasurementTopic_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/DistributedTopics/dist_PeopleQueryTopic_auto')
  cmo.createDistributedTopicMember('PeopleQueryTopic_auto_'+ServerNumber)
  cd('/JMSSystemResources/BPMJMSModule/JMSResource/BPMJMSModule/DistributedTopics/dist_PeopleQueryTopic_auto/DistributedTopicMembers/PeopleQueryTopic_auto_'+ServerNumber+'/')
  cmo.setWeight(1)

  #########Create SOAJMSModule Subdeployment######
  cd('/SystemResources/SOAJMSModule')
  cmo.createSubDeployment('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))

  ##########Adding resources to SOAJMSModules########
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule')
  cmo.createTopic('B2BBroadcastTopic_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/Topics/B2BBroadcastTopic_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/b2b/B2BBroadcastTopic_auto_'+ServerNumber)
  cmo.setSubDeploymentName('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule')
  cmo.createQueue('B2BEventQueue_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/Queues/B2BEventQueue_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/b2b/B2BEventQueue_auto_'+ServerNumber)
  cmo.setSubDeploymentName('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule')
  cmo.createQueue('B2B_IN_QUEUE_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/Queues/B2B_IN_QUEUE_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/b2b/B2B_IN_QUEUE_auto_'+ServerNumber)
  cmo.setSubDeploymentName('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule')
  cmo.createQueue('B2B_OUT_QUEUE_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/Queues/B2B_OUT_QUEUE_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/b2b/B2B_OUT_QUEUE_auto_'+ServerNumber)
  cmo.setSubDeploymentName('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule')
  cmo.createQueue('EDNQueue_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/Queues/EDNQueue_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/fabric/EDNQueue_auto_'+ServerNumber)
  cmo.setSubDeploymentName('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule')
  cmo.createQueue('NotificationSenderQueue_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/Queues/NotificationSenderQueue_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/Queue/NotificationSenderQueue_auto_'+ServerNumber)
  cmo.setSubDeploymentName('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule')
  cmo.createQueue('TestFwkQueue_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/Queues/TestFwkQueue_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/testfwk/TestFwkQueue_auto_'+ServerNumber)
  cmo.setSubDeploymentName('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule')
  cmo.createTopic('XmlSchemaChangeNotificationTopic_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/Topics/XmlSchemaChangeNotificationTopic_auto_'+ServerNumber+'/')
  cmo.setJNDIName('jms/fabric/XmlSchemaChangeNotificationTopic_auto_'+ServerNumber)
  cmo.setSubDeploymentName('SOAJMSServer_'+ServerNumber)
  cd('/SystemResources/SOAJMSModule/SubDeployments/SOAJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=SOAJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedTopics/dist_B2BBroadcastTopic_auto')
  cmo.createDistributedTopicMember('B2BBroadcastTopic_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedTopics/dist_B2BBroadcastTopic_auto/DistributedTopicMembers/B2BBroadcastTopic_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_B2BEventQueue_auto')
  cmo.createDistributedQueueMember('B2BEventQueue_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_B2BEventQueue_auto/DistributedQueueMembers/B2BEventQueue_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_B2B_IN_QUEUE_auto')
  cmo.createDistributedQueueMember('B2B_IN_QUEUE_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_B2B_IN_QUEUE_auto/DistributedQueueMembers/B2B_IN_QUEUE_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_B2B_OUT_QUEUE_auto')
  cmo.createDistributedQueueMember('B2B_OUT_QUEUE_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_B2B_OUT_QUEUE_auto/DistributedQueueMembers/B2B_OUT_QUEUE_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_EDNQueue_auto')
  cmo.createDistributedQueueMember('EDNQueue_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_EDNQueue_auto/DistributedQueueMembers/EDNQueue_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_NotificationSenderQueue_auto')
  cmo.createDistributedQueueMember('NotificationSenderQueue_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_NotificationSenderQueue_auto/DistributedQueueMembers/NotificationSenderQueue_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_TestFwkQueue_auto')
  cmo.createDistributedQueueMember('TestFwkQueue_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedQueues/dist_TestFwkQueue_auto/DistributedQueueMembers/TestFwkQueue_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedTopics/dist_XmlSchemaChangeNotificationTopic_auto')
  cmo.createDistributedTopicMember('XmlSchemaChangeNotificationTopic_auto_'+ServerNumber)
  cd('/JMSSystemResources/SOAJMSModule/JMSResource/SOAJMSModule/DistributedTopics/dist_XmlSchemaChangeNotificationTopic_auto/DistributedTopicMembers/XmlSchemaChangeNotificationTopic_auto_'+ServerNumber+'/')
  cmo.setWeight(1)

  #########Create SOAJMSModule Subdeployment######
  cd('/SystemResources/UMSJMSSystemResource')
  cmo.createSubDeployment('UMSJMSServer_'+ServerNumber)
  cd('/SystemResources/UMSJMSSystemResource/SubDeployments/UMSJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=UMSJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))

  ##########Adding resources to UMSJMSModules######## 
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource')
  cmo.createQueue('OraSDPM/Queues/OraSDPMAppDefRcvQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/Queues/OraSDPM/Queues/OraSDPMAppDefRcvQ1_auto_'+ServerNumber+'/')
  cmo.setJNDIName('OraSDPM/Queues/OraSDPMAppDefRcvQ1_auto_'+ServerNumber)
  cmo.setSubDeploymentName('UMSJMSServer_'+ServerNumber)
  cd('/SystemResources/UMSJMSSystemResource/SubDeployments/UMSJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=UMSJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource')
  cmo.createQueue('OraSDPM/Queues/OraSDPMDriverDefSndQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/Queues/OraSDPM/Queues/OraSDPMDriverDefSndQ1_auto_'+ServerNumber+'/')
  cmo.setJNDIName('OraSDPM/Queues/OraSDPMDriverDefSndQ1_auto_'+ServerNumber)
  cmo.setSubDeploymentName('UMSJMSServer_'+ServerNumber)
  cd('/SystemResources/UMSJMSSystemResource/SubDeployments/UMSJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=UMSJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource')
  cmo.createQueue('OraSDPM/Queues/OraSDPMEngineCmdQ_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/Queues/OraSDPM/Queues/OraSDPMEngineCmdQ_auto_'+ServerNumber+'/')
  cmo.setJNDIName('OraSDPM/Queues/OraSDPMEngineCmdQ_auto_'+ServerNumber)
  cmo.setSubDeploymentName('UMSJMSServer_'+ServerNumber)
  cd('/SystemResources/UMSJMSSystemResource/SubDeployments/UMSJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=UMSJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource')
  cmo.createQueue('OraSDPM/Queues/OraSDPMEngineRcvQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/Queues/OraSDPM/Queues/OraSDPMEngineRcvQ1_auto_'+ServerNumber+'/')
  cmo.setJNDIName('OraSDPM/Queues/OraSDPMEngineRcvQ1_auto_'+ServerNumber)
  cmo.setSubDeploymentName('UMSJMSServer_'+ServerNumber)
  cd('/SystemResources/UMSJMSSystemResource/SubDeployments/UMSJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=UMSJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource')
  cmo.createQueue('OraSDPM/Queues/OraSDPMEngineSndQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/Queues/OraSDPM/Queues/OraSDPMEngineSndQ1_auto_'+ServerNumber+'/')
  cmo.setJNDIName('OraSDPM/Queues/OraSDPMEngineSndQ1_auto_'+ServerNumber)
  cmo.setSubDeploymentName('UMSJMSServer_'+ServerNumber)
  cd('/SystemResources/UMSJMSSystemResource/SubDeployments/UMSJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=UMSJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource')
  cmo.createQueue('OraSDPM/Queues/OraSDPMWSRcvQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/Queues/OraSDPM/Queues/OraSDPMWSRcvQ1_auto_'+ServerNumber+'/')
  cmo.setJNDIName('OraSDPM/Queues/OraSDPMWSRcvQ1_auto_'+ServerNumber)
  cmo.setSubDeploymentName('UMSJMSServer_'+ServerNumber)
  cd('/SystemResources/UMSJMSSystemResource/SubDeployments/UMSJMSServer_'+ServerNumber+'/')
  set('Targets',jarray.array([ObjectName('com.bea:Name=UMSJMSServer_auto_'+ServerNumber+',Type=JMSServer')], ObjectName))

  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMAppDefRcvQ1_auto')
  cmo.createDistributedQueueMember('OraSDPM/Queues/OraSDPMAppDefRcvQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMAppDefRcvQ1_auto/DistributedQueueMembers/OraSDPM/Queues/OraSDPMAppDefRcvQ1_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMDriverDefSndQ1_auto')
  cmo.createDistributedQueueMember('OraSDPM/Queues/OraSDPMDriverDefSndQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMDriverDefSndQ1_auto/DistributedQueueMembers/OraSDPM/Queues/OraSDPMDriverDefSndQ1_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMEngineCmdQ_auto')
  cmo.createDistributedQueueMember('OraSDPM/Queues/OraSDPMEngineCmdQ_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMEngineCmdQ_auto/DistributedQueueMembers/OraSDPM/Queues/OraSDPMEngineCmdQ_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMEngineRcvQ1_auto')
  cmo.createDistributedQueueMember('OraSDPM/Queues/OraSDPMEngineRcvQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMEngineRcvQ1_auto/DistributedQueueMembers/OraSDPM/Queues/OraSDPMEngineRcvQ1_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMEngineSndQ1_auto')
  cmo.createDistributedQueueMember('OraSDPM/Queues/OraSDPMEngineSndQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMEngineSndQ1_auto/DistributedQueueMembers/OraSDPM/Queues/OraSDPMEngineSndQ1_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMWSRcvQ1_auto')
  cmo.createDistributedQueueMember('OraSDPM/Queues/OraSDPMWSRcvQ1_auto_'+ServerNumber)
  cd('/JMSSystemResources/UMSJMSSystemResource/JMSResource/UMSJMSSystemResource/DistributedQueues/dist_OraSDPM/Queues/OraSDPMWSRcvQ1_auto/DistributedQueueMembers/OraSDPM/Queues/OraSDPMWSRcvQ1_auto_'+ServerNumber+'/')
  cmo.setWeight(1)
  activate()
  i=i+1;
  j=j+1;
  k=k+1;
  l=l+1;
  
#Creating new SAF Agents
def createNewSAFAgents():
 domainConfig();
 SAFAgentsNames = configProps.get('SAFAgentsNames');
 SAFAgentsNameList = String(SAFAgentsNames).split(",");
 i=0;
 j=0;
 k=0;
 while i<len(ServerNumberList) and j<len(SAFAgentsNameList) and k<len(ServerNameList):
  edit();
  startEdit();
  ServerNumber = ServerNumberList[i]
  SAFAgentName = SAFAgentsNameList[j]
  ServerName = ServerNameList[k]
  cd('/')
  cmo.createSAFAgent(SAFAgentName)
  cd('/SAFAgents/'+SAFAgentName+'/')
  cmo.setStore(getMBean('/FileStores/AIADataStore_'+ServerNumber))
  set('Targets',jarray.array([ObjectName('com.bea:Name='+ServerName+',Type=Server')], ObjectName))
  cmo.setServiceType('Sending-only')
  activate();
  i=i+1;
  j=j+1;
  k=k+1;

  
#Setting Cluster Address
def setClusterAddress():
 ClusterAddress = configProps.get('ClusterAddress');
 domainConfig();
 edit();
 startEdit()
 cd('/Clusters/'+clusterName+'/')
 cmo.setClusterAddress(ClusterAddress)
 activate()
domainName=cmo.getName();
serverList = cmo.getServers();
#Setting Log Rotation
def __changeLogRotationConfigProperties():
 domainConfig();
 RotationType = configProps.get('RotationType')
 RotationTime = configProps.get('RotationTime')
 FileTimeSpan = int(configProps.get('FileTimeSpan'))
 i = 0;
 edit();
 while i<len(serverList):
  startEdit();
  serverName = serverList[i].getName();
  cd('/Servers/'+serverName+'/WebServer/'+serverName+'/WebServerLog/'+serverName+'/')
  print 'Changing   '+serverName+' Log Rotation Parameters --> ' 
  cmo.setRotationType(RotationType)
  cmo.setRotateLogOnStartup(true)
  cmo.setRotationTime(RotationTime)
  cmo.setFileTimeSpan(FileTimeSpan)
  cd('/Servers/'+serverName+'/Log/'+serverName+'/')
  cmo.setRotationType(RotationType)
  cmo.setRotationTime(RotationTime)
  cmo.setFileTimeSpan(FileTimeSpan)
  i = i+1;
  activate();

#Setting MaxMessageSize
def __tuneMaxMessageSizeConfigProperties():
 domainConfig();
 MaxMessageSize = int(configProps.get('MaxMessageSize'))
 i = 0;
 edit();
 while i<len(serverList):
  startEdit();
  serverName = serverList[i].getName();
  cd('/Servers/'+serverName+'/')
  print 'Current   '+serverName+' MaxMessageSize Value --> ' 
  print cmo.getMaxMessageSize()
  cmo.setMaxMessageSize(int(MaxMessageSize))
  print 'Final   '+serverName+' MaxMessageSize Value --> '
  print cmo.getMaxMessageSize()
  i = i+1;
  activate();

  
# MAIN

#****************************************************************************

#

# Calling all the Methods here

print(' ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————')
print ('********************************************* Starting the changes *****************************************************')
print('#########################################################################################################################')
print 'Do you want to add managed servers and related resources'
input = raw_input("Press y to PROCEED or press n to SKIP ===================================================>                          ");
if input == 'y':
 createManagedServersandResources()

print 'Do you want to create new SAF Agents.Do not execute for AABC domains'
input = raw_input("Press y to PROCEED or press n to SKIP ===================================================>                          ");
if input == 'y':
 createNewSAFAgents() 
print 'Do you want to set Cluster Address'
input = raw_input("Press y to PROCEED or press n to SKIP ===================================================>                          ");
if input == 'y':
 setClusterAddress()

print 'Do you want to change Log Rotation Configuration'
input = raw_input("Press y to PROCEED or press n to SKIP ===================================================>                          ");
if input == 'y':
 __changeLogRotationConfigProperties() 
print 'Do you want to tune MaxMessageSizeConfig'
input = raw_input("Press y to PROCEED or press n to SKIP ===================================================>                          ");
if input == 'y':
 __tuneMaxMessageSizeConfigProperties()  

#!/bin/bash

# ************* Setting the Environment ***********************
echo "Setting the Environment"
source /app/oracle/fmw/wlserver_10.3/server/bin/setWLSEnv.sh

echo "Environment has been set....."

# ************* Changing the directory***********************
cd .

echo "Calling the script....."

# ************* Calling the WLST script  *****************
java weblogic.WLST AddManagedServerToDomain.py

8 comments:

rohit said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
appvn

Wave Shop Delivery said...


Best Article buy Pain Pills online Excellent post. I appreciate this site. Stick with it! Because the admin of this web page is working, no doubt very quickly it will be well-known, due to its quality contents.This website was how do you say it? Relevant!! Finally, I’ve found something that helped me.
Best Article buy Roxicodone online Excellent post
buy Xanax online
buy Oxycodone online

Best Article buy Pain Medications online Excellent post. I appreciate this site. Stick with it! Because the admin of this web page is working, no doubt very quickly it will be well-known, due to its quality contents.This website was how do you say it? Relevant!! Finally, I’ve found something that helped me.

buy Research Chemicals online

buy Roxicodone online

buy Cbd Isolate online

alez said...

Thanks a lot for sharing
Having good health is what most people out there wants but can not achieve. some people takes buy ibogaine online AND buy weed online to get it.

Unknown said...

medical care is what many people lack in the interior areas of the world. people face a lot of health issues everyday without solution. buy psychedelics online, Buy weed online, Buy fantanyl patches online

web hostg said...


lovely site get you purest research chemicals online and pills at cheap and in a 48 hours delivery time maximum
buy pills online
buy fentanyl powder online
buy scopolamine powder online

Unknown said...

Buy moonrock online
Buy fantanyl patches online
buy cocaine online
Bolivian Cocaine
Colombian Cocaine
Heroin
Mexican Cocaine
Buy moonrock online
Buy fantanyl patches online
buy cocaine online
Bolivian Cocaine
Colombian Cocaine
Heroin
Mexican Cocaine

Unknown said...

Afghan Kush
AK-47
buy weed online
AK-47 dank vape
painkiller
cocaine
Amnesia Haze
buy weed online
Afghan Kush
legit online dispensary shipping worldwide
buy weed online
painkiller
buy weed online
cocaine
Amnesia Haze

web host g said...

buy weed online
buy weed online
stop addiction
buy mango kush online
Amnesia Haze

Post a Comment

 
Blogger Profile