Configure WebLogic JMS Resources

Application Release Automation: Configuring WebLogic JMS System Resources

This section describes the configuration steps required to configure a WebLogic JMS System Resources (JMSSystemResource) when using the WebLogic plugin. This configuration is then used during deployment to create/modify the WebLogic JMSSystemResource. A domain can contain zero or more JMSSystemResources; the creation of just one JMSSystemResource is shown here but this is easily extended to multiple JMSSystemResources. The Jython variable JMSSystemResourceList is used to pass the list of zero or more JMSSystemResources to be created.

Before you begin

Open or create a new Jython environment-specific configuration file. This file will contain the configuration settings that will describe the WebLogic JMSSystemResource being created. Any change made to the JMSSystemResource properties in this file will be reflected in the JMSSystemResource created/modified by the tool.

About this task

This task creates the minimum set required for the creation of a WebLogic domain. Only one domain may be created per configuration file.

Procedure

Open the environment-specific py file and import the JMSSystemResource template. This pre-populated template is typically populated with default values or None (Jython value for null) or a pre-defined name. The pre-defined names should typically be overridden in the environment-specific py file. Where a None value exists, the tool will preserve the default value setting.

from templates.JMSSystemResourceTemplate import *

A pre-requisite is that the configuration for a Domain and an AdminServer have already been completed in the Jython file. Other pre-requisites depend on the configuration parameters used for the JMSSystemResource, such as the Server/Cluster that the resource is targeted to. Make a copy of the JMSSystemResource Template using the provided deepcopy function and assign an appropriate name to it; it can be any name of your choice. There can be multiple JMSSystemResource objects and we will show afterwards how a list of your JMSSystemResources is created.

JMSSystemResource1 = copy.deepcopy(JMSSystemResourceTemplate)

Change the required set of parameters of the JMSSystemResource template copy by accessing the parameters using Jython syntax. The parameters set will reflect the JMSSystemResource configuration that you want to create. Once the JMSSystemResource properties are set, the instance has to be added to the JMSSystemResource list so it's eligible for creation. The list is what is read by the tool.

JMSSystemResourceList = [JMSSystemResource1,]

The JMSSystemResource Template file additionally contains the template for the other Objects that are child components of the JMSSystemResource object, such as Queues, QueueConnectionFactories, DistributedQueues and so on. Each one of these may subsequently be created and added as child components; they will then get created as components of the JMSSystemResource.

Example

The example below shows the configuration required to create a new JMSSystemResource with the name JMSSystemResource1. We also show the setting of some other JMSSystemResource parameters. Open and view the JMSServer template (JMSSystemResourceTemplate.py) file for a list of all the parameters that may be set and to understand the syntax to be used to set each property.

JMSSystemResource1 = copy.deepcopy(JMSSystemResourceTemplate)
JMSSystemResource1['Name'] = 'GenericJMSResource'
JMSSystemResource1['Targets'] = [ { 'Name': 'GenericCluster', 'Type': 'Clusters', } ]
JMSSystemResource1['Targets'].append({'Name': 'StandAloneManagedServer3', 'Type': 'Servers'})
JMSSystemResource1['Targets'].append({'Name': 'StandAloneManagedServer4', 'Type': 'Servers'})
JMSSystemResource1['SubDeployments'].append({'Name': 'GenericDeploymentJMSServerTarget', 'Targets' : [ {'Name': 'GenericJMSServer', 'Type': 'JMSServers'} ] })
JMSSystemResource1['SubDeployments'].append({'Name': 'TEST_DeploymentJMSServerTarget', 'Targets' : [ {'Name': 'GenericJMSServer', 'Type': 'JMSServers', }, {'Name': 'StandAloneManagedServer2', 'Type': 'Servers', }] })

JMSSystemResourceList = [JMSSystemResource1,]