public abstract class NativeConnection extends AllowsRetriesConnection implements LicensedComponent
Requires an Enterprise license
log
Constructor and Description |
---|
NativeConnection() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeConnection() |
KeyValuePairSet |
getEnvironmentProperties() |
java.lang.String |
getQueueManager() |
boolean |
getRedirectExceptionLogging() |
protected void |
initConnection() |
boolean |
isEnabled(License license) |
protected void |
prepareConnection() |
void |
setEnvironmentProperties(KeyValuePairSet kvps)
Set any additional properties that should be passed in as part of the constructor to MQQueueManager.
|
void |
setQueueManager(java.lang.String s)
Set the Queue manager associated with this connection.
|
void |
setRedirectExceptionLogging(boolean b)
Redirect logging done by MQException.
|
connectionAttempts, connectionRetryInterval, createLoggingStatement, getConnectionAttempts, getConnectionRetryInterval, logWarning, setConnectionAttempts, setConnectionRetryInterval
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getLookupName, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setLookupName, setUniqueId, setWorkersFirstOnShutdown, start, startConnection, stop, stopConnection, workersFirstOnShutdown
protected void initConnection() throws CoreException
initConnection
in class AdaptrisConnectionImp
CoreException
AdaptrisConnectionImp.initConnection()
protected void prepareConnection() throws CoreException
prepareConnection
in class AdaptrisConnectionImp
CoreException
public boolean isEnabled(License license)
isEnabled
in interface LicensedComponent
public java.lang.String getQueueManager()
public void setQueueManager(java.lang.String s)
s
- the queueManager to setpublic KeyValuePairSet getEnvironmentProperties()
public void setEnvironmentProperties(KeyValuePairSet kvps)
The properties specified within the KeyValuePairSet will override the default MQEnvironment properties. Complex properties such as Collections and byte[] are not supported.
These options are directly copied from the WebsphereMQ client API documentation. The literal values associated with each java
constant should be used where appropriate. e.g. rather than using "MQC.CHANNEL_PROPERTY"
as one of the keys you
would use "channel"
as that is the literal value the constant represents. Any options that aren't recognised by
WebsphereMQ will be ignored.
Possible values from the WebsphereMQ 6 documentation are:
kvps
- the environmentProperties to setMQEnvironment.properties
,
MQQueueManager.MQQueueManager(String, java.util.Hashtable)
public boolean getRedirectExceptionLogging()
public void setRedirectExceptionLogging(boolean b)
MQException exposes a static field log
which receives additional logging when an Exception is raised. Set this to
be true so that this logging is redirected to the Adapter logging framework rather than stderr.
The logging category will be this class with a level of ERROR.
b
- the redirectExceptionLogging to setprotected void closeConnection()
closeConnection
in class AdaptrisConnectionImp