BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.management.configuration
Class JMSLegalHelper

java.lang.Object
  |
  +--weblogic.management.configuration.JMSLegalHelper

public final class JMSLegalHelper
extends java.lang.Object

A Helper class to verify that configured JMS values are legal.

Author:
Copyright © 2002 BEA Systems, Inc. All Rights Reserved.

Field Summary
static java.util.HashMap jndi2Cfs
          Description of the Field
static java.util.HashMap jndi2Dests
          Description of the Field
 
Constructor Summary
JMSLegalHelper()
           
 
Method Summary
static java.util.Set getConflictedCfs(java.lang.String JNDIName)
          Gets the conflictedCfs attribute of the JMSLegalHelper class
static java.util.Set getConflictedDests(java.lang.String JNDIName)
          Gets the conflictedDests attribute of the JMSLegalHelper class
static TargetMBean getMemberTarget(JMSDistributedDestinationMemberMBean member, boolean targetedToCluster)
          Gets the memberTarget attribute of the JMSLegalHelper class
static java.lang.String getMemberTargetName(JMSDistributedDestinationMemberMBean member, boolean targetedToCluster)
          Gets the memberTargetName attribute of the JMSLegalHelper class
static boolean isBytesThresholdSet(JMSDestinationMBean currentDest, java.lang.Object value)
          A Helper method to verify that the BytesThresholsHigh and MessageThresholdLow is set when setting a destination's MessagePagingEnabled to true.
static boolean isBytesThresholdSet(JMSServerMBean currentJMSServer, java.lang.Object value)
          A Helper method to verify that the BytesThresholsHigh and MessageThresholdLow is set when setting JMSServer's MessagePagingEnabled to true.
static boolean isCollected(WebLogicMBean mbean)
          Gets the collected attribute of the JMSLegalHelper class
static boolean isMessagesThresholdSet(JMSDestinationMBean currentDest, java.lang.Object value)
          A Helper method to verify that the MessagesThresholsHigh and MessageThresholdLow is set when setting a destination's MessagePagingEnabled to true.
static boolean isMessagesThresholdSet(JMSServerMBean currentJMSServer, java.lang.Object value)
          A Helper method to verify that the MessagesThresholsHigh and MessageThresholdLow is set when setting JMSServer's MessagePagingEnabled to true.
static boolean isUnowned(JMSServerMBean currentServer, WebLogicObjectName newStoreObjectName)
          A Helper method to verify that the new JMS store for a JMS server is not in use by another JMS server.
static boolean jdbcPrefixCheck(java.lang.String value)
          Description of the Method
static boolean jmsCFNoConflictsWithDefaults(java.lang.String name, java.lang.String JNDIName)
          A Helper method to verify the name and JNDI name of a user defined connection factories does not conflict with that of any default connection factories.
static boolean jmsCheckDistributedDestinationMember(JMSDistributedDestinationMBean ddMBean, java.lang.Object members)
          Description of the Method
static boolean jmsDestJNDINameNoConflictsForReplicated(JMSDestinationMBean destMBean)
          A Helper method to verify the JNDI name of a user defined destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment).
static boolean jmsJNDINameNoConflicts(WebLogicMBean o)
          A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment).
static boolean jmsJNDINameNoConflicts(WebLogicMBean mBean, java.lang.String JNDIName)
          A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment).
static boolean jmsJNDINameNoConflictsWhenSetParent(WebLogicMBean mBean, java.lang.Object parent)
          A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment).
static boolean jmsJNDINameNoConflictsWhenTargeted(WebLogicMBean mBean, java.lang.Object t)
          A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment).
static boolean jmsJNDINameNoConflictsWithCfs(WebLogicMBean mBean, java.lang.String JNDIName, java.util.Collection cfs)
          A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with a collection of connection factories.
static boolean jmsJNDINameNoConflictsWithCfsWhenTargeted(WebLogicMBean mBean, java.lang.String JNDIName, java.util.Collection targets, java.util.Collection cfs)
          Description of the Method
static boolean jmsJNDINameNoConflictsWithDestinations(WebLogicMBean mBean, java.lang.String JNDIName, java.util.Collection dests)
          A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with a collection of destinations.
static boolean jmsJNDINameNoConflictsWithDestinationsWhenTargeted(WebLogicMBean mBean, java.lang.String JNDIName, java.util.Collection targets, java.util.Collection dests)
          Description of the Method
static boolean jmsServerSingleTarget(DeploymentMBean jmsServer, java.lang.Object targets)
          A Helper method to verify that a JMSServer can only be deployed on a single WebLogic server.
static boolean jmsValidMulticastAddress(java.lang.String address)
          A Helper method to verify that a JMSTopicMBean's multicast address is a valid IP address.
static boolean jmsValidStore(WebLogicMBean mBean, java.lang.Object t)
          A Helper method to verify that the JMS server that is to be targeted are not using any store that is used by web service relaible policy on a different server.
static boolean jmsValidVirtualDestinationTargets(DeploymentMBean ddMBean, java.lang.Object targets)
          A Helper method to verify that a JMS virtual destination can only be deployed on one of the following: 1.
static boolean jmsValidVirtualDestinationTargetsWithMembers(DeploymentMBean ddMBean, java.lang.Object targets)
          A Helper method to verify that a JMS virtual destination's targets cover all the servers where the members are hosted, if there is any member.
static boolean legalAMEPolicy(JMSDestCommonMBean currentDest, java.lang.String value)
          A Helper method to verify that the AME policy is consistent with the ErrorDestination If AME policy is "redirect" then there has to be a not null ErrorDestination in the DestinationMBean or the Template if it is used
static boolean legalErrorDestination(JMSDestCommonMBean currentDest, WebLogicObjectName errorDestObjectName)
          A Helper method to verify that a proposed error destination exists on the same JMS server as the destination it is targeted on.
static boolean legalErrorDestinationForAME(JMSDestCommonMBean currentDest)
          A Helper method to verify that a proposed error destination exists on the same JMS server as the destination it is targeted on.
static boolean legalOrder(java.lang.Object o, WebLogicObjectName newKey)
          A Helper method to verify the legal order of destination keys configured for a destination.
static boolean legalOrder(java.lang.Object o, WebLogicObjectName[] newKeys)
          A Helper method to verify the legal order of destination keys configured for a destination.
static boolean legalTimeToDeliverOverride(java.lang.Object value)
          A Helper method to verify that a particular time-to-deliver override is legal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jndi2Cfs

public static java.util.HashMap jndi2Cfs
Description of the Field

jndi2Dests

public static java.util.HashMap jndi2Dests
Description of the Field
Constructor Detail

JMSLegalHelper

public JMSLegalHelper()
Method Detail

isUnowned

public static boolean isUnowned(JMSServerMBean currentServer,
                                WebLogicObjectName newStoreObjectName)
A Helper method to verify that the new JMS store for a JMS server is not in use by another JMS server. It must be public to allow the BeanShell interpreter to call it.

Parameters:
currentServer - Description of the Parameter
newStoreObjectName - Description of the Parameter
Returns:
The unowned value

getMemberTargetName

public static java.lang.String getMemberTargetName(JMSDistributedDestinationMemberMBean member,
                                                   boolean targetedToCluster)
Gets the memberTargetName attribute of the JMSLegalHelper class

Parameters:
member - Description of the Parameter
targetedToCluster - Description of the Parameter
Returns:
The memberTargetName value

getMemberTarget

public static TargetMBean getMemberTarget(JMSDistributedDestinationMemberMBean member,
                                          boolean targetedToCluster)
Gets the memberTarget attribute of the JMSLegalHelper class

Parameters:
member - Description of the Parameter
targetedToCluster - Description of the Parameter
Returns:
The memberTarget value

isCollected

public static boolean isCollected(WebLogicMBean mbean)
Gets the collected attribute of the JMSLegalHelper class

Parameters:
mbean - Description of the Parameter
Returns:
The collected value

getConflictedCfs

public static java.util.Set getConflictedCfs(java.lang.String JNDIName)
Gets the conflictedCfs attribute of the JMSLegalHelper class

Parameters:
JNDIName - Description of the Parameter
Returns:
The conflictedCfs value

getConflictedDests

public static java.util.Set getConflictedDests(java.lang.String JNDIName)
Gets the conflictedDests attribute of the JMSLegalHelper class

Parameters:
JNDIName - Description of the Parameter
Returns:
The conflictedDests value

isMessagesThresholdSet

public static boolean isMessagesThresholdSet(JMSServerMBean currentJMSServer,
                                             java.lang.Object value)
                                      throws javax.management.InvalidAttributeValueException
A Helper method to verify that the MessagesThresholsHigh and MessageThresholdLow is set when setting JMSServer's MessagePagingEnabled to true.

Parameters:
currentJMSServer - Description of the Parameter
value - Description of the Parameter
Returns:
The messagesThresholdSet value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

isBytesThresholdSet

public static boolean isBytesThresholdSet(JMSServerMBean currentJMSServer,
                                          java.lang.Object value)
                                   throws javax.management.InvalidAttributeValueException
A Helper method to verify that the BytesThresholsHigh and MessageThresholdLow is set when setting JMSServer's MessagePagingEnabled to true.

Parameters:
currentJMSServer - Description of the Parameter
value - Description of the Parameter
Returns:
The bytesThresholdSet value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

isMessagesThresholdSet

public static boolean isMessagesThresholdSet(JMSDestinationMBean currentDest,
                                             java.lang.Object value)
                                      throws javax.management.InvalidAttributeValueException
A Helper method to verify that the MessagesThresholsHigh and MessageThresholdLow is set when setting a destination's MessagePagingEnabled to true.

Parameters:
currentDest - Description of the Parameter
value - Description of the Parameter
Returns:
The messagesThresholdSet value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

isBytesThresholdSet

public static boolean isBytesThresholdSet(JMSDestinationMBean currentDest,
                                          java.lang.Object value)
                                   throws javax.management.InvalidAttributeValueException
A Helper method to verify that the BytesThresholsHigh and MessageThresholdLow is set when setting a destination's MessagePagingEnabled to true.

Parameters:
currentDest - Description of the Parameter
value - Description of the Parameter
Returns:
The bytesThresholdSet value
Throws:
javax.management.InvalidAttributeValueException - Description of the Exception

legalOrder

public static boolean legalOrder(java.lang.Object o,
                                 WebLogicObjectName[] newKeys)
A Helper method to verify the legal order of destination keys configured for a destination. If JMSMessageID is one of the keys, it has to be the last one. This method is called when the keys are originally set.

Parameters:
o - Description of the Parameter
newKeys - Description of the Parameter
Returns:
Description of the Return Value

legalOrder

public static boolean legalOrder(java.lang.Object o,
                                 WebLogicObjectName newKey)
A Helper method to verify the legal order of destination keys configured for a destination. If JMSMessageID is one of the keys, it has to be the last one. This method is called when a new key is added to the end.

Parameters:
o - Description of the Parameter
newKey - Description of the Parameter
Returns:
Description of the Return Value

legalTimeToDeliverOverride

public static boolean legalTimeToDeliverOverride(java.lang.Object value)
A Helper method to verify that a particular time-to-deliver override is legal. It may either by a long > -1 or a string that represents a schedule.

Parameters:
value - Description of the Parameter
Returns:
Description of the Return Value

legalErrorDestinationForAME

public static boolean legalErrorDestinationForAME(JMSDestCommonMBean currentDest)
A Helper method to verify that a proposed error destination exists on the same JMS server as the destination it is targeted on.

Parameters:
currentDest - Description of the Parameter
Returns:
Description of the Return Value

legalErrorDestination

public static boolean legalErrorDestination(JMSDestCommonMBean currentDest,
                                            WebLogicObjectName errorDestObjectName)
A Helper method to verify that a proposed error destination exists on the same JMS server as the destination it is targeted on.

Parameters:
currentDest - Description of the Parameter
errorDestObjectName - Description of the Parameter
Returns:
Description of the Return Value

jmsServerSingleTarget

public static boolean jmsServerSingleTarget(DeploymentMBean jmsServer,
                                            java.lang.Object targets)
A Helper method to verify that a JMSServer can only be deployed on a single WebLogic server.

Parameters:
jmsServer - Description of the Parameter
targets - Description of the Parameter
Returns:
Description of the Return Value

jmsValidMulticastAddress

public static boolean jmsValidMulticastAddress(java.lang.String address)
A Helper method to verify that a JMSTopicMBean's multicast address is a valid IP address.

Parameters:
address - Description of the Parameter
Returns:
Description of the Return Value

jmsValidVirtualDestinationTargets

public static boolean jmsValidVirtualDestinationTargets(DeploymentMBean ddMBean,
                                                        java.lang.Object targets)
A Helper method to verify that a JMS virtual destination can only be deployed on one of the following: 1. a single WebLogic cluster; 2. a single server that is not in a cluster

Parameters:
ddMBean - Description of the Parameter
targets - Description of the Parameter
Returns:
Description of the Return Value

jmsValidVirtualDestinationTargetsWithMembers

public static boolean jmsValidVirtualDestinationTargetsWithMembers(DeploymentMBean ddMBean,
                                                                   java.lang.Object targets)
A Helper method to verify that a JMS virtual destination's targets cover all the servers where the members are hosted, if there is any member.

Parameters:
ddMBean - Description of the Parameter
targets - Description of the Parameter
Returns:
Description of the Return Value

jmsCheckDistributedDestinationMember

public static boolean jmsCheckDistributedDestinationMember(JMSDistributedDestinationMBean ddMBean,
                                                           java.lang.Object members)
Description of the Method

Parameters:
ddMBean - Description of the Parameter
members - Description of the Parameter
Returns:
Description of the Return Value

jmsCFNoConflictsWithDefaults

public static boolean jmsCFNoConflictsWithDefaults(java.lang.String name,
                                                   java.lang.String JNDIName)
A Helper method to verify the name and JNDI name of a user defined connection factories does not conflict with that of any default connection factories.

Parameters:
name - Description of the Parameter
JNDIName - Description of the Parameter
Returns:
Description of the Return Value

jmsJNDINameNoConflicts

public static boolean jmsJNDINameNoConflicts(WebLogicMBean o)
A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment). This is called in WebLogicMBean.setParent() method used to check a destination that is programatically added to a JMSServer.

Parameters:
o - Description of the Parameter
Returns:
Description of the Return Value

jmsJNDINameNoConflictsWhenTargeted

public static boolean jmsJNDINameNoConflictsWhenTargeted(WebLogicMBean mBean,
                                                         java.lang.Object t)
A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment). This is called in DeploymentMBean.setTargets() and addTarget() method. Used to check a connection factory when it is targeted, or a destination that is on a JMSServer that is just targeted.

Parameters:
mBean - Description of the Parameter
t - Description of the Parameter
Returns:
Description of the Return Value

jmsJNDINameNoConflicts

public static boolean jmsJNDINameNoConflicts(WebLogicMBean mBean,
                                             java.lang.String JNDIName)
A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment). This is called in JMSConnectionFactoryMBean.setJNDIName() and JMSDestinationMBean.setJNDIName() method. Used to check a connection factory when its JNDIName is set after it is targeted, or a destination when its JNDIName is set after the JMSServer it on is targeted.

Parameters:
mBean - Description of the Parameter
JNDIName - Description of the Parameter
Returns:
Description of the Return Value

jmsJNDINameNoConflictsWithDestinations

public static boolean jmsJNDINameNoConflictsWithDestinations(WebLogicMBean mBean,
                                                             java.lang.String JNDIName,
                                                             java.util.Collection dests)
A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with a collection of destinations. This is refactored out because it can be called in JMSJNDIInvariantChecker as well as locally.

Parameters:
mBean - Description of the Parameter
JNDIName - Description of the Parameter
dests - Description of the Parameter
Returns:
Description of the Return Value

jmsJNDINameNoConflictsWithDestinationsWhenTargeted

public static boolean jmsJNDINameNoConflictsWithDestinationsWhenTargeted(WebLogicMBean mBean,
                                                                         java.lang.String JNDIName,
                                                                         java.util.Collection targets,
                                                                         java.util.Collection dests)
Description of the Method

Parameters:
mBean - Description of the Parameter
JNDIName - Description of the Parameter
targets - Description of the Parameter
dests - Description of the Parameter
Returns:
Description of the Return Value

jmsJNDINameNoConflictsWithCfs

public static boolean jmsJNDINameNoConflictsWithCfs(WebLogicMBean mBean,
                                                    java.lang.String JNDIName,
                                                    java.util.Collection cfs)
A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with a collection of connection factories. This is refactored out because it can be called in JMSJNDIInvariantChecker as well as locally.

Parameters:
mBean - Description of the Parameter
JNDIName - Description of the Parameter
cfs - Description of the Parameter
Returns:
Description of the Return Value

jmsJNDINameNoConflictsWithCfsWhenTargeted

public static boolean jmsJNDINameNoConflictsWithCfsWhenTargeted(WebLogicMBean mBean,
                                                                java.lang.String JNDIName,
                                                                java.util.Collection targets,
                                                                java.util.Collection cfs)
Description of the Method

Parameters:
mBean - Description of the Parameter
JNDIName - Description of the Parameter
targets - Description of the Parameter
cfs - Description of the Parameter
Returns:
Description of the Return Value

jmsDestJNDINameNoConflictsForReplicated

public static boolean jmsDestJNDINameNoConflictsForReplicated(JMSDestinationMBean destMBean)
A Helper method to verify the JNDI name of a user defined destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment). This is called in JMSDestinationMBean.setJNDINameReplicated(). Used to check a destination when its JNDIName replicated is set to true from false.

Parameters:
destMBean - Description of the Parameter
Returns:
Description of the Return Value

jmsJNDINameNoConflictsWhenSetParent

public static boolean jmsJNDINameNoConflictsWhenSetParent(WebLogicMBean mBean,
                                                          java.lang.Object parent)
A Helper method to verify the JNDI name of a user defined connection factory or destination does not conflict with any existing connection factories and destinations in the same cluster (or a single server in a non-clustered environment). This is called in WeblogicMBean.setParent() method. Used to check a destination when its Parent attribute is set.

Parameters:
mBean - Description of the Parameter
parent - Description of the Parameter
Returns:
Description of the Return Value

legalAMEPolicy

public static boolean legalAMEPolicy(JMSDestCommonMBean currentDest,
                                     java.lang.String value)
A Helper method to verify that the AME policy is consistent with the ErrorDestination If AME policy is "redirect" then there has to be a not null ErrorDestination in the DestinationMBean or the Template if it is used

Parameters:
currentDest - Description of the Parameter
value - Description of the Parameter
Returns:
Description of the Return Value

jdbcPrefixCheck

public static boolean jdbcPrefixCheck(java.lang.String value)
Description of the Method

Parameters:
value - Description of the Parameter
Returns:
Description of the Return Value

jmsValidStore

public static boolean jmsValidStore(WebLogicMBean mBean,
                                    java.lang.Object t)
A Helper method to verify that the JMS server that is to be targeted are not using any store that is used by web service relaible policy on a different server.

Parameters:
currentServer - Description of the Parameter
newStoreObjectName - Description of the Parameter
Returns:
The unowned value

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81b