|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mq.MQEnvironment
Field Summary | |
static int |
CCSID
The CCSID used by the client. |
static java.lang.String |
channel
The name of the channel to connect to on the target queue manager. |
static int |
connOptions
The queue manager connection options. |
static byte[] |
connTag
The connection tag which allows users to serialize access to the resources they are using on a z/OS queue manager. |
static java.util.Collection |
hdrCompList
The list of supported compressors for header compression. |
static java.lang.String |
hostname
The TCP/IP hostname of the machine on which the WebSphere MQ server resides. |
static java.lang.String |
localAddressSetting
The local address, including a range of ports, used when connecting to a WebSphere MQ queue manager through a firewall. |
static java.util.Collection |
msgCompList
The list of supported compressors for message compression. |
static java.lang.String |
password
The password used to verify the identity of the WebSphere MQ Client. |
static int |
port
The port to be used. |
static java.util.Hashtable |
properties
A Hashtable which defines the WebSphere MQ environment. |
static MQReceiveExit |
receiveExit
The receive exit used when receiving messages from a queue manager. |
static MQSecurityExit |
securityExit
The security exit used when connecting to a queue manager. |
static MQSendExit |
sendExit
The send exit used when sending messages to a queue manager. |
static java.util.Collection |
sslCertStores
Collection of SSL CertStores. |
static java.lang.String |
sslCipherSuite
The name of the Cipher Suite to be used by SSL. |
static boolean |
sslFipsRequired
When this is set to true, the only Cipher Suites that can be used on an SSL connection from this client process are those which are FIPS-enabled. |
static java.lang.String |
sslPeerName
The Distinguished Name (DN) of the queue manager to be used by SSL. |
static int |
sslResetCount
The total number of unencrypted bytes that are sent and received by the initiating channel MCA before the secret key is reset. |
static java.lang.Object |
sslSocketFactory
The factory to use when connecting with SSL encryption. |
static java.lang.String |
userID
The ID used to identify the WebSphere MQ client. |
static java.lang.String |
version_notice
The current version of the Websphere MQ Java Classes. |
static boolean |
xaClientEnabled
|
Constructor Summary | |
MQEnvironment()
|
Method Summary | |
static MQPoolToken |
addConnectionPoolToken()
Constructs an MQPoolToken and adds it to the set of tokens. |
static void |
addConnectionPoolToken(MQPoolToken token)
Adds a given MQPoolToken to the connection pool. |
static void |
disableTracing()
This method turns off the WebSphere MQ Client for Java trace facility. |
static void |
enableTracing(int level)
Turns on tracing at the specified trace level (traces to system.err). |
static void |
enableTracing(int level,
java.io.OutputStream stream)
This method turns on tracing at the specified trace level. |
static javax.resource.spi.ConnectionManager |
getDefaultConnectionManager()
Gets the default ConnectionManager. |
static MQQueueManager |
getQueueManagerReference(int scope)
Returns an MQQueueManager object reference
if one is available within the specified scope. |
static MQQueueManager |
getQueueManagerReference(int scope,
java.lang.Object context)
Returns an MQQueueManager object reference
if one is available within the specified scope. |
static java.lang.String |
getVersionNotice()
Gets the current version of the Websphere MQ Java Classes. |
static void |
removeConnectionPoolToken(MQPoolToken token)
Removes a token from the connection pool. |
static void |
setDefaultConnectionManager(javax.resource.spi.ConnectionManager cxMan)
Sets the default ConnectionManager, and empties the set of MQPoolTokens. |
static void |
setDefaultConnectionManager(com.ibm.mq.MQConnectionManager mqCxMan)
Sets the default MQConnectionManager, and empties the set of MQPoolTokens. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String version_notice
public static MQSecurityExit securityExit
If you want to provide your own security exit, define a class that implements the MQSecurityExit interface and assign securityExit to an instance of that class.
If you set this field to null no security exit is called.
public static MQSendExit sendExit
If you want to provide your own send exit, define a class that implements the MQSendExit interface, and assign sendExit to an instance of that class.
If you set this field to null no send exit is called.
public static MQReceiveExit receiveExit
If you want to provide your own receive exit, define a class that implements the MQReceiveExit interface, and assign receiveExit to an instance of that class.
If you set this field to null no receive exit is called.
public static java.lang.String hostname
public static int port
The default value is 1414.
public static java.lang.String channel
public static java.lang.String userID
If no security exit is defined for this client, the value of userID is transmitted to the server and is available for use by the server security exit.
The default value is "" (empty string).
public static java.lang.String password
If a security exit is not defined for this client, the value of password is transmitted to the server and is available to the server security exit when it is invoked.
The default value is "" (empty string).
public static int CCSID
Changing this value affects the way that the queue manager you connect to
translates information in the WebSphere MQ headers.
All data in WebSphere MQ headers is drawn from the invariant part of the ASCII codeset,
except for the data in the MQMessage.applicationIdData
and MQMessage.putApplicationName
fields.
If you avoid using characters from the variant part of the ASCII codeset for these two fields, then the CCSID can be changed from 819 to any other ASCII codeset.
If you change the client CCSID to be the same as that of the queue manager to which you are connecting, you gain a performance benefit at the queue manager because it does not attempt to translate the message headers.
The default value is 819.
MQMessage
public static java.util.Collection hdrCompList
public static java.util.Collection msgCompList
MQC.MQCOMPRESS_NONE
, the default.
MQC.MQCOMPRESS_RLE
.
MQC.MQCOMPRESS_ZLIBFAST
.
MQC.MQCOMPRESS_ZLIBHIGH
.
public static java.lang.String sslCipherSuite
sslCertStores
,
sslPeerName
public static java.lang.String sslPeerName
sslCipherSuite
,
sslCertStores
public static java.util.Collection sslCertStores
sslCipherSuite
,
sslPeerName
public static java.lang.Object sslSocketFactory
For more information on constructing and customizing SSLSocketFactory instances, refer to your JSSE provider.
If set to null (default) and SSL encryption is requested, the default SSLSocketFactory is used.
This variable is ignored if sslCipherSuite
is null.
public static int sslResetCount
public static boolean sslFipsRequired
public static java.lang.String localAddressSetting
[ip-addr][(low-port[,high-port])]
.
Here are some examples:
You can specify a host name instead of an IP address. The variable is initialized from system property com.ibm.mq.localAddress when you start the JVM. The default value is null.
public static byte[] connTag
connOptions
is not set.
public static int connOptions
MQC.MQCNO_STANDARD_BINDING
MQC.MQCNO_FASTPATH_BINDING
MQC.MQCNO_ISOLATED_BINDING
MQC.MQCNO_SHARED_BINDING
MQC.MQCNO_RESTRICT_CONN_TAG_Q_MGR
MQC.MQCNO_RESTRICT_CONN_TAG_QSG
MQC.MQCNO_SERIALIZE_CONN_TAG_Q_MGR
MQC.MQCNO_SERIALIZE_CONN_TAG_QSG
public static java.util.Hashtable properties
This Hashtable allows you to set environment properties as key/value pairs rather than as individual variables.
The properties can also be passed as a Hashtable in a parameter on the
MQQueueManager
constructor. Properties passed on
the constructor take precedence over values set with this properties
variable, but they are otherwise interchangeable.
The order of precedence of finding properties is:
The property key names are:
MQC.CCSID_PROPERTY
CCSID
.
MQC.CHANNEL_PROPERTY
channel
.
MQC.CONNECT_OPTIONS_PROPERTY
connOptions
.
MQC.CONNTAG_PROPERTY
connTag
.
MQC.HEADER_COMPRESSION_PROPERTY
hdrCompList
.
MQC.MESSAGE_COMPRESSION_PROPERTY
msgCompList
.
MQC.HOST_NAME_PROPERTY
hostname
.
MQC.LOCAL_ADDRESS_PROPERTY
localAddressSetting
.
MQC.PASSWORD_PROPERTY
password
.
MQC.PORT_PROPERTY
port
.
MQC.RECEIVE_EXIT_PROPERTY
receiveExit
.
MQC.SECURITY_EXIT_PROPERTY
securityExit
.
MQC.SEND_EXIT_PROPERTY
sendExit
.
MQC.SSL_CERT_STORE_PROPERTY
sslCertStores
.
MQC.SSL_CIPHER_SUITE_PROPERTY
sslCipherSuite
.
MQC.SSL_FIPS_REQUIRED
sslFipsRequired
.
MQC.SSL_RESET_COUNT_PROPERTY
.
sslResetCount
.
MQC.SSL_PEER_NAME_PROPERTY
.
sslPeerName
.
MQC.SSL_SOCKET_FACTORY_PROPERTY
sslSocketFactory
.
MQC.TRANSPORT_PROPERTY
MQC.TRANSPORT_MQSERIES_BINDINGS
or MQC.TRANSPORT_MQSERIES_CLIENT
.
MQC.USER_ID_PROPERTY
userID
.
public static boolean xaClientEnabled
Constructor Detail |
public MQEnvironment()
Method Detail |
public static final java.lang.String getVersionNotice()
public static void enableTracing(int level)
level
- the level of trace.public static void enableTracing(int level, java.io.OutputStream stream)
enableTracing(int)
for details of levels.
Specifying a FileOutputStream means that in a WebSphere Application Server version 5 environment, the WebSphere MQ Base Java classes trace is not redirected to the WebSphere Application Server trace adapter, which expects a JMS context.
If the trace string JMSApi=all=enabled
is specified within the
WebSphere Application Server version 5 environment at the same time as this
is run, it takes priority and this tracing is disabled.
level
- the level of trace.stream
- the stream to which output is sent.public static void disableTracing()
public static void setDefaultConnectionManager(com.ibm.mq.MQConnectionManager mqCxMan)
mqCxMan
- the supplied MQConnectionManager.public static void setDefaultConnectionManager(javax.resource.spi.ConnectionManager cxMan)
cxMan
- the supplied ConnectionManager.public static javax.resource.spi.ConnectionManager getDefaultConnectionManager()
public static void addConnectionPoolToken(MQPoolToken token)
token
- the token to be added.public static MQPoolToken addConnectionPoolToken()
removeConnectionPoolToken()
method.
public static void removeConnectionPoolToken(MQPoolToken token)
token
- the token to be removed.public static MQQueueManager getQueueManagerReference(int scope)
MQQueueManager
object reference
if one is available within the specified scope. The scope must be one of
MQC.ASSOCIATE_ALL
or MQC.ASSOCIATE_THREAD
, and a queue manager must already have been created
with MQC.MQ_QMGR_ASSOCIATION_PROPERTY
set to the scope requested.
If no queue manager has been created within the specified scope, or if
MQC.ASSOCIATE_NONE
is specified, this method will
return null.
A call to this method is the same as calling
MQEnvironment.getQueueManagerReference(int, Object)
with
a null Object.
scope
- the association scope
getQueueManagerReference(int, Object)
public static MQQueueManager getQueueManagerReference(int scope, java.lang.Object context)
MQQueueManager
object reference
if one is available within the specified scope. The scope must be one of
MQC.ASSOCIATE_ALL
or MQC.ASSOCIATE_THREAD
, and a queue manager must already have been created
with MQC.MQ_QMGR_ASSOCIATION_PROPERTY
set to the scope requested. The supplied Object gives information
necessary to identify the MQQueueManager within the scope; for
MQC.ASSOCIATE_ALL and MQC.ASSOCIATE_THREAD this
Object must be a String containing the name of the
queue manager.
If no queue manager identified by the supplied Object has been
created within the specified scope, or if
MQC.ASSOCIATE_NONE
is specified, this method will
return null.
An MQQueueManager object returned by this method will refer to the
same underlying HConn as the MQQueueManager created with
MQC.MQ_QMGR_ASSOCIATION_PROPERTY set, and both will therefore share
the same transaction context. If an attempt is made to create a second MQQueueManager
object on the same context to a different queue manager, then a separate
HConn will be made, and the first and second object will have independent
transaction contexts. These contexts will extend to WebSphere MQ coordinated JDBC
transactions by using MQQueueManager.getJDBCConnection(XADataSource)
on the appropriate queue manager.
scope
- the association scopecontext
- an object containing context. Currently this must be a String
specifying a WebSphere MQ queue manager name
|
(c) Copyright IBM Corp. 2005. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |