- startPartitionWait
- forceShutdownPartitionWait
Starts the given partition and waits until the partition reaches the requested state that is RUNNING state. To run this command the partition must already exist. Therefore startPartitionWait should not be used in the edit session.
The forceShutdownPartitionWait command will Shutdown the given partition and waits until the partition state reaches the SHUTDOWN state. Same rule works for this command as well, the partition must be exists to control it.
Prerequisites:
Prerequisites:
Here I've prepared the customized script for stop, start and restart all the partitions in the domain.
# This script will start the partition def startPartition(partitionName): print "Staring the partition :"+ partitionName partitionBean=cmo.lookupPartition(partitionName) startPartitionWait(partitionBean) def startAllPartitions(): print "Starting all partitions ..." startPartition('Corporate_partition') startPartition('Online_partition') def stopPartition(partitionName): print "Stoping the partition :"+ partitionName partitionBean=cmo.lookupPartition(partitionName) forceShutdownPartitionWait(partitionBean) def stopAllPartitions(): print "Starting all partitions ..." stopPartition('Corporate_partition') stopPartition('Online_partition') def main(): connect("weblogic","welcome1","t3://192.168.33.100:6100") print "Partition Control Menu..." print "===========================" print "1. Start all partitions" print "2. Shutdown all partitions" print "3. Restart all partitions" control=input("Enter your control choice: ") if control==1: startAllPartitions() elif control==2: stopAllPartitions() elif control==3: stopAllPartitions() startAllPartitions() else: print "invalid option..." disconnect() main()The execution goes as shown below...
No comments:
Post a Comment
Please write your comment here