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:
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:
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 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.
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.
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.
To create a new resource group at the partition or global scope:
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.
Create a new resource group.
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.
The following example:
Creates a domain partition.
Creates a virtual target.
Sets the host name and URI prefix for the virtual target.
Adds the virtual target as an available target in the partition.
Creates the resource group.
Adds the virtual target to the resource group.
Activates the changes.
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)
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."
This section describes how to configure resource groups.
This section includes the following tasks:
To view and define general resource group settings:
Select the resource group you want to configure.
View and define general configuration settings for the resource group, such as:
Name
Scope
Resource Group Template
Save your changes.
These tasks are described in "Configure resource groups general settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.
To view and define resource group deployment settings:
Select the resource group you want to configure.
You can take the following deployment actions:
Deploy
Redeploy
Undeploy
Fetch deployment plan
Add Override
Remove override
Start
Stop
Save your changes.
These tasks are described in "Configure resource group deployment settings" in Administering Oracle WebLogic Server with Fusion Middleware Control.
Deploying an application makes its physical file or directory known to WebLogic Server.
To deploy an application to a resource group:
Select the resource group you want to configure.
Locate the application you want to deploy and choose whether to upload a deployment plan or create a new deployment plan.
Update the application attributes as desired. These attributes include:
Application Name
Distribution
Source Accessibility
Deploy the application.
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.
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:
Select the resource group you want to configure.
Select the application you want to redeploy.
Choose whether to upload a deployment plan or create a new deployment plan.
Update the application distribution as needed.
Optionally, edit the deployment plan to set more advanced deployment options, and save the deployment plan to your local disk.
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.
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:
Select the resource group you want to configure.
Select the application you want to undeploy from the deployed applications.
Undeploy the application.
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.
This section describes how to configure resource group services settings. The following topics are described:
To view configuration settings for the JDBC system resources that have been created in this resource group:
Select the resource group you want to configure.
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
Create or delete the system data sources as needed.
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.
This section describes how to configure resource group JMS settings.
This section includes the following tasks:
To view configuration settings for the JMS servers that have been created for this resource group:
Select the resource group you want to configure.
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
Create or delete JMS servers as needed.
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.
To view configuration settings for the store-and-forward (SAF) agents that have been created for this resource group:
Select the resource group you want to configure.
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
Create or delete SAF Agents as needed.
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.
To monitor the resource settings for a resource group:
Select the resource group you want to configure.
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
Create or delete JMS resources as needed.
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.
To configure the JMS modules for a resource group:
Select the resource group you want to configure.
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
Create or delete JMS modules as needed.
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.
To configure the messaging bridge settings for a resource group:
Select the resource group you want to configure.
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
Create or delete messaging bridges as needed.
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.
To configure the JMS bridge destination settings for a resource group:
Select the resource group you want to configure.
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
Create or delete JMS bridge destinations as needed.
Save your changes.
These tasks are described in "Configure JMS bridge destinations" in Administering Oracle WebLogic Server with Fusion Middleware Control.
To configure the path services settings for a resource group:
Select the resource group you want to configure.
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
Create or delete path services as needed.
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.
To view configuration settings for the mail sessions that have been created in this resource group:
Select the resource group you want to configure.
Navigate to Services > Mail.
The following read-only information is available for mail sessions configured in this resource group:
Name
JNDI Name
Create or delete mail sessions as needed.
Save your changes.
These tasks are described in "WebLogic Server Mail Sessions" in Administering Oracle WebLogic Server with Fusion Middleware Control.
To view configuration settings for the persistent stores that have been created in this resource group:
Select the resource group you want to configure.
Navigate to Services > Persistent Stores.
The following read-only information is available for the persistent stores configured in this resource group:
Name
Type
Create or delete persistent stores as needed.
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.
To view configuration settings for the foreign JNDI providers that have been created in this resource group:
Select the resource group you want to configure.
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
Create or delete foreign JNDI providers as needed.
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.
To view configuration settings for the diagnostic system modules that have been created in this resource group:
Select the resource group you want to configure.
Navigate to Services > Diagnostics.
The following read-only information is available for the diagnostic system modules configured in this resource group:
Name
Description
Targets
Create or delete diagnostic system modules as needed.
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.
To specify the targets for this resource group:
Select the resource group you want to configure.
Navigate to Targets.
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.
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.
To create notes for a resource group:
Select the resource group you want to configure.
Navigate to Notes.
Enter your notes.
Save your changes.
The following example:
Creates a domain partition.
Creates a virtual target.
Sets the host name and URI prefix for the virtual target.
Adds the virtual target as an available target in the partition.
Creates the resource group.
Adds the virtual target to the resource group.
Activates the changes.
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.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
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."
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.
Select the resource group you want to delete.
Navigate to Control > Stop. You should generally choose to stop the resource group when work completes.
Stop the resource group.
Delete the resource group.
The following example:
Creates a domain partition.
Creates a virtual target.
Sets the host name and URI prefix for the virtual target.
Adds the virtual target as an available target in the partition.
Creates the resource group.
Adds the virtual target to the resource group.
Unsets the resource group.
Deletes the resource group.
Creates a different resource group.
Adds the virtual target to that resource group.
Activates the changes.
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)
To control a resource group:
Select the resource group you want to configure.
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.
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
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/>
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:
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.
In the Resource Groups table, select the resource group you want to configure.
Navigate to Migrate.
Choose a new target for the virtual target associated with the resource group. You can choose a single Managed Server or a single cluster.
Save your changes.
The following example:
Creates a domain partition.
Creates a virtual target.
Sets the host name and URI prefix for the virtual target.
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.)
Adds the virtual target as an available target in the partition.
Creates the resource group.
Adds the virtual target to the resource group.
Activates the changes.
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.Removes the Administration Server as a target.
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()
See the following sections for additional information related to resource groups: