Package org.glassfish.jms.admin.cli
Class JMSDestination
- java.lang.Object
-
- org.glassfish.jms.admin.cli.JMSDestination
-
- Direct Known Subclasses:
ChangeMasterBrokerCommand,CreateJMSDestination,DeleteJMSDestination,FlushJMSDestination,GetJmsPhysicalDestinationCommand,ListJMSDestinations,UpdateJmsPhysicalDestinationCommand
public abstract class JMSDestination extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCLUSTER_CONFIG_MBEAN_NAMEstatic StringDEFAULT_MAX_ACTIVE_CONSUMERSprotected static StringDESTINATION_MANAGER_CONFIG_MBEAN_NAMEprotected static StringDESTINATION_TYPE_QUEUEprotected static StringDESTINATION_TYPE_TOPICstatic StringJMS_DEST_TYPE_QUEUEstatic StringJMS_DEST_TYPE_TOPICstatic StringJMXCONNECTORENVstatic StringJMXSERVICEURLLISTprotected static Loggerloggerstatic StringMAX_ACTIVE_CONSUMERS_ATTRIBUTEstatic StringMAX_ACTIVE_CONSUMERS_PROPERTYprotected static StringMBEAN_DOMAIN_NAME
-
Constructor Summary
Constructors Constructor Description JMSDestination()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MQJMXConnectorInfo_getMQJMXConnectorInfo(String targetName, JmsService jmsService, Class mqRAClassName, ServerContext serverContext, Config config, Domain domain)protected MQJMXConnectorInfo_getMQJMXConnectorInfoForCluster(String target, JmsService jmsService, Class mqRAClassName, ServerContext serverContext)Gets theMQJMXConnectorobject for a cluster.protected AttributeListconvertProp2Attrs(Properties destProps)protected jakarta.resource.spi.ResourceAdaptergetConfiguredRA(Class mqRAclassname, String connectionURL, String adminuser, String adminpasswd)protected MQAddressListgetDefaultAddressList(JmsService jmsService)protected StringgetFirstJMXServiceURL(String jmxServiceURLList)protected ActiveJmsResourceAdaptergetMQAdapter(ConnectorRuntime connectorRuntime)protected MQJMXConnectorInfogetMQJMXConnectorInfo(String target, Config config, ServerContext serverContext, Domain domain, ConnectorRuntime connectorRuntime)protected MQJMXConnectorInfo[]getMQJMXConnectorInfos(String target, Config config, ServerContext serverContext, Domain domain, ConnectorRuntime connectorRuntime)protected CommandTargetgetTypeForTarget(String target)protected voidhandleException(Exception e)protected voidlogAndHandleException(Exception e, String errorMsg)protected voidvalidateJMSDestName(String destName)protected voidvalidateJMSDestType(String destType)
-
-
-
Field Detail
-
logger
protected static final Logger logger
-
JMS_DEST_TYPE_TOPIC
public static final String JMS_DEST_TYPE_TOPIC
- See Also:
- Constant Field Values
-
JMS_DEST_TYPE_QUEUE
public static final String JMS_DEST_TYPE_QUEUE
- See Also:
- Constant Field Values
-
DEFAULT_MAX_ACTIVE_CONSUMERS
public static final String DEFAULT_MAX_ACTIVE_CONSUMERS
- See Also:
- Constant Field Values
-
MAX_ACTIVE_CONSUMERS_ATTRIBUTE
public static final String MAX_ACTIVE_CONSUMERS_ATTRIBUTE
- See Also:
- Constant Field Values
-
MAX_ACTIVE_CONSUMERS_PROPERTY
public static final String MAX_ACTIVE_CONSUMERS_PROPERTY
- See Also:
- Constant Field Values
-
JMXSERVICEURLLIST
public static final String JMXSERVICEURLLIST
- See Also:
- Constant Field Values
-
JMXCONNECTORENV
public static final String JMXCONNECTORENV
- See Also:
- Constant Field Values
-
MBEAN_DOMAIN_NAME
protected static final String MBEAN_DOMAIN_NAME
- See Also:
- Constant Field Values
-
DESTINATION_MANAGER_CONFIG_MBEAN_NAME
protected static final String DESTINATION_MANAGER_CONFIG_MBEAN_NAME
- See Also:
- Constant Field Values
-
CLUSTER_CONFIG_MBEAN_NAME
protected static final String CLUSTER_CONFIG_MBEAN_NAME
- See Also:
- Constant Field Values
-
DESTINATION_TYPE_QUEUE
protected static final String DESTINATION_TYPE_QUEUE
- See Also:
- Constant Field Values
-
DESTINATION_TYPE_TOPIC
protected static final String DESTINATION_TYPE_TOPIC
- See Also:
- Constant Field Values
-
-
Method Detail
-
validateJMSDestName
protected void validateJMSDestName(String destName)
-
validateJMSDestType
protected void validateJMSDestType(String destType)
-
getMQJMXConnectorInfo
protected MQJMXConnectorInfo getMQJMXConnectorInfo(String target, Config config, ServerContext serverContext, Domain domain, ConnectorRuntime connectorRuntime) throws Exception
- Throws:
Exception
-
getMQJMXConnectorInfos
protected MQJMXConnectorInfo[] getMQJMXConnectorInfos(String target, Config config, ServerContext serverContext, Domain domain, ConnectorRuntime connectorRuntime) throws ConnectorRuntimeException
- Throws:
ConnectorRuntimeException
-
_getMQJMXConnectorInfo
protected MQJMXConnectorInfo _getMQJMXConnectorInfo(String targetName, JmsService jmsService, Class mqRAClassName, ServerContext serverContext, Config config, Domain domain) throws ConnectorRuntimeException
- Throws:
ConnectorRuntimeException
-
_getMQJMXConnectorInfoForCluster
protected MQJMXConnectorInfo _getMQJMXConnectorInfoForCluster(String target, JmsService jmsService, Class mqRAClassName, ServerContext serverContext) throws ConnectorRuntimeException
Gets theMQJMXConnectorobject for a cluster. Since this code is executed in DAS, an admin API is used to resolve hostnames and ports of cluster instances for LOCAL type brokers while creating the connectionURL.- Throws:
ConnectorRuntimeException
-
getConfiguredRA
protected jakarta.resource.spi.ResourceAdapter getConfiguredRA(Class mqRAclassname, String connectionURL, String adminuser, String adminpasswd) throws Exception
- Throws:
Exception
-
getTypeForTarget
protected CommandTarget getTypeForTarget(String target)
-
getMQAdapter
protected ActiveJmsResourceAdapter getMQAdapter(ConnectorRuntime connectorRuntime) throws Exception
- Throws:
Exception
-
getDefaultAddressList
protected MQAddressList getDefaultAddressList(JmsService jmsService) throws Exception
- Throws:
Exception
-
logAndHandleException
protected void logAndHandleException(Exception e, String errorMsg) throws JMSAdminException
- Throws:
JMSAdminException
-
handleException
protected void handleException(Exception e) throws JMSAdminException
- Throws:
JMSAdminException
-
convertProp2Attrs
protected AttributeList convertProp2Attrs(Properties destProps)
-
-