Welcome back to the series of Multitenancy experiments with WLST.
- Configure Security Realm
- Create Users & Groups for Partition domain
- Configure Virtual Target
In this sample virtual target is targeted to the admin server, you can also target to cluster. The uri prefix is /corporate This is the url prefix used for making JMX connections to MBeanServer.
In this example you could find the re-usability of the functions easy to call them!
def create_VirtualTarget(vt_name, uriPrefix, serverName): """ This method is developed for create Virtual Targets based on three arguments Virtual Target Name, URI prefix and actual physical target """ vt = cmo.createVirtualTarget(vt_name) vt.setHostNames(array(["192.168.33.100"],java.lang.String)) vt.setUriPrefix(uriPrefix) as = cmo.lookupServer(serverName) vt.addTarget(as) def main(): connect("weblogic","welcome1","t3://192.168.33.100:6100") edit() startEdit() create_VirtualTarget("Corporate_vt", "/corporate","tr_admin") create_VirtualTarget("Online_vt", "/online","tr_admin") save() activate() disconnect() main()
Execute it with the following way!
wlst createVirtualTargets.py
Execution of WLST Script for create Virtual Targets for partition domain |
On the WebLogic Admin Console you could select the domain structure expand "Environment" branch. You can select Virtual Target on the tree.
domain Structure with Virtual Target |
Virtual Target configuration using WLST |
No comments:
Post a Comment
Please write your comment here