# TemplateBean

Overview | Related MBeans | Attributes | Operations

## Overview

Template beans contain default values for destination attributes. If a destination defines a template and does not explicitly set the value of an attribute, then that attribute will take its value from the defined template.

Security roles | The following roles have read, write, and invoke permission for all non-encrypted attributes and operations in this MBean: Deployer
Fully Qualified Interface Name | If you use the `getMBeanInfo` operation in MBeanTypeServiceMBean, supply the following value as this MBean's fully qualified interface name: `weblogic.j2ee.descriptor.wl.TemplateBean`
Factory Methods | Factory methods in JMSBean
Additional Access Points | In addition to accessing this MBean by invoking a factory method, you can also access this MBean from the following MBean attributes:
DeliveryParamsOverridesBean.TemplateBean DestinationBean.Template JMSBean.Templates MessageLoggingParamsBean.TemplateBean MulticastParamsBean.TemplateBean QueueBean.Template | ThresholdParamsBean.TemplateBean TopicBean.Template UniformDistributedDestinationBean.Template UniformDistributedQueueBean.Template UniformDistributedTopicBean.Template

## Related MBeans

This section describes attributes that provide access to other MBeans. For more information about the MBean hierarchy, refer to WebLogic Server MBean Data Model.

DeliveryFailureParams DeliveryParamsOverrides GroupParams MessageLoggingParams | Multicast Quota Thresholds

### DeliveryFailureParams

The parameters that control what should happen to messages when failures occur.

These parameters enable the Administrator to control error destinations, logging, and other actions that might be taken when a message cannot be delivered or when other failures are detected.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | DeliveryFailureParamsBean
Relationship type: | Containment.

### DeliveryParamsOverrides

Delivery parameter settings that override delivery parameters set by the JMS client.

These overrides, if set, will cause those specific parameters set in the JMS client to be ignored and replaced by the value set here.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | DeliveryParamsOverridesBean
Relationship type: | Containment.

### GroupParams

The group parameters for this template. When using templates, group parameters enable you to customize parameters based on the group to which the destination belongs.

Templates are a convenient way to associate common parameters amongst a large number of destinations. However, some attributes of particular destinations may need to be configured based on where the destination is targeted. For example, the error destination of a destination and the destination itself must be targeted to the same JMS server.

Group parameters allow the template user to customize parameters based on the group the destination is a member of. The value that will be used for a destination will come from the group parameter if the sub-deployment attribute has the same name as the sub-deployment the destination is a member of.

For example, imagine two queues Q1 and Q2 in subdeployments G1 and G2 respectively. Both Q1 and Q2 specify template X1 as their template. X1 has group parameters with sub-deployment attributes G1 and G2, where the error destination value for G1 is E1 and the quota value for G2 is E2. Neither Q1 nor Q2 specify their error-destination variable explicitly, so they will get their error destinations from the template. Since Q1 is a member of G1, and the template value of G1 is E1, Q1 will get the error destination E1. Likewise, Q2's error destination will eventually resolve to error destination E2. If a third destination Q3 is added in with sub-deployment G3 and the template does not have a group parameter for G3 then Q3 will get the default value for its error destination.

Factory Methods | `createGroupParams (java.lang.String subDeploymentName)` `destroyGroupParams (GroupParamsBean quota)` Factory methods do not return objects. See Using factory methods.
Lookup Operation | `lookupGroupParams(String name)` Returns a `javax.management.ObjectName` for the instance of `GroupParamsBean` named `name`.
Privileges | Read only
Type | GroupParamsBean[]
Relationship type: | Containment.

### MessageLoggingParams

Message logging parameters control message logging actions when a message life cycle change is detected.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | MessageLoggingParamsBean
Relationship type: | Containment.

### Multicast

The parameters for receiving messages using multicast rather than a connection-oriented protocol such as TCP.

Topics with certain quality of service tolerance can receive a significant performance boost by using multicast to receive messages rather than using a connection oriented protocol like TCP.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | MulticastParamsBean
Relationship type: | Containment.

### Quota

A Quota controls the allotment of system resources available to destinations. For example the number of bytes a destination is allowed to store can be configured with a QuotaBean.

Privileges | Read/Write
Type | QuotaBean
Relationship type: | Reference.

### Thresholds

A threshold is a point that must be exceeded in order to produce a given effect. These action points may cause logging, flow control, or other actions, as defined by the specific points whose values have been exceeded.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | ThresholdParamsBean
Relationship type: | Containment.

## Attributes

This section describes the following attributes:

AttachSender ConsumptionPausedAtStartup DefaultUnitOfOrder DestinationKeys InsertionPausedAtStartup MaximumMessageSize | MessagingPerformancePreference Name Notes ProductionPausedAtStartup SafExportPolicy

### AttachSender

Specifies whether messages landing on this destination should attach the credential of the sending user.

- Supports

  - The JMSXUserID property will be set with the security principal of the sending user if requested. The sender can request its identity to be attached to its messages by using a ConnectionFactory with AttachJMSXUserID="true".

- Always

  - The JMSXUserID property will always be set with the security principal of the sending user.

- Never

  - The JMSXUserID property will never be set with the security principal of the sending user.

This property is dynamically configurable. A dynamic change will only affect messages received after the update has been made.

Privileges | Read/Write
Type | java.lang.String
Default Value | supports
Legal Values | supports never always

### ConsumptionPausedAtStartup

Specifies whether consumption is paused on a destination at startup.

- default

  - If a JMS template is specified, then this value inherits the template's Consumption Paused At Startup value. If no JMS template is configured for the destination, then the Default value is equivalent to false .

- false

  - Consumption Paused is explicitly disabled for this destination.

- true

  - Consumption Paused is explicitly turned on for this destination

Privileges | Read/Write
Type | boolean

### DefaultUnitOfOrder

Specifies whether WebLogic Server creates a system-generated Unit- of-Order name that is statistically unique for a destination. Any message arriving at this destination that does not already belong to a unit-of-order is assigned this default unit-of-order name.

The initial use case is to replace the deprecated "ordered redelivery" feature.

Privileges | Read/Write
Type | boolean

### DestinationKeys

The list of potential destination keys for sorting messages that arrive on the JMS template or destination.

The keys are ordered from most significant to least significant. If more than one key is specified, a key based on the JMSMessageID can only be the last key in the list.

Note: If JMSMessageID is not defined in the key, it is implicitly assumed to be the last key and is set as "Ascending" (FIFO) for the sort order.

Privileges | Read/Write
Type | class java.lang.String[]

### InsertionPausedAtStartup

Specifies whether new message insertion is paused on a destination at startup.

- default

  - If a JMS template is specified, then this value inherits the template's Insertion Paused At Startup value. If no JMS template is configured for the destination, then the Default value is equivalent to false .

- false

  - Insertion Paused is explicitly disabled for this destination.

- true

  - Insertion Paused is explicitly turned on for this destination

Privileges | Read/Write
Type | boolean

### MaximumMessageSize

The maximum size of a message that will be accepted from producers on this destination. The message size includes the message body, any user-defined properties, and the user-defined JMS header fields: `JMSCorrelationID` and `JMSType`.

Producers sending messages that exceed the configured maximum message size for the destination receive a `ResourceAllocationException` .

The maximum message size is only enforced for the initial production of a message. Messages that are redirected to an error destination or forwarded to a member of a distributed destination are not checked for size. For instance, if a destination and its corresponding error destination are configured with a maximum message size of 128K bytes and 64K bytes, respectively, a message of 96K bytes could be redirected to the error destination (even though it exceeds the 64K byte maximum), but a producer could not directly send the 96K byte message to the error destination.

Maximum Message Size is dynamically configurable, but only incoming messages are affected; stored messages are not affected.

Privileges | Read/Write
Type | int
Default Value | 2147483647
Minimum value | 0
Maximum value | 2147483647

### MessagingPerformancePreference

Specifies the destination's peformance preference in regards to message latency or throughput. The lower the value, the more the destination will emphasize latency over throughput. Conversely, the higher the value, the more the destination will emphasize throughput over latency.

Privileges | Read/Write
Type | int
Default Value | 25
Minimum value | 0
Maximum value | 100

### Name

The name of this entity, represented in XML as a attribute

Many of the elements within the JMS module are named entities. All of the named entities encased by a type in the XML file must be unique. This is the identifier used to delineate a particular entity within the JMS module.

This attribute cannot be modified externally from the module (for example with a deployment plan) because it may be used inside the module referentially.

Privileges | Read/Write
Type | java.lang.String

### Notes

Optional information that you can include to describe this named JMS descriptor bean.

JMS module saves this note in the JMS descriptor file as XML PCDATA. All left angle brackets (<) are converted to the XML entity `&lt;`. Carriage returns/line feeds are preserved.

Note:

  If you create or edit a note from the Administration Console, the Administration Console does not preserve carriage returns/line feeds.

Privileges | Read/Write
Type | java.lang.String

### ProductionPausedAtStartup

Specifies whether new message production is paused on a destination at startup.

- default

  If a JMS template is specified, then this value inherits the template's Production Paused At Startup value. If no JMS template is configured for the destination, then the Default value is equivalent to false.

- false

  Production Paused is explicitly disabled for this destination.

- true

  Production Paused is explicitly turned on for this destination.

Privileges | Read/Write
Type | boolean

### SafExportPolicy

Specifies whether a user can send messages to a destination using Store-and-Forward.

- All

  All users can send messages to this destination using Store-and-Forward.

- None

  Remote users can not send messages to a destination using Store-and-Forward.

This property is dynamically configurable. A dynamic change will only affect messages sent after the update has been made.

Privileges | Read/Write
Type | java.lang.String
Default Value | All
Legal Values | All None

## Operations

This section describes the following operations:

addDestinationKey findErrorDestination isSet | removeDestinationKey unSet

### addDestinationKey

Adds a destination key to the end of the list of keys used for sorting destinations.

Operation Name | `"addDestinationKey"`
Parameters | `Object [] { destinationKey }` where: `destinationKey` is an object of type `java.lang.String` that specifies: The string to be added as a key. Will be added to the end of the list of keys
Signature | `String [] { "java.lang.String" }`
Returns | `void`

### findErrorDestination

Finds the name of the error destination to use when a destination comes from a specific group

Operation Name | `"findErrorDestination"`
Parameters | `Object [] { subDeploymentName }` where: `subDeploymentName` is an object of type `java.lang.String` that specifies: The subDeployment for which to find the quota
Signature | `String [] { "java.lang.String" }`
Returns | `DestinationBean`

### isSet

Return true if the given property has been explicitly set in this bean.

Operation Name | `"isSet"`
Parameters | `Object [] { propertyName }` where: `propertyName` is an object of type `java.lang.String` that specifies: property to check
Signature | `String [] { "java.lang.String" }`
Returns | `boolean`
Exceptions | `java.lang.IllegalArgumentException` IllegalArgumentException if propertyName is not a recognized property

### removeDestinationKey

Removes a destination key from the list of keys used for sorting destinations.

Operation Name | `"removeDestinationKey"`
Parameters | `Object [] { destinationKey }` where: `destinationKey` is an object of type `java.lang.String` that specifies: The string to be removed as a key used for sorting
Signature | `String [] { "java.lang.String" }`
Returns | `void`

### unSet

Restore the given property to its default value.

Operation Name | `"unSet"`
Parameters | `Object [] { propertyName }` where: `propertyName` is an object of type `java.lang.String` that specifies: property to restore
Signature | `String [] { "java.lang.String" }`
Returns | `void`
Exceptions | `java.lang.IllegalArgumentException` UnsupportedOperationException if called on a runtime implementation.