Package com.tibco.tibjms
Class TibjmsXAConnectionFactory
- java.lang.Object
- 
- com.tibco.tibjms.TibjmsxCFImpl
- 
- com.tibco.tibjms.TibjmsXAConnectionFactory
 
 
- 
- All Implemented Interfaces:
- com.tibco.tibjms.TibjmsXMLConst,- java.io.Externalizable,- java.io.Serializable,- java.lang.Cloneable,- XAConnectionFactory,- javax.naming.Referenceable
 - Direct Known Subclasses:
- TibjmsXAQueueConnectionFactory,- TibjmsXATopicConnectionFactory
 
 public class TibjmsXAConnectionFactory extends com.tibco.tibjms.TibjmsxCFImpl implements XAConnectionFactory, java.lang.Cloneable, java.io.Serializable, javax.naming.Referenceable Note: XA sessions do not support routed queues.- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class com.tibco.tibjms.TibjmsxCFImpl_clientID, _properties, _url, _wasCreatedByUfo
 - 
Fields inherited from interface com.tibco.tibjms.TibjmsXMLConstTIBJMS_LDAP_ADMINOBJ, TIBJMS_LDAP_CN, TIBJMS_LDAP_OBJCLASS, TIBJMS_LDAP_TOP, TIBJMS_LDAP_XMLDATA, TIBJMS_XML_ADMINOBJ, TIBJMS_XML_AUTHONLY, TIBJMS_XML_AUTHORITIES, TIBJMS_XML_B64DATA, TIBJMS_XML_CERT, TIBJMS_XML_CERTS, TIBJMS_XML_CIDENTITY, TIBJMS_XML_CIPHERS, TIBJMS_XML_CLIENTID, TIBJMS_XML_CONFACT, TIBJMS_XML_CONNATTEMPTS, TIBJMS_XML_CONNATTEMPTTIMEOUT, TIBJMS_XML_CONNDELAY, TIBJMS_XML_DEBUG_TRACE, TIBJMS_XML_DESTTYPE, TIBJMS_XML_DISABLED, TIBJMS_XML_DTDURL, TIBJMS_XML_ENABLED, TIBJMS_XML_ENCODING, TIBJMS_XML_EXPECTHNAME, TIBJMS_XML_FILE, TIBJMS_XML_GENERIC, TIBJMS_XML_GENPARAMS, TIBJMS_XML_ISSUER, TIBJMS_XML_METRIC, TIBJMS_XML_MULTICAST, TIBJMS_XML_MULTICAST_DAEMON, TIBJMS_XML_NAME, TIBJMS_XML_OAUTH2_CLIENT_ID, TIBJMS_XML_OAUTH2_DISABLE_VERIFY_HOSTNAME, TIBJMS_XML_OAUTH2_EXPECTED_HOSTNAME, TIBJMS_XML_OAUTH2_SERVER_TRUST_FILE, TIBJMS_XML_OAUTH2_SERVER_URL, TIBJMS_XML_OAUTH2PARAMS, TIBJMS_XML_PARAMETER, TIBJMS_XML_PASSWORD, TIBJMS_XML_PKEY, TIBJMS_XML_QUEUE, TIBJMS_XML_RECONNATTEMPTS, TIBJMS_XML_RECONNATTEMPTTIMEOUT, TIBJMS_XML_RECONNDELAY, TIBJMS_XML_SECPARAMS, TIBJMS_XML_SSLPARAMS, TIBJMS_XML_TOPIC, TIBJMS_XML_TRACE, TIBJMS_XML_TRUSTED, TIBJMS_XML_URL, TIBJMS_XML_USERNAME, TIBJMS_XML_VALUE, TIBJMS_XML_VENDOR, TIBJMS_XML_VERIFYHNAME, TIBJMS_XML_VERIFYHOST, TIBJMS_XML_XA
 
- 
 - 
Constructor SummaryConstructors Constructor Description TibjmsXAConnectionFactory()TibjmsXAConnectionFactory(java.lang.String serverUrl)TibjmsXAConnectionFactory(java.lang.String serverUrl, java.lang.String clientId)TibjmsXAConnectionFactory(java.lang.String serverUrl, java.lang.String clientId, java.util.Map properties)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Objectclone()ConnectioncreateConnection()ConnectioncreateConnection(java.lang.String userName, java.lang.String password)XAConnectioncreateXAConnection()Creates anXAConnectionwith the default user identity.XAConnectioncreateXAConnection(java.lang.String userName, java.lang.String password)Creates anXAConnectionwith the specified user identity.XAJMSContextcreateXAContext()Creates aXAJMSContextwith the default user identityXAJMSContextcreateXAContext(java.lang.String userName, java.lang.String password)Creates a JMSContext with the specified user identityjava.lang.StringgetSSLProxyHost()Get the TLS proxy host from this connection factory.java.lang.StringgetSSLProxyPassword()Get the TLS proxy password from a connection factory.intgetSSLProxyPort()Get the TLS proxy port from this connection factory.java.lang.StringgetSSLProxyUser()Get the TLS proxy username from a connection factory.voidsetClientID(java.lang.String clientID)voidsetConnAttemptCount(int attempts)voidsetConnAttemptDelay(int delay)voidsetConnAttemptTimeout(int connectAttemptTimeout)voidsetMetric(int metric)voidsetMulticastDaemon(java.lang.String port)Deprecated.As of release 8.3voidsetMulticastEnabled(boolean enabled)Deprecated.As of release 8.3voidsetOAuth2AccessToken(java.lang.String accessToken)Set the OAuth 2.0 access token that connections will present to the EMS server.voidsetOAuth2ClientId(java.lang.String clientId)Set the OAuth 2.0 client ID that the client will use when connecting to the OAuth 2.0 authorization server.voidsetOAuth2ClientSecret(java.lang.String clientSecret)Set the OAuth 2.0 client secret that the client will use when connecting to the OAuth 2.0 authorization server.voidsetOAuth2DisableVerifyHostname(boolean disableVerifyHostname)Set whether to disable client verification of the hostname in the secure OAuth 2.0 authorization server host's certificate.voidsetOAuth2ExpectedHostname(java.lang.String expectedHostname)Set the hostname that is expected to be set in the secure OAuth 2.0 authorization server host's certificate.voidsetOAuth2ServerTrustFile(byte[] serverTrustFile)Set the trust contents for verifying the identity of the secure OAuth 2.0 authorization server.voidsetOAuth2ServerTrustFile(java.lang.String serverTrustFile)Set the trust file path for verifying the identity of the secure OAuth 2.0 authorization server.voidsetOAuth2ServerUrl(java.lang.String serverUrl)Set the URL of the OAuth 2.0 authorization server that the client will request access tokens from.voidsetOAuth2TokenFetchCallback(TibjmsOAuth2TokenFetchCallback callback)Set theTibjmsOAuth2TokenFetchCallbackobject to be invoked when the client needs to fetch an OAuth 2.0 access token.voidsetReconnAttemptCount(int attempts)voidsetReconnAttemptDelay(int delay)voidsetReconnAttemptTimeout(int reconnectAttemptTimeout)voidsetServerUrl(java.lang.String serverUrl)voidsetSSLAuthOnly(java.lang.Boolean authOnly)voidsetSSLCipherSuites(java.lang.String suites)voidsetSSLDebugTrace(java.lang.Boolean debugTrace)voidsetSSLEnableVerifyHost(java.lang.Boolean enableVerifyHost)voidsetSSLEnableVerifyHostName(java.lang.Boolean enableVerifyHostName)voidsetSSLExpectedHostName(java.lang.String expectedHostName)voidsetSSLIdentity(byte[] identity)voidsetSSLIdentity(java.lang.String sslIdentity)voidsetSSLIdentityEncoding(java.lang.String sslIdentityEncoding)voidsetSSLIssuerCertificate(byte[] certificate, java.lang.String encoding)voidsetSSLIssuerCertificate(java.lang.String certificate)voidsetSSLIssuerCertificate(java.lang.String certificate, java.lang.String encoding)voidsetSSLPassword(java.lang.String sslPassword)voidsetSSLPrivateKey(byte[] sslPrivateKey)voidsetSSLPrivateKey(java.lang.String sslPrivateKey)voidsetSSLPrivateKeyEncoding(java.lang.String sslPrivateKeyEncoding)voidsetSSLProxy(java.lang.String host, int port)Set the connection factory's parameters for connecting through a TLS proxy.voidsetSSLProxyAuth(java.lang.String username, java.lang.String password)Set a connection factory's username and password for connecting through a TLS proxy.voidsetSSLTrace(java.lang.Boolean trace)voidsetSSLTrustedCertificate(byte[] certificate, java.lang.String trustedEncoding)voidsetSSLTrustedCertificate(java.lang.String certificate)voidsetSSLTrustedCertificate(java.lang.String certificate, java.lang.String trustedEncoding)voidsetSSLVendor(java.lang.String vendor)voidsetUserName(java.lang.String username)The connection object presents this user identity to the EMS server.voidsetUserPassword(java.lang.String password)The connection object authenticates the user identity with this password.- 
Methods inherited from class com.tibco.tibjms.TibjmsxCFImpl_getCurrentUrl, buildXML, getClientID, getCurrentUrl, getMetric, getProperties, getReference, getUrl, readExternal, toString, writeExternal
 
- 
 
- 
- 
- 
Constructor Detail- 
TibjmsXAConnectionFactorypublic TibjmsXAConnectionFactory() 
 - 
TibjmsXAConnectionFactorypublic TibjmsXAConnectionFactory(java.lang.String serverUrl) 
 - 
TibjmsXAConnectionFactorypublic TibjmsXAConnectionFactory(java.lang.String serverUrl, java.lang.String clientId)
 - 
TibjmsXAConnectionFactorypublic TibjmsXAConnectionFactory(java.lang.String serverUrl, java.lang.String clientId, java.util.Map properties)
 
- 
 - 
Method Detail- 
createXAConnectionpublic XAConnection createXAConnection() throws JMSException Description copied from interface:XAConnectionFactoryCreates anXAConnectionwith the default user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.startmethod is explicitly called.- Specified by:
- createXAConnectionin interface- XAConnectionFactory
- Returns:
- a newly created XAConnection
- Throws:
- JMSException- if the Jakarta Messaging provider fails to create an XA connection due to some internal error.
- JMSSecurityException- if client authentication fails due to an invalid user name or password.
 
 - 
createXAConnectionpublic XAConnection createXAConnection(java.lang.String userName, java.lang.String password) throws JMSException Description copied from interface:XAConnectionFactoryCreates anXAConnectionwith the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.startmethod is explicitly called.- Specified by:
- createXAConnectionin interface- XAConnectionFactory
- Parameters:
- userName- the caller's user name
- password- the caller's password
- Returns:
- a newly created XAConnection
- Throws:
- JMSException- if the Jakarta Messaging provider fails to create an XA connection due to some internal error.
- JMSSecurityException- if client authentication fails due to an invalid user name or password.
 
 - 
createXAContextpublic XAJMSContext createXAContext() Description copied from interface:XAConnectionFactoryCreates aXAJMSContextwith the default user identityA connection and session are created for use by the new XAJMSContext. The connection is created in stopped mode but will be automatically started when aJMSConsumeris created.- Specified by:
- createXAContextin interface- XAConnectionFactory
- Returns:
- a newly created XAJMSContext
 
 - 
createXAContextpublic XAJMSContext createXAContext(java.lang.String userName, java.lang.String password) Description copied from interface:XAConnectionFactoryCreates a JMSContext with the specified user identityA connection and session are created for use by the new XAJMSContext. The connection is created in stopped mode but will be automatically started when aJMSConsumeris created.- Specified by:
- createXAContextin interface- XAConnectionFactory
- Parameters:
- userName- the caller's user name
- password- the caller's password
- Returns:
- a newly created JMSContext
 
 - 
createConnectionpublic Connection createConnection() throws JMSException - Throws:
- JMSException
 
 - 
createConnectionpublic Connection createConnection(java.lang.String userName, java.lang.String password) throws JMSException - Throws:
- JMSException
 
 - 
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
- clonein class- com.tibco.tibjms.TibjmsxCFImpl
- Throws:
- java.lang.CloneNotSupportedException
 
 - 
setServerUrlpublic void setServerUrl(java.lang.String serverUrl) throws JMSException- Throws:
- JMSException
 
 - 
setClientIDpublic void setClientID(java.lang.String clientID) throws JMSException- Throws:
- JMSException
 
 - 
setMetricpublic void setMetric(int metric) throws JMSException- Throws:
- JMSException
 
 - 
setConnAttemptCountpublic void setConnAttemptCount(int attempts) 
 - 
setConnAttemptDelaypublic void setConnAttemptDelay(int delay) 
 - 
setConnAttemptTimeoutpublic void setConnAttemptTimeout(int connectAttemptTimeout) 
 - 
setReconnAttemptCountpublic void setReconnAttemptCount(int attempts) 
 - 
setReconnAttemptDelaypublic void setReconnAttemptDelay(int delay) 
 - 
setReconnAttemptTimeoutpublic void setReconnAttemptTimeout(int reconnectAttemptTimeout) 
 - 
setUserNamepublic void setUserName(java.lang.String username) The connection object presents this user identity to the EMS server.
 When OAuth 2.0 is configured, this username is presented to the OAuth 2.0 authorization server via the resource owner password credentials grant. SeeTibjmsOAuthfor more information.- Parameters:
- username-
 
 - 
setUserPasswordpublic void setUserPassword(java.lang.String password) The connection object authenticates the user identity with this password.
 When OAuth 2.0 is configured, this password is presented to the OAuth 2.0 authorization server via the resource owner password credentials grant. SeeTibjmsOAuthfor more information.- Parameters:
- password-
 
 - 
setSSLVendorpublic void setSSLVendor(java.lang.String vendor) 
 - 
setSSLTracepublic void setSSLTrace(java.lang.Boolean trace) 
 - 
setSSLDebugTracepublic void setSSLDebugTrace(java.lang.Boolean debugTrace) 
 - 
setSSLEnableVerifyHostpublic void setSSLEnableVerifyHost(java.lang.Boolean enableVerifyHost) 
 - 
setSSLEnableVerifyHostNamepublic void setSSLEnableVerifyHostName(java.lang.Boolean enableVerifyHostName) 
 - 
setSSLExpectedHostNamepublic void setSSLExpectedHostName(java.lang.String expectedHostName) 
 - 
setSSLAuthOnlypublic void setSSLAuthOnly(java.lang.Boolean authOnly) 
 - 
setSSLTrustedCertificatepublic void setSSLTrustedCertificate(java.lang.String certificate) 
 - 
setSSLTrustedCertificatepublic void setSSLTrustedCertificate(java.lang.String certificate, java.lang.String trustedEncoding)
 - 
setSSLTrustedCertificatepublic void setSSLTrustedCertificate(byte[] certificate, java.lang.String trustedEncoding)
 - 
setSSLIssuerCertificatepublic void setSSLIssuerCertificate(java.lang.String certificate) 
 - 
setSSLIssuerCertificatepublic void setSSLIssuerCertificate(java.lang.String certificate, java.lang.String encoding)
 - 
setSSLIssuerCertificatepublic void setSSLIssuerCertificate(byte[] certificate, java.lang.String encoding)
 - 
setSSLIdentitypublic void setSSLIdentity(java.lang.String sslIdentity) 
 - 
setSSLIdentitypublic void setSSLIdentity(byte[] identity) 
 - 
setSSLIdentityEncodingpublic void setSSLIdentityEncoding(java.lang.String sslIdentityEncoding) 
 - 
setSSLPrivateKeypublic void setSSLPrivateKey(java.lang.String sslPrivateKey) 
 - 
setSSLPrivateKeypublic void setSSLPrivateKey(byte[] sslPrivateKey) 
 - 
setSSLPrivateKeyEncodingpublic void setSSLPrivateKeyEncoding(java.lang.String sslPrivateKeyEncoding) 
 - 
setSSLPasswordpublic void setSSLPassword(java.lang.String sslPassword) 
 - 
setSSLCipherSuitespublic void setSSLCipherSuites(java.lang.String suites) 
 - 
setSSLProxypublic void setSSLProxy(java.lang.String host, int port) throws JMSExceptionSet the connection factory's parameters for connecting through a TLS proxy. A TLS proxy lets an EMS application create a TLS connection to an EMS server, even though a firewall separates the application from the server. The proxy usually runs within the firewall's DMZ. A connection factory contacts the TLS proxy, requesting a TLS connection to the server. The proxy authenticates the application program, and mediates the initial TLS negotiation between application and server. After the TLS connection is established, the application and server use it to communicate directly with one another.- Parameters:
- host- the connection factory establishes TLS communication through a web proxy at this host. Supply a simple hostname, a fully qualified hostname with domain name, or an IP address (dot notation).
- port- the connection factory establishes TLS communication through a web proxy on this port.
- Throws:
- JMSException- if the proxy host is null or empty, the port is zero or the protocol of the connection factory's URL is not TLS.
 
 - 
setSSLProxyAuthpublic void setSSLProxyAuth(java.lang.String username, java.lang.String password) throws JMSExceptionSet a connection factory's username and password for connecting through a TLS proxy. When a connection factory establishes an EMS server connection through a TLS proxy host, the proxy might first require authentication before facilitating a connection. When required, use this call to set that authentication data on the connection factory. Notice that this proxy authentication data is distinct from the server authentication data, and from the TLS private key encryption password.- Parameters:
- username- the connection factory authenticates itself to the TLS proxy using this username.
- password- the connection factory authenticates itself to the TLS proxy using this password.
- Throws:
- JMSException- if the protocol of the connection factory's URL is not TLS.
 
 - 
getSSLProxyHostpublic java.lang.String getSSLProxyHost() throws JMSExceptionGet the TLS proxy host from this connection factory.- Returns:
- the host
- Throws:
- JMSException- if the protocol of the connection factory's URL is not TLS.
 
 - 
getSSLProxyPortpublic int getSSLProxyPort() throws JMSExceptionGet the TLS proxy port from this connection factory.- Returns:
- the port.
- Throws:
- JMSException- if the protocol of the connection factory's URL is not TLS.
 
 - 
getSSLProxyUserpublic java.lang.String getSSLProxyUser() throws JMSExceptionGet the TLS proxy username from a connection factory.- Returns:
- the username.
- Throws:
- JMSException- if the protocol of the connection factory's URL is not TLS.
 
 - 
getSSLProxyPasswordpublic java.lang.String getSSLProxyPassword() throws JMSExceptionGet the TLS proxy password from a connection factory.- Returns:
- the password.
- Throws:
- JMSException- if the protocol of the connection factory's URL is not TLS.
 
 - 
setOAuth2AccessTokenpublic void setOAuth2AccessToken(java.lang.String accessToken) Set the OAuth 2.0 access token that connections will present to the EMS server.- Parameters:
- accessToken-
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_ACCESS_TOKEN
 
 - 
setOAuth2TokenFetchCallbackpublic void setOAuth2TokenFetchCallback(TibjmsOAuth2TokenFetchCallback callback) Set theTibjmsOAuth2TokenFetchCallbackobject to be invoked when the client needs to fetch an OAuth 2.0 access token.- Parameters:
- callback-
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_TOKEN_FETCH_CALLBACK_OBJECT,- TibjmsOAuth2TokenFetchCallback
 
 - 
setOAuth2ServerUrlpublic void setOAuth2ServerUrl(java.lang.String serverUrl) Set the URL of the OAuth 2.0 authorization server that the client will request access tokens from.- Parameters:
- serverUrl-
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_SERVER_URL
 
 - 
setOAuth2ClientIdpublic void setOAuth2ClientId(java.lang.String clientId) Set the OAuth 2.0 client ID that the client will use when connecting to the OAuth 2.0 authorization server.- Parameters:
- clientId-
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_CLIENT_ID
 
 - 
setOAuth2ClientSecretpublic void setOAuth2ClientSecret(java.lang.String clientSecret) Set the OAuth 2.0 client secret that the client will use when connecting to the OAuth 2.0 authorization server.- Parameters:
- clientSecret-
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_CLIENT_SECRET
 
 - 
setOAuth2ServerTrustFilepublic void setOAuth2ServerTrustFile(java.lang.String serverTrustFile) Set the trust file path for verifying the identity of the secure OAuth 2.0 authorization server. The trust file set via this property must contain one or more PEM-encoded public certificates.- Parameters:
- serverTrustFile- The PEM-encoded certificate file path
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_SERVER_TRUST_FILE
 
 - 
setOAuth2ServerTrustFilepublic void setOAuth2ServerTrustFile(byte[] serverTrustFile) Set the trust contents for verifying the identity of the secure OAuth 2.0 authorization server. The byte array set via this property must contain one or more PEM-encoded public certificates.- Parameters:
- serverTrustFile- The PEM-encoded certificate, represented as raw bytes
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_SERVER_TRUST_FILE
 
 - 
setOAuth2DisableVerifyHostnamepublic void setOAuth2DisableVerifyHostname(boolean disableVerifyHostname) Set whether to disable client verification of the hostname in the secure OAuth 2.0 authorization server host's certificate.- Parameters:
- disableVerifyHostname-
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_DISABLE_VERIFY_HOSTNAME
 
 - 
setOAuth2ExpectedHostnamepublic void setOAuth2ExpectedHostname(java.lang.String expectedHostname) Set the hostname that is expected to be set in the secure OAuth 2.0 authorization server host's certificate.- Parameters:
- expectedHostname-
- Since:
- 10.4.0
- See Also:
- Tibjms.PROP_OAUTH2_EXPECTED_HOSTNAME
 
 - 
setMulticastEnabled@Deprecated public void setMulticastEnabled(boolean enabled) Deprecated.As of release 8.3Set whether MessageConsumers subscribed to a multicast-enabled topic will receive message over multicast.
 When enabled, MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
 The default is enabled.- Parameters:
- enabled-- trueto enable multicast,- falseto disable multicast
- Since:
- EMS 5.0
 
 - 
setMulticastDaemon@Deprecated public void setMulticastDaemon(java.lang.String port) Deprecated.As of release 8.3Set the port on which the EMS client will connect to the multicast daemon.
 A connection to the multicast daemon is required when multicast is enabled and a MessageConsumer is subscribed to a multicast-enabled topic.
 NOTE: setting the port with this method will overrided the default port supplied by the server.- Parameters:
- port- the port of the multicast daemon
- Since:
- EMS 5.0
 
 
- 
 
-