Search This Blog

Oracle Fusion Middleware Administration Course

Oracle Fusion Middleware Administration Course
OFMW Admin Course

Sunday, January 17, 2016

Multitenancy in WebLogic 12c Part -4: Creating Partiton domain

Welcome back to the series of Multitenancy experiments on partitioned domain.

  1. Configure Security Realm
  2. Create Users & Groups for Partition domain
  3. Configure Virtual Target
  4. Creating Partition Domain
WebLogic domain partitions are an administrative and runtime slice of a WebLogic domain that is dedicated to running application instances and related resources for different tenant.
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 
Note: After you configure the new partitions in the domain you must restart the environment.

No comments:

Facebook Blogger Plugin: By RNHckr.com

Post a Comment

Please write your comment here

Popular Posts

Oracle WebLogic Administration Course

Oracle WebLogic Administration Course
WebLogic Training

Followers