WLST script to create jms queue topic
readDomain(‘/opt/bea/wls10/user_projects/domains/my_domain’)
#setOption(‘ReplaceDuplicates’,’true’)
#setOption(‘OverwriteDomain’,’true’)
#delete(‘myJMSServer’,’JMSServer’)
#delete(‘myJMSServer1′,’JMSServer’)
#delete(‘myJMSServer2′,’Server’)
# Create a JMS Server.
#=======================================================================================
cd(‘/’)
create(‘myJMSServer’, ‘JMSServer’)
create(‘myJMSServer1′,’JMSServer’)
create(‘myJMSServer2′,’JMSServer’)
#=======================================================================================
# Create a JMS System resource.
#=======================================================================================
cd(‘/’)
create(‘myJmsSystemResource’, ‘JMSSystemResource’)
cd(‘JMSSystemResource/myJmsSystemResource/JmsResource/NO_NAME_0’)
#=======================================================================================
# Create a JMS Queue and Topic and its subdeployment.
#=======================================================================================
myCF=create(‘myConnectionFactory’,’ConnectionFactory’)
myCF.setJNDIName(‘TestConnectionFactory’)
myCF.setSubDeploymentName(‘myDISTSubDeployment’)
myq=create(‘myQueue’,’Queue’)
myq.setJNDIName(‘singleQueue’)
myq.setSubDeploymentName(‘mySubDeployment’)
myq=create(‘myTopic’,’Topic’)
myq.setJNDIName(‘singleTopic’)
myq.setSubDeploymentName(‘mySubDeployment’)
#=======================================================================================
# Create uniform distributed queue and topic
#=======================================================================================
distQ=create(‘distQName’, ‘UniformDistributedQueue’)
distQ.setJNDIName(‘TestDistributedQueue’)
distQ.setSubDeploymentName(‘myDISTSubDeployment’)
distQ=create(‘distTName’, ‘UniformDistributedTopic’)
distQ.setJNDIName(‘TestDistributeTopic’)
distQ.setSubDeploymentName(‘myDISTSubDeployment’)
cd(‘/’)
cd(‘JMSSystemResource/myJmsSystemResource’)
create(‘mySubDeployment’, ‘SubDeployment’)
create(‘myDISTSubDeployment’, ‘SubDeployment’)
#====================================================================
# Target resources to the servers.
#===================================================================
cd(‘/’)
assign(‘JMSServer’, ‘myJMSServer’, ‘Target’, ‘MS1’)
assign(‘JMSServer’, ‘myJMSServer1’, ‘Target’, ‘MS1’)
assign(‘JMSServer’, ‘myJMSServer2’, ‘Target’, ‘MS2’)
assign(‘JMSSystemResource’,’myJmsSystemResource’,’Target’,’Cluster-1′)
assign(‘JMSSystemResource.SubDeployment’,’myJmsSystemResource.mySubDeployment’, ‘Target’,’myJMSServer’)
assign(‘JMSSystemResource.SubDeployment’,’myJmsSystemResource.myDISTSubDeployment’, ‘Target’,’myJMSServer1,myJMSServer2′)
#===================================================================
# Write the domain and close the domain template.
#===================================================================
#setOption(‘OverwriteDomain’, ‘true’)
### Write Domain
updateDomain()
closeDomain()
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.