- Configure Security Realm
- Create Users & Groups for Partition domain
- Configure Virtual Target
- Creating Partition Domain
def create_Partition(vtName, partitionName, rgName, realmName): """ This function programmed for creating partition in WebLogic domain it takes four arguments virtual target, Partition Name, Resource Group and Security Realm Name. """ vt = cmo.lookupVirtualTarget(vtName) p = cmo.createPartition(partitionName) p.addAvailableTarget(vt) p.addDefaultTarget(vt) rg=p.createResourceGroup(rgName) rg.addTarget(vt) realm = cmo.getSecurityConfiguration().lookupRealm(realmName) p.setRealm(realm) def main(): connect("weblogic","welcome1","t3://192.168.33.100:6100") edit() startEdit() create_Partition("Online_vt","Online_partition","Online_rg",'Online_Realm') create_Partition("Corporate_vt","Corporate_partition","Corporate_rg",'Corporate_Realm') save() activate() disconnect() main()
creating partition requires partition name, there should be resource group which can be created with default or you can have your own template for resource group. The resources could be JMS, JDBC Data source, JCA, JTA
WLST Script for create partition on WebLogic domain |
admin console output
Partition successful execution of WLST |
No comments:
Post a Comment
Please write your comment here