9 Configuring Resource Groups

This chapter describes how to configure resource groups. The chapter refers to the Fusion Middleware and WebLogic Server documentation sets and online help for additional information as appropriate.

This chapter includes the following sections:

Configuring Resource Groups: Overview

Traditional WebLogic Server domains may contain many types of deployable resources: applications, JMS servers and queues, data sources, and such. In this traditional model, if an application suite contains multiple applications and various resources that support those applications, the administrator defines these resources and deploys these applications individually rather than as a coherent unit.

Resource groups gather together applications and the resources they use into a distinct administrative unit within the domain. Typically the resources in a given resource group are related in some way. For example, they make up a single application suite.

The resources and applications have all the information needed to start or connect to those resources, including credentials for connecting to a data source and targeting information for applications. Applications deployed to a resource group should be ready to be started.

You can create a resource group in two ways:

  • Create a new resource group. This creates the basic structure for the resource group. You must then edit this resource group as needed.

  • Create the new resource group based on a resource group template. (For information on resource group templates, see Configuring Resource Group Templates.) The configuration is copied from the template to the new resource group. You must then edit and override values from the resource group template as needed.

This section describes the following topics:

What is in a Resource Group?

Resource groups are based on the ResourceGroupMBean and can include the following resources:

  • General (name, scope, whether based on a resource group template)

  • Deployments

  • Services

    • JDBC

    • Messaging

    • Mail sessions

    • Persistent stores

    • Foreign JNDI providers

    • OSGi frameworks

    • Diagnostics

  • Targets

  • Monitoring features (JDBC, Messaging)

  • Control features (JDBC, Messaging, migrate)

  • Notes

Resource Groups and Overrides

Resource overriding allows you to customize resources at the partition level. You can override resource settings that are derived from a resource group template. 

There are two principal types of overrides:

  • You can override resource settings for certain resources using resource override configuration MBeans and resource deployment plans.

  • You can override the default application configuration for applications and modules defined to the resource group template by specifying a different deployment plan. The application or module is then redeployed using the new deployment plan for its application configuration.

For a complete description of resource overrides, see Configuring Resource Overrides. For information on application overrides, see Deploying Applications to Partition Resource Groups.

Resource Groups in Global Scope and Partitions

You can create resource groups at the domain level, or specific to a domain partition. If you create the resource group at the domain level, it has a global scope, which is the equivalent of the domain level in a non-partitioned environment. Applications or classes running at the domain level are available across the domain but are not available in partitions.

If you create the resource group at the partition level, it is scoped only to that partition. Applications or classes running at the partition level are available to the partition, but are not available at the domain level or in other partitions.

Targeting a Resource Group to More Than One Target

You can configure a resource group to have more than one virtual target. For example, you might target a resource group to virtual targets for Cluster1, Cluster2, and Cluster3 so that the applications in the resource group run on all three clusters.

However, there are two notable restrictions:

  • Some resource group configurations may have target-specific resources that do not apply across multiple targets. These resources include but are not limited to:

    • JMSServer

    • MessagingBridge

    • PathService

    • JMSBridgeDestination

    • FileStore

    • JDBCStore

    • JMSSystemResource

    If you try to target a resource group to multiple virtual targets and any of these resources are present, WebLogic Server MT generates an error.

  • You cannot target a resource group to more than one virtual target if the virtual targets target the same physical server.

    For example, if resource group RG targets VT1 and VT2, and both VT1 and VT2 target Server1, WebLogic Server MT generates an error.

Creating Resource Groups: Main Steps and Examples

To create a new resource group at the partition or global scope:

  1. Navigate to the partition or the domain level, as needed.

    Note the following navigational differences:

    • If you are using Fusion Middleware Control, you can navigate to WebLogic Domain > Environment > Resource Groups and create a resource group at either the partition level or domain level.

    • If you are using the WebLogic Server Administration Console, navigate to WebLogic Domain > Environment > Resource Groups to create a resource group at the domain level.

      Navigate to WebLogic Domain > Domain Partitions > Partition > Resource Groups to create a resource group at the partition level.

  2. Create a new resource group.

  3. You can define the following configuration settings for your new resource group:

    • Enter a name for the new resource group

    • Select either partition level or domain level.

    • Optionally, select a resource group template to use for this new resource group

    • Select the targets for this new resource group.

    • Enter notes for the new resource group

These tasks are described in "Create resource groups" in Administering Oracle WebLogic Server with Fusion Middleware Control.

If you did not create the resource group from a resource group template, the initial resource group configuration is a basic skeleton and you must configure it before you can use it. You perform most of the configuration required for a partition when you configure the resource group or resource group overrides. The tasks include configuring JDBC system data sources, JMS servers and resources, foreign JNDI providers, and so forth.

For more information, see Configuring resource groups: Main Steps and Examples.

Creating Resource Groups: WLST Example

The following example:

  1. Creates a domain partition.

  2. Creates a virtual target.

  3. Sets the host name and URI prefix for the virtual target.

  4. Adds the virtual target as an available target in the partition.

  5. Creates the resource group.

  6. Adds the virtual target to the resource group.

  7. Activates the changes.

  8. Starts the partition.

    Note:

    If this is the first partition created in production mode, you must restart the Administration Server before you can start the partition.
# Create Pep partition and ResourceGroup
edit()
startEdit()
wls:/base_domain/edit/ !> domain=getMBean('/')
wls:/base_domain/edit/ !> peppart=domain.createPartition('Pep')
wls:/base_domain/edit/ !> vt=domain.createVirtualTarget('TestVT')
wls:/base_domain/edit/ !> vt.setHostNames(jarray.array([String('localhost')],String))
wls:/base_domain/edit/ !> vt.setUriPrefix('/foo')
wls:/base_domain/edit/ !> peppart.addAvailableTarget(vt)
wls:/base_domain/edit/ !> peprg=peppart.createResourceGroup('TestRG')
wls:/base_domain/edit/ !> peprg.addTarget(vt)
wls:/base_domain/edit/ !> activate()
wls:/base_domain/edit/ !> startPartitionWait(peppart) 

Creating Resource Groups: REST Example

For an example of creating resource groups using REST, see "Creating Partitions" in Administering Oracle WebLogic Server with RESTful Management Services.

In particular, see the section "Create a resource group for the new partition."

Configuring resource groups: Main Steps and Examples

This section describes how to configure resource groups.

This section includes the following tasks:

Configure Resource Group General Settings

To view and define general resource group settings:

  1. Select the resource group you want to configure.

  2. View and define general configuration settings for the resource group, such as:

    • Name

    • Scope

    • Resource Group Template

  3. Save your changes.

These tasks are described in "Configure resource groups general settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Configure Resource Group Deployment Settings

To view and define resource group deployment settings:

  1. Select the resource group you want to configure.

  2. You can take the following deployment actions:

    • Deploy

    • Redeploy

    • Undeploy

    • Fetch deployment plan

    • Add Override

    • Remove override

    • Start

    • Stop

  3. Save your changes.

These tasks are described in "Configure resource group deployment settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Deploy Applications to a Resource Group

Deploying an application makes its physical file or directory known to WebLogic Server.

To deploy an application to a resource group:

  1. Select the resource group you want to configure.

  2. Locate the application you want to deploy and choose whether to upload a deployment plan or create a new deployment plan.

  3. Update the application attributes as desired. These attributes include:

    • Application Name

    • Distribution

    • Source Accessibility

  4. Deploy the application.

  5. Update the deployment settings or complete deployment of this application.

These tasks are described in "Deploy applications to a resource group" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Redeploy Applications to a Resource Group

Redeploying an application redeploys the archive file or exploded directory. Redeploy an application if you have made changes to it and want to make the changes available to WebLogic Server clients.

To redeploy an application or module to a resource group:

  1. Select the resource group you want to configure.

  2. Select the application you want to redeploy.

  3. Choose whether to upload a deployment plan or create a new deployment plan.

  4. Update the application distribution as needed.

  5. Optionally, edit the deployment plan to set more advanced deployment options, and save the deployment plan to your local disk.

  6. Redeploy the application to complete redeployment of this application.

These tasks are described in "Redeploy applications to a resource group" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Undeploy Applications From a Resource Group

Undeploying an application removes it from every target of the domain to which the application is deployed. Once you undeploy an application from the domain, you must deploy it again if you want to make it available to WebLogic Server clients. To temporarily make applications unavailable to WebLogic Server clients, you can stop them instead of undeploying them.

To undeploy an application from a partition resource group:

  1. Select the resource group you want to configure.

  2. Select the application you want to undeploy from the deployed applications.

  3. Undeploy the application.

  4. If you later want to deploy the removed application, see Deploy Applications to a Resource Group.

These tasks are described in "Undeploy applications from a resource group" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Configure Resource Group Services Settings

This section describes how to configure resource group services settings. The following topics are described:

Configure Resource Group JDBC Settings

To view configuration settings for the JDBC system resources that have been created in this resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > JDBC.

    The read-only JDBC information for a resource group includes:

    • Name

    • JNDI Name

    • Type

    • Targets

    • Algorithm Type

    • Row Prefetch Enabled

    • Row Prefetch Size

    • S team Chunk Size

  3. Create or delete the system data sources as needed.

  4. Save your changes.

These tasks are described in "Configure resource group JDBC Settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring the JDBC system data sources that have been created in this resource group, see Configuring JDBC.

Configure Resource Group JMS settings

This section describes how to configure resource group JMS settings.

This section includes the following tasks:

Configure JMS Server Settings

To view configuration settings for the JMS servers that have been created for this resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Messaging > JMS Servers.

    The following read-only information is available for JMS servers already configured in this resource group:

    • Name

    • Health

    • Health Reason

    • Persistent Store

    • Temporary Template Name

    • Bytes Maximum

    • Messages Maximum

    • Bytes Threshold High

    • Bytes Threshold Low

    • Messages Threshold High

  3. Create or delete JMS servers as needed.

  4. Save your changes.

These tasks are described in "Configure JMS Server Settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring the JMS servers that have been configured in this resource group, see Configuring JMS Servers.

Configure SAF Agent Settings

To view configuration settings for the store-and-forward (SAF) agents that have been created for this resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Messaging > SAF Agents.

    The following read-only information is available for the SAF agents configured in this resource group:

    • Name

    • Agent Type

    • Persistent Store

  3. Create or delete SAF Agents as needed.

  4. Save your changes.

These tasks are described in "Configure SAF Agent Settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring the store-and-forward agents that have been configured in this resource group, see Configuring Store-and-Forward (SAF) Agents.

Configure JMS Resource Settings

To monitor the resource settings for a resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Messaging > JMS Resources.

    The following read-only information is available for the JMS resources configured in this resource group:

    • Name

    • Type

    • JMS Module Name

    • JNDI Name

    • Subdeployment

  3. Create or delete JMS resources as needed.

  4. Save your changes.

These tasks are described in "Configure SAF Agent Settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring existing JMS resources, see Configuring JMS System Resources and Application Scoped JMS Modules.

Configure JMS Module Settings

To configure the JMS modules for a resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Messaging > JMS Modules > JMS Modules.

    The following read-only information is available for the JMS modules configured in this resource group:

    • Name

    • Queues

    • Topics

    • Connection Factories

    • Distributed Queues

    • Distributed Topics

    • Foreign Servers

    • Quotas

    • SAF Error Handlers

    • SAF Imported Destinations

    • SAF Remote Contexts

    • Templates

    • Uniform Distributed Queues

    • Uniform Distributed Topics

    • Destination Keys

    • Type

  3. Create or delete JMS modules as needed.

  4. Save your changes.

These tasks are described in "Configure JMS module settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring existing JMS modules, see Configuring Messaging Components.

Configure Messaging Bridges

To configure the messaging bridge settings for a resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Messaging > Messaging Bridges.

    The following read-only information is available for the messaging bridges configured in this resource group:

    • Name

    • Source Bridge Destination

    • Target Bridge Destination

  3. Create or delete messaging bridges as needed.

  4. Save your changes.

These tasks are described in "Configure messaging bridges" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring the messaging bridges that have been configured in this resource group, see Configuring Messaging Bridges.

Configure JMS Bridge Destinations

To configure the JMS bridge destination settings for a resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Messaging > Bridge Destinations.

    The following read-only information is available for the JMS bridge destinations configured in this resource group:

    • Name

    • Adapter JNDI Name

  3. Create or delete JMS bridge destinations as needed.

  4. Save your changes.

These tasks are described in "Configure JMS bridge destinations" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Configure Path Services

To configure the path services settings for a resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Messaging > Path Services.

    The following read-only information is available for the path services configured in this resource group:

    • Name

    • Persistent Store

  3. Create or delete path services as needed.

  4. Save your changes.

These tasks are described in "Configure path services" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring existing path services, see Configuring Path Services to Support Using Unit-of-Order with Distributed Destinations.

Configure Resource Group Mail Session Settings

To view configuration settings for the mail sessions that have been created in this resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Mail.

    The following read-only information is available for mail sessions configured in this resource group:

    • Name

    • JNDI Name

  3. Create or delete mail sessions as needed.

  4. Save your changes.

These tasks are described in "WebLogic Server Mail Sessions" in Administering Oracle WebLogic Server with Fusion Middleware Control.

Configure Resource Group Persistent Store Settings

To view configuration settings for the persistent stores that have been created in this resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Persistent Stores.

    The following read-only information is available for the persistent stores configured in this resource group:

    • Name

    • Type

  3. Create or delete persistent stores as needed.

  4. Save your changes.

These tasks are described in "WebLogic Server Persistent Stores" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring existing persistent stores, see Configuring JDBC or File Persistent Stores.

Configure Resource Group Foreign JNDI Provider Settings

To view configuration settings for the foreign JNDI providers that have been created in this resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Foreign JNDI Providers.

    The following read-only information is available for the foreign JNDI providers configured in this resource group:

    • Name

    • Initial Context Factory

    • Provider URL

    • User

    • Targets

  3. Create or delete foreign JNDI providers as needed.

  4. Save your changes.

These tasks are described in "WebLogic Server Foreign JNDI Providers" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring existing foreign JNDI providers, see Configuring and Programming JNDI.

Configure Resource Group Diagnostic System Module Settings

To view configuration settings for the diagnostic system modules that have been created in this resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Services > Diagnostics.

    The following read-only information is available for the diagnostic system modules configured in this resource group:

    • Name

    • Description

    • Targets

  3. Create or delete diagnostic system modules as needed.

  4. Save your changes.

These tasks are described in "WebLogic Server Diagnostics" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring existing diagnostic system modules, see Monitoring and Debugging Partitions.

Configure Resource Groups Targets

To specify the targets for this resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Targets.

  3. Specify one or more virtual targets to which this resource group is targeted.

    For important considerations when targeting a resource group to more than one virtual target, see Targeting a Resource Group to More Than One Target.

    A virtual target can be used by many resource groups within a partition, or by many resource groups at the domain level.

  4. Save your changes.

These tasks are described in "Configure virtual targets" in Administering Oracle WebLogic Server with Fusion Middleware Control.

For information on configuring the actual virtual target, see Configuring Virtual Targets.

Configure Resource Group Notes

To create notes for a resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Notes.

  3. Enter your notes.

  4. Save your changes.

Configuring Resource Groups: WLST Example

The following example:

  1. Creates a domain partition.

  2. Creates a virtual target.

  3. Sets the host name and URI prefix for the virtual target.

  4. Adds the virtual target as an available target in the partition.

  5. Creates the resource group.

  6. Adds the virtual target to the resource group.

  7. Activates the changes.

  8. Starts the partition.

    Note:

    If this is the first partition created in production mode, you must restart the Administration Server before you can start the partition.
  9. Deploys the application MySimpleEjb to the resource group.

# Create Pep partition and ResourceGroup
edit()
startEdit()
wls:/base_domain/edit/ !> domain=getMBean('/')
wls:/base_domain/edit/ !> peppart=domain.createPartition('Pep')
wls:/base_domain/edit/ !> vt=domain.createVirtualTarget('TestVT')
wls:/base_domain/edit/ !> vt.setHostNames(jarray.array([String('localhost')],String))
wls:/base_domain/edit/ !> vt.setUriPrefix('/foo')
wls:/base_domain/edit/ !> peppart.addAvailableTarget(vt)
wls:/base_domain/edit/ !> peprg=peppart.createResourceGroup('TestRG')
wls:/base_domain/edit/ !> peprg.addTarget(vt)
wls:/base_domain/edit/ !> activate()
 
wls:/base_domain/edit/ !> startPartitionWait(peppart)

wls:/base_domain/edit/ !> deploy(appName='MySimpleEjb', path='c:/webservices/MySimpleEjb.jar', partition='Pep', resourceGroup='TestRG',
deploymentOrder=10,securityModel='DDOnly')
:
Completed the deployment of Application with status completed
Current Status of your Deployment:
Deployment command type: deploy
Deployment State : completed
Deployment Message : no message

Configuring Resource Groups: REST Example

For an example of configuring resource groups using REST, see "Creating Partitions" in Administering Oracle WebLogic Server with RESTful Management Services.

In particular, see the sections "View the new partition's resource groups" and "Demonstrate a partition deployer configuring system resources."

Deleting a Resource Group: Main Steps and WLST Example

You must first stop a resource group before you can delete it. Stopping the resource group causes applications and resources in the resource group to cease operating and to be removed from memory.

  1. Select the resource group you want to delete.

  2. Navigate to Control > Stop. You should generally choose to stop the resource group when work completes.

  3. Stop the resource group.

  4. Delete the resource group.

Deleting Resource Groups: WLST Example

The following example:

  1. Creates a domain partition.

  2. Creates a virtual target.

  3. Sets the host name and URI prefix for the virtual target.

  4. Adds the virtual target as an available target in the partition.

  5. Creates the resource group.

  6. Adds the virtual target to the resource group.

  7. Unsets the resource group.

  8. Deletes the resource group.

  9. Creates a different resource group.

  10. Adds the virtual target to that resource group.

  11. Activates the changes.

  12. Starts the partition.

    Note:

    If this is the first partition created in production mode, you must restart the Administration Server before you can start the partition.
# Create Pep partition and Resource Group. Remove Resouce Group
edit()
startEdit()
wls:/base_domain/edit/ !> domain=getMBean('/')
wls:/base_domain/edit/ !> peppart=domain.createPartition('Pep')
wls:/base_domain/edit/ !> vt=domain.createVirtualTarget('TestVT')
wls:/base_domain/edit/ !> vt.setHostNames(jarray.array([String('localhost')],String))
wls:/base_domain/edit/ !> vt.setUriPrefix('/foo')
wls:/base_domain/edit/ !> peppart.addAvailableTarget(vt)
wls:/base_domain/edit/ !> peprg=peppart.createResourceGroup('TestRG')
wls:/base_domain/edit/ !> peprg.addTarget(vt)
wls:/base_domain/edit/ !> peppart.unSet('ResourceGroups')
wls:/base_domain/edit/ !> peprg=peppart.destroyResourceGroup(peprg)
wls:/base_domain/edit/ !> peprg=peppart.createResourceGroup('TestRG2')
wls:/base_domain/edit/ !> peprg.addTarget(vt)
wls:/base_domain/edit/ !> activate()
wls:/base_domain/edit/ !> startPartitionWait(peppart) 

Controlling a Resource Group: Main Steps and WLST Example

To control a resource group:

  1. Select the resource group you want to configure.

  2. Navigate to Control.

    You can perform the following actions:

    • Start—causes application deployments and resources that are not currently running to become active.

    • Stop—causes applications and resources in the resource group to cease operating and to be removed from memory. It is the runtime equivalent to undeploying the application or resource, except that the configuration for the application or resource is not removed from config.xml as it would be in a true undeployment.

Controlling Resource Groups: WLST Example

Stopping a Resource Group

The following example builds on the WLST example shown in Creating Resource Groups: WLST Example. It shows navigation to the ResourceGroupLifeCycleRuntime MBean and stops the resource group TestRG.

wls:/base_domain/serverConfig/> domainRuntime()
wls:/base_domain/domainRuntime/> domain=cmo
wls:/base_domain/domainRuntime/> partrun = cmo.lookupDomainPartitionRuntime('Pep')
wls:/base_domain/domainRuntime/> partliferun = partrun.getPartitionLifeCycleRuntime()
wls:/base_domain/domainRuntime/> rgliferun = partliferun.lookupResourceGroupLifeCycleRuntime('TestRG')
wls:/base_domain/domainRuntime/> rgliferun.shutdown()
[MBeanServerInvocationHandler]com.bea:Name=_2_SHUTDOWN,Type=ResourceGroupLifeCyc
leTaskRuntime,DomainPartitionRuntime=Pep,ResourceGroupLifeCycleRuntime=TestRG,Pa
rtitionLifeCycleRuntime=Pep

Starting a Resource Group

The following example builds on the WLST example shown in Creating Resource Groups: WLST Example. It shows navigation to the ResourceGroupLifeCycleRuntime MBean and starts the resource group TestRG.

wls:/base_domain/serverConfig/> domainRuntime()
wls:/base_domain/domainRuntime/> domain=cmo
wls:/base_domain/domainRuntime/> partrun = cmo.lookupDomainPartitionRuntime('Pep')
wls:/base_domain/domainRuntime/> partliferun = partrun.getPartitionLifeCycleRuntime()
wls:/base_domain/domainRuntime/> rgliferun = partliferun.lookupResourceGroupLifeCycleRuntime('TestRG')
wls:/base_domain/domainRuntime/> rgliferun.start()
[MBeanServerInvocationHandler]com.bea:Name=_4_START,Type=ResourceGroupLifeCycleT
askRuntime,DomainPartitionRuntime=Pep,ResourceGroupLifeCycleRuntime=TestRG,Parti
tionLifeCycleRuntime=Pep
wls:/base_domain/domainRuntime/>

Migrating a Resource Group: Main Steps and WLST Example

When you migrate a resource group, you change the virtual target used by the resource group from one physical target (cluster/server) to another. After migration, the virtual target will point to the new physical target (cluster/server).

Note that this change affects any partition-level or domain-level resource group that uses this virtual target.

To use Fusion Middleware Control to migrate a resource group:

  1. From the WebLogic Domain drop-down menu, select Environment, then select Resource Groups.

    The Resource Groups table displays information about each resource group that has been configured in the current domain.

  2. In the Resource Groups table, select the resource group you want to configure.

  3. Navigate to Migrate.

  4. Choose a new target for the virtual target associated with the resource group. You can choose a single Managed Server or a single cluster.

  5. Save your changes.

Migrating Resource Groups: WLST Example

The following example:

  1. Creates a domain partition.

  2. Creates a virtual target.

  3. Sets the host name and URI prefix for the virtual target.

  4. Targets the virtual target to the Administration Server. (You would generally not target the virtual target to the Administration Server unless you have a specific reason to do so.)

  5. Adds the virtual target as an available target in the partition.

  6. Creates the resource group.

  7. Adds the virtual target to the resource group.

  8. Activates the changes.

  9. Starts the partition.

    Note:

    If this is the first partition created in production mode, you must restart the Administration Server before you can start the partition.
  10. Removes the Administration Server as a target.

  11. Migrates (targets) the virtual target to Cluster-0.

# Create Pep partition and ResourceGroup
edit()
startEdit()
wls:/base_domain/edit/ !> domain=getMBean('/')
wls:/base_domain/edit/ !> peppart=domain.createPartition('Pep')
wls:/base_domain/edit/ !> vt=domain.createVirtualTarget('TestVT')
wls:/base_domain/edit/ !> vt.setHostNames(jarray.array([String('localhost')],String))
wls:/base_domain/edit/ !> vt.setUriPrefix('/foo')
wls:/base_domain/edit/ !> tgt=getMBean('/Servers/AdminServer')
wls:/base_domain/edit/ !> vt.addTarget(tgt)
wls:/base_domain/edit/ !> peppart.addAvailableTarget(vt)
wls:/base_domain/edit/ !> peprg=peppart.createResourceGroup('TestRG')
wls:/base_domain/edit/ !> peprg.addTarget(vt)
wls:/base_domain/edit/ !> activate()
wls:/base_domain/edit/ !> startPartitionWait(peppart)
startEdit()
wls:/base_domain/edit/ !> vt.removeTarget(tgt)
wls:/base_domain/edit/ !> tgt=getMBean('/Clusters/Cluster-0')
wls:/base_domain/edit/ !> vt.addTarget(tgt)
wls:/base_domain/edit/ !> activate()

Configuring Resource Groups: Related Tasks and Links

See the following sections for additional information related to resource groups: