Class Tibjms
- java.lang.Object
- 
- com.tibco.tibjms.Tibjms
 
- 
 public class Tibjms extends java.lang.ObjectDefines optional custom methods, constants and System Properties used by TIBCO Enterprise Message Service client.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringDEFAULT_FACTORY_PASSWORDDefines the name of the ConnectionFactory property specifying default user password set for Connections created by the factory.static java.lang.StringDEFAULT_FACTORY_USERNAMEDefines the name of the ConnectionFactory property specifying default user name set for Connections created by the factory.static intEXPLICIT_CLIENT_ACKNOWLEDGEDefines explicit client acknowledge mode.static intEXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGEDefines explicit client acknowledge mode with dups_ok.static java.lang.StringFACTORY_CONNECT_ATTEMPT_COUNTDefines the name of the ConnectionFactory property specifying the maximum iterations a client program will go through its URL list until it establishes its first connection to an EMS server.static java.lang.StringFACTORY_CONNECT_ATTEMPT_DELAYDefines the name of the ConnectionFactory property specifying the interval between iterations a client program will try to establish its first connection to an EMS server.static java.lang.StringFACTORY_CONNECT_ATTEMPT_TIMEOUTDefines the name of the ConnectionFactory property specifying the maximum amount of time a client program will wait for the connection to be established to an EMS server
 This property is defined as String "com.tibco.tibjms.connect.attempttimeout".static java.lang.StringFACTORY_LOAD_BALANCE_METRICDefines the name of the ConnectionFactory property specifying the metric to be used for load balancing by the factory.static intFACTORY_LOAD_BALANCE_METRIC_BYTE_RATEIndicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the lowest total byte rate (input and output).static intFACTORY_LOAD_BALANCE_METRIC_CONNECTIONSIndicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the fewest number of connections.static intFACTORY_LOAD_BALANCE_METRIC_NONEIndicates that no load balancing metric has been set for the connection factory.static java.lang.StringFACTORY_MULTICAST_DAEMONDeprecated.As of release 8.3static java.lang.StringFACTORY_MULTICAST_ENABLEDDeprecated.As of release 8.3static java.lang.StringFACTORY_RECONNECT_ATTEMPT_COUNTDefines the name of the ConnectionFactory property specifying the maximum iterations a client program will try to re-establish a connection to an EMS server after losing previous connection.static java.lang.StringFACTORY_RECONNECT_ATTEMPT_DELAYDefines the name of the ConnectionFactory property specifying the interval between reconnection attempts.static java.lang.StringFACTORY_RECONNECT_ATTEMPT_TIMEOUTDefines the name of the ConnectionFactory property specifying the maximum amount of time a client program will wait for the connection to be re-established to an EMS server.static java.lang.StringJMS_TIBCO_CM_PUBLISHERProvider specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application.static java.lang.StringJMS_TIBCO_CM_SEQUENCEProvider specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application.static java.lang.StringJMS_TIBCO_COMPRESSProvider specific message property which is set by the application if this message should be compressed before it is sent to the server.static java.lang.StringJMS_TIBCO_DISABLE_SENDERProvider specific message property which may be set to prevent the server from including the user name into message when sending this message to consumers.static java.lang.StringJMS_TIBCO_IMPORTEDProvider specific message property which is set by the provider if the message has been imported from TIBCO Rendezvous or TIBCO FTL.static java.lang.StringJMS_TIBCO_MSG_EXTProvider specific message property which is set by the provider or the application when message extensions are used.static java.lang.StringJMS_TIBCO_MSG_TRACEProvider specific message property which can be set by the application if this message should be traced in the server and optionally in the client.static java.lang.StringJMS_TIBCO_PRESERVE_UNDELIVEREDProvider specific message property which is set by the application if this message should be placed into special system queue in case it could not be delivered.static java.lang.StringJMS_TIBCO_SENDERProvider specific message property which may be set in a received message if message has been sent on a destination with sender name property.static java.lang.StringJMS_TIBCO_SS_SENDERDeprecated.As of release 8.6static intNO_ACKNOWLEDGEDefines no acknowledge acknowledge mode.static intNPSEND_CHECK_ALWAYSDefines mode when producer always checks result of sending a NON_PERSISTENT message.static intNPSEND_CHECK_AUTHDefines mode when producer checks result of sending a NON_PERSISTENT message only when server authorization is enabled.static intNPSEND_CHECK_DEFAULTDefines default check mode for sending a NON_PERSISTENT messages.static intNPSEND_CHECK_NEVERDefines mode when producer never checks result of sending a NON_PERSISTENT message.static intNPSEND_CHECK_TEMP_AUTHDefines mode when producer checks result of sending a NON_PERSISTENT message when sending into temporary destination or if server authorization is enabled.static intNPSEND_CHECK_TEMP_DESTDefines mode when producer checks result of sending a NON_PERSISTENT message only when sending into temporary destination.static java.lang.StringPROP_CLOSE_IN_CALLBACKDefines the name of the System Property controlling if the Session.close(), Connection.close(), Connection.stop(), JMSContext.close() or JMSContext.stop() methods can be called in the MessageListener callback.static java.lang.StringPROP_CONNECT_ATTEMPT_TIMEOUTDefines the name of the System Property controlling the maximum time for the connections to connect to the server.static java.lang.StringPROP_CONNECT_ATTEMPTSDefines the name of the System Property controlling the number of attempts the connections make to connect to the server.static java.lang.StringPROP_DAEMON_DISPATCHERDefines the name of the System Property controlling the type of Session dispatcher threads.static java.lang.StringPROP_FT_EVENTS_EXCEPTIONDefines the name of the System Property controlling if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected.static java.lang.StringPROP_FT_SWITCH_EXCEPTIONDefines the name of the System Property controlling if ExceptionListener set on the Connection should be called after fault-tolerant switch.static java.lang.StringPROP_MESSAGE_ENCODINGDefines the name of the System Property setting the global encoding name for String values in the message properties and data fields.static java.lang.StringPROP_MULTICAST_DAEMONDeprecated.As of release 8.3static java.lang.StringPROP_MULTICAST_ENABLEDDeprecated.As of release 8.3static java.lang.StringPROP_OAUTH2_ACCESS_TOKENDefines the name of the ConnectionFactory property / System Property specifying the OAuth 2.0 access token that connections will use for all authentication attempts with the EMS server.static java.lang.StringPROP_OAUTH2_CLIENT_IDDefines the name of the ConnectionFactory property / System Property specifying the OAuth 2.0 client ID to use when connecting to the OAuth 2.0 authorization server.static java.lang.StringPROP_OAUTH2_CLIENT_SECRETDefines the name of the ConnectionFactory property / System Property specifying the OAuth 2.0 client secret to use when connecting to the OAuth 2.0 authorization server.static java.lang.StringPROP_OAUTH2_DISABLE_VERIFY_HOSTNAMEDefines the name of the ConnectionFactory property / System property specifying whether to disable client verification of the hostname in the secure OAuth 2.0 authorization server host's certificate.static java.lang.StringPROP_OAUTH2_EXPECTED_HOSTNAMEDefines the name of the ConnectionFactory property / System Property specifying the hostname expected to be set in the secure OAuth 2.0 authorization server host's certificate.static java.lang.StringPROP_OAUTH2_SERVER_TRUST_FILEDefines the name of the ConnectionFactory property / System property specifying either the path to a trust file, or a byte-array of the trust contents for verifying the identity of the secure OAuth 2.0 authorization server.static java.lang.StringPROP_OAUTH2_SERVER_URLDefines the name of the ConnectionFactory property / System Property specifying the HTTP or HTTPS URL of the OAuth 2.0 authorization server that will issue the OAuth 2.0 access tokens.static java.lang.StringPROP_OAUTH2_TOKEN_FETCH_CALLBACK_OBJECTDefines the name of the ConnectionFactory property specifying the object whoseonOAuth2TokenFetchRequestmethod will be invoked whenever a connection needs to acquire an OAuth 2.0 access token.static java.lang.StringPROP_PING_INTERVALDefines the name of the System Property setting the ping interval for inactive connections.static java.lang.StringPROP_RECONNECT_ATTEMPT_TIMEOUTDefines the name of the System Property controlling the maximum time for connections to reconnect to the backup server during the fault-tolerant switch.static java.lang.StringPROP_RECONNECT_ATTEMPTSDefines the name of the System Property controlling the number of attempt the connections make to reconnect to the backup server during the fault-tolerant switch.static java.lang.StringPROP_RESTORE_8_3_0_CONNECT_BEHAVIORStarting with 8.4, the TibjmsUFOConnectionFactory class uses the connect/reconnect system properties to control its connections.static java.lang.StringPROP_SOCKET_CONNECT_TIMEOUTDefines the name of the System Property controlling the low-level timeout of connecting the socket to the server.static java.lang.StringPROP_SOCKET_RECEIVEDefines the name of the System Property setting the size of the socket receive buffer size in kilobytes for client connections.static java.lang.StringPROP_SOCKET_SENDDefines the name of the System Property setting the size of the socket send buffer size in kilobytes for client connections.static java.lang.StringPROP_SSL_DEBUG_TRACEDefines the name of the System Property specifying debug tracing for TLS connections.static java.lang.StringPROP_SSL_TRACEDefines the name of the System Property specifying tracing for TLS connections.static java.lang.StringPROP_TRACE_FILEDefines the name of the System Property specifying the trace file name to be used when client tracing is enabled.
 This property is defined as String "tibco.tibjms.trace.file".static java.lang.StringPROP_TX_SEND_DEST_CHECKThe send or publish methods of theJMSProducer,MessageProducer,QueueSender, andTopicPublisherclasses that take aDestinationparameter throw and anInvalidDestinationRuntimeExceptionor anInvalidDestinationExceptionif the destination is invalid, unless they participate in a transaction, in which case the exception is deferred to the XA.end or local transaction commit.static intRELIABLE_DELIVERYDefines reliable delivery mode.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static intcalculateMessageSize(Message msg)Calculates and returns total size of the message wire representation.static MessagecreateFromBytes(byte[] bytes)Create a message from specified byte array.static booleangetAllowCallbackInClose()Deprecated.This method has been misnamed and replaced bygetAllowCloseInCallback.static booleangetAllowCloseInCallback()Returns if allowed to call close() in callbacks.static byte[]getAsBytes(Message message)Return a copy of the message data as a byte array, suitable for archiving in a file.static java.lang.StringgetConnectAttempts()Returns the connect attempts setting.static intgetConnectAttemptTimeout()Returns the connect attempt timeout valuestatic java.lang.StringgetConnectionActiveURL(Connection connection)Returns a string representing the URL of the server that this connection is currently connected to.static java.lang.StringgetConnectionActiveURL(JMSContext context)Returns a string representing the URL of the server that the connection used by this context is currently connected to.static java.lang.StringgetEncoding()Retursn global string encoding for messages.static booleangetExceptionOnFTEvents()Returns if exception listener is called on FT events (disconnected, reconnect attempt, and reconnected)static booleangetExceptionOnFTSwitch()Returns if exception listener is called on FT switch.static intgetMessageBodySize(Message msg)Returns the total wire size of the message body for a message which was received or sent.static java.lang.StringgetMessageEncoding(Message message)Returns string encoding name set for this message.static intgetMessageHeadersSize(Message msg)Returns the total wire size of the message headers for a message which was received or sent.static intgetMessagePropertiesSize(Message msg)Returns the total wire size of the message properties for a message which was received or sent.static intgetMessageSize(Message msg)Returns the total wire size of the message which was received or sent.static java.lang.StringgetMulticastDaemon()Deprecated.As of release 8.3static booleangetMulticastEnabled()Deprecated.As of release 8.3static intgetNPSendCheckMode(JMSProducer producer)Returns the mode defining when a producer checks the result of sending aNON_PERSISTENTmessage.static intgetNPSendCheckMode(MessageProducer producer)Returns the mode defining when a producer checks the result of sending aNON_PERSISTENTmessage.static intgetPingInterval()Returns the ping interval in seconds used by inactive connections.static java.lang.StringgetReconnectAttempts()Returns the reconnect attempts setting.static intgetReconnectAttemptTimeout()Returns the reconnect attempt timeout valuestatic booleangetSessionDispatcherDaemon()Returns if session dispatcher threads are daemon.static longgetSocketConnectTimeout()Returns the timeout in milliseconds used by low-level socket connect calls.static intgetSocketReceiveBufferSize()Returns the size of socket receive buffer.static intgetSocketSendBufferSize()Returns the size of socket send buffer.static booleanisConsumerMulticast(MessageConsumer consumer)Deprecated.As of release 8.3static voidmakeWriteable(Message message)Set message to writeable state without resetting its content.static voidrecoverMsg(Message msg)Recover a single message.static voidsetAllowCallbackInClose(boolean allow)Deprecated.This method has been misnamed and replaced bysetAllowCloseInCallback.static voidsetAllowCloseInCallback(boolean allow)Sets if the Session.close(), Connection.close(), Connection.stop(), JMSContext.close() or JMSContext.stop() methods can be called in the MessageListener callback.static voidsetConnectAttempts(java.lang.String specs)Sets the parameters for the number of attempts the connections make to connect to the server.static voidsetConnectAttemptTimeout(int timeout)Sets the parameter for the maxmimum amount of time a client will wait for the connection to be established.static voidsetEncoding(java.lang.String encodingName)Set global string encoding for messages.static voidsetExceptionOnFTEvents(boolean callExceptionListener)Sets if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected.static voidsetExceptionOnFTSwitch(boolean callExceptionListener)Sets if ExceptionListener set on the Connection should be called after fault-tolerant switch.static voidsetMessageEncoding(Message message, java.lang.String encodingName)Set string encoding for message.static voidsetMulticastDaemon(java.lang.String port)Deprecated.As of release 8.3static voidsetMulticastEnabled(boolean enabled)Deprecated.As of release 8.3static voidsetMulticastExceptionListener(TibjmsMulticastExceptionListener listener)Deprecated.As of release 8.3static voidsetNPSendCheckMode(JMSProducer producer, int mode)Set the mode defining when a producer should check the result of sending aNON_PERSISTENTmessage.static voidsetNPSendCheckMode(MessageProducer producer, int mode)Set the mode defining when a producer should check the result of sending aNON_PERSISTENTmessage.static voidsetPingInterval(int seconds)Sets the ping interval in seconds used by inactive connections.static voidsetReconnectAttempts(java.lang.String specs)Sets the parameter for the number of attempts the connections make to reconnect to the backup server during fault-tolerant switch.static voidsetReconnectAttemptTimeout(int timeout)Sets the parameter for the maxmimum amount of time a client will wait for the reconnect to complete.static voidsetSessionDispatcherDaemon(boolean makeDaemon)Sets if Session dispatcher threads should be daemon.static voidsetSocketConnectTimeout(long milliseconds)Sets the timeout in milliseconds used by low-level socket connect calls.static voidsetSocketReceiveBufferSize(int size)Sets the size of the socket receive buffer size for client connections.static voidsetSocketSendBufferSize(int size)Sets the size of the socket send buffer size for client connections.static voidsetTraceFile(java.lang.String fileName)Use this method to instruct the TIBCO EMS Client library to direct the tracing, that would normally go to stderr or stdout, to a file namedfileName.
 
- 
- 
- 
Field Detail- 
RELIABLE_DELIVERYpublic static final int RELIABLE_DELIVERY Defines reliable delivery mode. This delivery mode is a proprietary extension and when used offers increased performance of the message producers using this mode.
 This is defined as an integer value 22.- See Also:
- Constant Field Values
 
 - 
NO_ACKNOWLEDGEpublic static final int NO_ACKNOWLEDGE Defines no acknowledge acknowledge mode. This acknowledge mode is a proprietary extension and when used offers increased performance of the message consumers. Messages delivered to the sessions using this acknowledge mode do not require acknowledgement and are never redelivered regardless if the delivery has been successfull or not.
 This is defined as an integer value 22.- See Also:
- Constant Field Values
 
 - 
EXPLICIT_CLIENT_ACKNOWLEDGEpublic static final int EXPLICIT_CLIENT_ACKNOWLEDGE Defines explicit client acknowledge mode. This acknowledge mode is a proprietary extension. Sessions using this acknowledge mode must acknowledge each message explicitly calling the acknowledge() method for all messages. The application can call aknowledge() in any order. The general rule that acknowledging a message will acknowledge all previous messages does not apply.
 This is defined as an integer value 23.- See Also:
- Constant Field Values
 
 - 
EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGEpublic static final int EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE Defines explicit client acknowledge mode with dups_ok. This acknowledge mode is a proprietary extension. This acknowledge mode implements the same explicit acknowledge logic as the EXPLICIT_CLIENT_ACKNOWLEDGE mode. However while EXPLICIT_CLIENT_ACKNOWLEDGE guarantees the success of the acknowledge operation upon return, this mode does not and, similarly to DUPS_OK_ACKNOWLEDGE mode, acknowledges message lazily with the possibility that some acknowledged messages may be redelivered. Like for EXPLICIT_CLIENT_ACKNOWLEDGE, this mode requires a EMS application to explicitly call acknowledge() method, in any order, for each message it wants to acknowledge.
 This is defined as an integer value 24.- See Also:
- Constant Field Values
 
 - 
NPSEND_CHECK_DEFAULTpublic static final int NPSEND_CHECK_DEFAULT Defines default check mode for sending a NON_PERSISTENT messages.
 - 
NPSEND_CHECK_ALWAYSpublic static final int NPSEND_CHECK_ALWAYS Defines mode when producer always checks result of sending a NON_PERSISTENT message.
 - 
NPSEND_CHECK_NEVERpublic static final int NPSEND_CHECK_NEVER Defines mode when producer never checks result of sending a NON_PERSISTENT message.
 - 
NPSEND_CHECK_TEMP_DESTpublic static final int NPSEND_CHECK_TEMP_DEST Defines mode when producer checks result of sending a NON_PERSISTENT message only when sending into temporary destination.
 - 
NPSEND_CHECK_AUTHpublic static final int NPSEND_CHECK_AUTH Defines mode when producer checks result of sending a NON_PERSISTENT message only when server authorization is enabled.
 - 
NPSEND_CHECK_TEMP_AUTHpublic static final int NPSEND_CHECK_TEMP_AUTH Defines mode when producer checks result of sending a NON_PERSISTENT message when sending into temporary destination or if server authorization is enabled.
 - 
JMS_TIBCO_IMPORTEDpublic static final java.lang.String JMS_TIBCO_IMPORTED Provider specific message property which is set by the provider if the message has been imported from TIBCO Rendezvous or TIBCO FTL.
 This property is defined as String "JMS_TIBCO_IMPORTED".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_SENDERpublic static final java.lang.String JMS_TIBCO_SENDER Provider specific message property which may be set in a received message if message has been sent on a destination with sender name property. When set in the message, the property value is a String specifying the name of the user who sent this message.
 This property is defined as String "JMS_TIBCO_SENDER".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_DISABLE_SENDERpublic static final java.lang.String JMS_TIBCO_DISABLE_SENDER Provider specific message property which may be set to prevent the server from including the user name into message when sending this message to consumers. This property is ignored by the server if the destination is specified to enforce the inclusion of the user name. This property, if used, must be set to boolean value 'true' by the message producer before sending the message.
 This property is defined as String "JMS_TIBCO_DISABLE_SENDER".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_SS_SENDER@Deprecated public static final java.lang.String JMS_TIBCO_SS_SENDER Deprecated.As of release 8.6Provider specific message property which is set if imported message has been published by TIBCO SmartSockets application. Property value is a String specifying the SmartSockets sender name.
 This property is defined as String "JMS_TIBCO_SS_SENDER".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_CM_PUBLISHERpublic static final java.lang.String JMS_TIBCO_CM_PUBLISHER Provider specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application. When set in the imported message, the property value is a String specifying the CM publisher name.
 This property is defined as String "JMS_TIBCO_CM_PUBLISHER".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_CM_SEQUENCEpublic static final java.lang.String JMS_TIBCO_CM_SEQUENCE Provider specific message property which may be set if imported message has been published by TIBCO Rendezvous Certified Messaging application. When set in the imported message, the property value is long number specifying the CM sequence number of the imported message.
 This property is defined as String "JMS_TIBCO_CM_SEQUENCE".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_MSG_EXTpublic static final java.lang.String JMS_TIBCO_MSG_EXT Provider specific message property which is set by the provider or the application when message extensions are used. Message extensions allow to include StreamMessage and MapMessage objects as well as arrays of primitive types as values into StreamMessage and MapMessage messages.
 This property is defined as String "JMS_TIBCO_MSG_EXT".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_MSG_TRACEpublic static final java.lang.String JMS_TIBCO_MSG_TRACE Provider specific message property which can be set by the application if this message should be traced in the server and optionally in the client. Value of this property can be an empty string ornull, or a string "body" if message trace should print the message data fields.
 This property is defined as String "JMS_TIBCO_MSG_TRACE".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_COMPRESSpublic static final java.lang.String JMS_TIBCO_COMPRESS Provider specific message property which is set by the application if this message should be compressed before it is sent to the server.
 This property is defined as String "JMS_TIBCO_COMPRESS".- See Also:
- Constant Field Values
 
 - 
JMS_TIBCO_PRESERVE_UNDELIVEREDpublic static final java.lang.String JMS_TIBCO_PRESERVE_UNDELIVERED Provider specific message property which is set by the application if this message should be placed into special system queue in case it could not be delivered.
 This property is defined as String "JMS_TIBCO_PRESERVE_UNDELIVERED".- See Also:
- Constant Field Values
 
 - 
PROP_MESSAGE_ENCODINGpublic static final java.lang.String PROP_MESSAGE_ENCODING Defines the name of the System Property setting the global encoding name for String values in the message properties and data fields. This property is defined as String "tibco.tibjms.msg.encoding".- See Also:
- Constant Field Values
 
 - 
PROP_SOCKET_RECEIVEpublic static final java.lang.String PROP_SOCKET_RECEIVE Defines the name of the System Property setting the size of the socket receive buffer size in kilobytes for client connections. The value of this property is a string encoding the number of kilobytes, e.g. "256". Some operating systems may ignore this setting.
 This property is defined as String "tibco.tibjms.socket.receive".- See Also:
- Constant Field Values
 
 - 
PROP_SOCKET_SENDpublic static final java.lang.String PROP_SOCKET_SEND Defines the name of the System Property setting the size of the socket send buffer size in kilobytes for client connections. The value of this property is a string encoding the number of kilobytes, e.g. "256". Some operating systems may ignore this setting.
 This property is defined as String "tibco.tibjms.socket.send".- See Also:
- Constant Field Values
 
 - 
PROP_DAEMON_DISPATCHERpublic static final java.lang.String PROP_DAEMON_DISPATCHER Defines the name of the System Property controlling the type of Session dispatcher threads. When EMS application uses message listeners, TIBCO Enterprise Message Service client creates internal dispatcher threads for each Session which has at least one asynchronous message consumer. By default those dispatcher threads are not set to be daemon threads. If this system property is defined then the Session dispatcher threads will be created as daemon threads.
 This property is defined as String "tibco.tibjms.daemon.dispatcher".- See Also:
- Constant Field Values
 
 - 
PROP_FT_SWITCH_EXCEPTIONpublic static final java.lang.String PROP_FT_SWITCH_EXCEPTION Defines the name of the System Property controlling if ExceptionListener set on the Connection should be called after fault-tolerant switch. When EMS application performs fault-tolerant switch it may notify the Connection's ExceptionListener by calling it with JMSException providing the information about fault-tolerant switch. If this property is set, the Connection's ExceptionListener is called with the JMSException which has the vendor error code (JMSException.getErrorCode()) set to the String in the form:
 FT-SWITCH: <new-server-url> An EMS application can recognize such calls by analyzing the error code in the passed JMSException and perform necessary actions. Notice that the ExceptionListener is called with the special JMSException only when fault-tolerant switch has been performed succesfully. In case the fault-tolerant switch has failed, the Connection's ExceptionListener will be called with regular JMSException (it will not have error code in the form 'FT-SWITCH: <new-server-url>') specifying that the connection to EMS Server has been terminated. Notice that if this property is not set then by default Connection's ExceptionListener is not called after a successfull fault-tolerant switch.
 This property is defined as String "tibco.tibjms.ft.switch.exception". NOTE: when the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.- See Also:
- Constant Field Values
 
 - 
PROP_FT_EVENTS_EXCEPTIONpublic static final java.lang.String PROP_FT_EVENTS_EXCEPTION Defines the name of the System Property controlling if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected. Similarly toPROP_FT_SWITCH_EXCEPTION, if this property is set and if a Connection's ExceptionListener is set, (and the connection has FT urls), then all above events will trigger the call to the ExceptionListener.onException callback with a JMSException which has the vendor error code (JMSException.getErrorCode()) set to the String in the form:FT-SWITCH: event where event is:
 - Disconnected from server url, will attempt to reconnect
- Reconnecting to next server url, attempt n out of m
- Reconnected to server url
 
 An EMS application can recognize such calls by analyzing the error code in the passed JMSException and perform necessary actions. Notice that this property replaces the property Tibjms.PROP_FT_SWITCH_EXCEPTION, which means that if both are set, only one "reconnected" event will be passed to the ExceptionListener.onException callback (the one described above). We recommend that if Tibjms.PROP_FT_SWITCH_EXCEPTION was formerly used, and the user wishes to capture all FT events, this new property be used instead and the ExceptionListener.onException callback modified to handle these new vendor error codes.
 This property is defined as String "tibco.tibjms.ft.events.exception".
 NOTE: when the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.- See Also:
- Constant Field Values
 
 - 
PROP_CLOSE_IN_CALLBACKpublic static final java.lang.String PROP_CLOSE_IN_CALLBACK Defines the name of the System Property controlling if the Session.close(), Connection.close(), Connection.stop(), JMSContext.close() or JMSContext.stop() methods can be called in the MessageListener callback. According to the Jakarta Messaging 2.0 specification, calling any of these methods must trigger an IllegalStateException or an IllegalStateRuntimeException. If this property is set then the close() or the stop() method can be called inside the callback and it will not throw an exception and will proceed without waiting for the same callback to return.
 This property is defined as String "tibco.tibjms.close.in.callback".- See Also:
- Constant Field Values
 
 - 
PROP_SOCKET_CONNECT_TIMEOUTpublic static final java.lang.String PROP_SOCKET_CONNECT_TIMEOUT Defines the name of the System Property controlling the low-level timeout of connecting the socket to the server. This only used with Java version 1.4.0 or higher. Default value used is "3000".
 This property is defined as String "tibco.tibjms.socket.connect.timeout".- See Also:
- Constant Field Values
 
 - 
PROP_CONNECT_ATTEMPTSpublic static final java.lang.String PROP_CONNECT_ATTEMPTS Defines the name of the System Property controlling the number of attempts the connections make to connect to the server. When too many clients connect to the same server, the server may not be able to accept all connections at the same time. This parameter specifies the number of attempts and delay between the attempt the connections perform in order to connect to the server. The value of this property is a String in the form "NN[,DELAY]" where NN is the number of attempts and DELAY is delay in milliseconds between the attempts. Minimum value of NN is 1, minimum value of DELAY is 250 milliseconds. Default value used is "2,500".
 This property is defined as String "tibco.tibjms.connect.attempts".- See Also:
- Constant Field Values
 
 - 
PROP_RECONNECT_ATTEMPTSpublic static final java.lang.String PROP_RECONNECT_ATTEMPTS Defines the name of the System Property controlling the number of attempt the connections make to reconnect to the backup server during the fault-tolerant switch. This property is similar to PROP_CONNECT_ATTEMPTS. The difference is that it may be necessary to use different parameters during reconnect than during the initial connect. Initial connect of the clients to the server is normally distributed in time and there are less chances of the server exceeding its maximum accept queue. During fault-tolerant switch, all connected clients automatically try to reconnect to the backup server, approximately at the same time. When the number of connections is large, it may require more attempts to reconnect than the initial connect. The value of this property is a String in the form "NN[,DELAY]" where NN is the number of attempts and DELAY is delay in milliseconds between the attempts. Minimum value of NN is 1, minimum value of DELAY is 250 milliseconds. Default value used is "4,500".
 This property is defined as String "tibco.tibjms.reconnect.attempts".- See Also:
- Constant Field Values
 
 - 
PROP_PING_INTERVALpublic static final java.lang.String PROP_PING_INTERVAL Defines the name of the System Property setting the ping interval for inactive connections. When a connection does not send nor receives any data, it may not be able to detect network failure in certain situations. To avoid this, inactive connections periodically send "ping" messages to the server. Default interval is 60 seconds. In some cases it may take several intervals to detect network failure. The value of this property is a string encoding the ping interval in seconds, e.g. "60". Zero value disables ping messages.
 This property is defined as String "tibco.tibjms.ping.interval".- See Also:
- Constant Field Values
 
 - 
PROP_CONNECT_ATTEMPT_TIMEOUTpublic static final java.lang.String PROP_CONNECT_ATTEMPT_TIMEOUT Defines the name of the System Property controlling the maximum time for the connections to connect to the server. When too many clients connect to the same server, the server may not be able to accept all connections at the same time or may run out of system resources. This parameter specifies the amount of time a client is willing to wait for a connection to be established. Internally the client library will tear down any hung connections (either because of non-availability of system resources or some other EMS server problem) after this timeout. The value of this property in an integer and is in milliseconds. This property is defined as String "tibco.tibjms.connect.attempt.timeout".- See Also:
- Constant Field Values
 
 - 
PROP_RECONNECT_ATTEMPT_TIMEOUTpublic static final java.lang.String PROP_RECONNECT_ATTEMPT_TIMEOUT Defines the name of the System Property controlling the maximum time for connections to reconnect to the backup server during the fault-tolerant switch. This property is similar to PROP_CONNECT_ATTEMPTS_TIMEOUT. The difference is that it may be necessary to use different parameters during reconnect than during the initial connect. Initial connect of the clients to the server is normally distributed in time and there are less chances of the server exceeding its maximum accept queue. During fault-tolerant switch, all connected clients automatically try to reconnect to the backup server, approximately at the same time. When the number of connections is large, it may require more reconnect time to reconnect than the initial connect. The value of this property is an integer in milliseconds. This property is defined as String "tibco.tibjms.reconnect.attempt.timeout".- See Also:
- Constant Field Values
 
 - 
PROP_RESTORE_8_3_0_CONNECT_BEHAVIORpublic static final java.lang.String PROP_RESTORE_8_3_0_CONNECT_BEHAVIOR Starting with 8.4, the TibjmsUFOConnectionFactory class uses the connect/reconnect system properties to control its connections. Furthermore, it now directly controls the connect/reconnect behavior of the TibjmsConnectionFactory that it uses internally. In earlier versions, the connect/reconnect system properties directly affected the internal TibjmsConnectionFactory used by the TibjmsUFOConnectionFactory. This resulted in unexpected connection/reconnect behavior when using UFO. If need be, you can revert to the pre-8.4 behavior by setting PROP_RESTORE_8_3_0_CONNECT_BEHAVIOR to 'true'.
 This property is defined as String "tibco.tibems.ufo.restore.8.3.0.connect.behavior".- Since:
- EMS 8.4
- See Also:
- Constant Field Values
 
 - 
PROP_TX_SEND_DEST_CHECKpublic static final java.lang.String PROP_TX_SEND_DEST_CHECK The send or publish methods of theJMSProducer,MessageProducer,QueueSender, andTopicPublisherclasses that take aDestinationparameter throw and anInvalidDestinationRuntimeExceptionor anInvalidDestinationExceptionif the destination is invalid, unless they participate in a transaction, in which case the exception is deferred to the XA.end or local transaction commit. If PROP_TX_SEND_DEST_CHECK is set to 'true', that exception will be thrown in the send or publish method even for transactions.
 This property is defined as String "tibco.tibjms.tx.send.dest.check".- Since:
- EMS 8.6
- See Also:
- Constant Field Values
 
 - 
PROP_SSL_TRACEpublic static final java.lang.String PROP_SSL_TRACE Defines the name of the System Property specifying tracing for TLS connections.
 This property is defined as String "tibco.tibjms.ssl.trace".- See Also:
- Constant Field Values
 
 - 
PROP_SSL_DEBUG_TRACEpublic static final java.lang.String PROP_SSL_DEBUG_TRACE Defines the name of the System Property specifying debug tracing for TLS connections.
 This property is defined as String "tibco.tibjms.ssl.debug.trace".- See Also:
- Constant Field Values
 
 - 
PROP_MULTICAST_ENABLED@Deprecated public static final java.lang.String PROP_MULTICAST_ENABLED Deprecated.As of release 8.3Defines the name of the System Property specifying whether multicast is enabled or disabled for this EMS client.
 This property is defined as String "tibco.tibjms.multicast.enabled".- See Also:
- Constant Field Values
 
 - 
PROP_MULTICAST_DAEMON@Deprecated public static final java.lang.String PROP_MULTICAST_DAEMON Deprecated.As of release 8.3Defines the name of the System Property specifying the port on which EMS clients will connect to the multicast daemon.
 This property is defined as String "tibco.tibjms.multicast.daemon".- See Also:
- Constant Field Values
 
 - 
PROP_TRACE_FILEpublic static final java.lang.String PROP_TRACE_FILE Defines the name of the System Property specifying the trace file name to be used when client tracing is enabled.
 This property is defined as String "tibco.tibjms.trace.file".- See Also:
- Constant Field Values
 
 - 
DEFAULT_FACTORY_USERNAMEpublic static final java.lang.String DEFAULT_FACTORY_USERNAME Defines the name of the ConnectionFactory property specifying default user name set for Connections created by the factory.
 This property is defined as String "com.tibco.tibjms.factory.username".- See Also:
- Constant Field Values
 
 - 
DEFAULT_FACTORY_PASSWORDpublic static final java.lang.String DEFAULT_FACTORY_PASSWORD Defines the name of the ConnectionFactory property specifying default user password set for Connections created by the factory.
 This property is defined as String "com.tibco.tibjms.factory.password".- See Also:
- Constant Field Values
 
 - 
FACTORY_LOAD_BALANCE_METRICpublic static final java.lang.String FACTORY_LOAD_BALANCE_METRIC Defines the name of the ConnectionFactory property specifying the metric to be used for load balancing by the factory.
 This property is defined as String "com.tibco.tibjms.factory.metric".- See Also:
- Constant Field Values
 
 - 
FACTORY_LOAD_BALANCE_METRIC_NONEpublic static final int FACTORY_LOAD_BALANCE_METRIC_NONE Indicates that no load balancing metric has been set for the connection factory.- See Also:
- Constant Field Values
 
 - 
FACTORY_LOAD_BALANCE_METRIC_CONNECTIONSpublic static final int FACTORY_LOAD_BALANCE_METRIC_CONNECTIONS Indicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the fewest number of connections.- See Also:
- Constant Field Values
 
 - 
FACTORY_LOAD_BALANCE_METRIC_BYTE_RATEpublic static final int FACTORY_LOAD_BALANCE_METRIC_BYTE_RATE Indicates that the connection factory load balances connections across multiple servers by creating a connection to the server with the lowest total byte rate (input and output).- See Also:
- Constant Field Values
 
 - 
FACTORY_CONNECT_ATTEMPT_COUNTpublic static final java.lang.String FACTORY_CONNECT_ATTEMPT_COUNT Defines the name of the ConnectionFactory property specifying the maximum iterations a client program will go through its URL list until it establishes its first connection to an EMS server.
 This property is defined as String "com.tibco.tibjms.connect.attemptcount"- See Also:
- Constant Field Values
 
 - 
FACTORY_CONNECT_ATTEMPT_DELAYpublic static final java.lang.String FACTORY_CONNECT_ATTEMPT_DELAY Defines the name of the ConnectionFactory property specifying the interval between iterations a client program will try to establish its first connection to an EMS server.
 This property is defined as String "com.tibco.tibjms.connect.attemptdelay"- See Also:
- Constant Field Values
 
 - 
FACTORY_CONNECT_ATTEMPT_TIMEOUTpublic static final java.lang.String FACTORY_CONNECT_ATTEMPT_TIMEOUT Defines the name of the ConnectionFactory property specifying the maximum amount of time a client program will wait for the connection to be established to an EMS server
 This property is defined as String "com.tibco.tibjms.connect.attempttimeout".- See Also:
- Constant Field Values
 
 - 
FACTORY_RECONNECT_ATTEMPT_COUNTpublic static final java.lang.String FACTORY_RECONNECT_ATTEMPT_COUNT Defines the name of the ConnectionFactory property specifying the maximum iterations a client program will try to re-establish a connection to an EMS server after losing previous connection.
 This property is defined as String "com.tibco.tibjms.reconnect.attemptcount".- See Also:
- Constant Field Values
 
 - 
FACTORY_RECONNECT_ATTEMPT_DELAYpublic static final java.lang.String FACTORY_RECONNECT_ATTEMPT_DELAY Defines the name of the ConnectionFactory property specifying the interval between reconnection attempts.
 This property is defined as String "com.tibco.tibjms.reconnect.attemptdelay".- See Also:
- Constant Field Values
 
 - 
FACTORY_RECONNECT_ATTEMPT_TIMEOUTpublic static final java.lang.String FACTORY_RECONNECT_ATTEMPT_TIMEOUT Defines the name of the ConnectionFactory property specifying the maximum amount of time a client program will wait for the connection to be re-established to an EMS server.
 This property is defined as String "com.tibco.tibjms.reconnect.attempttimeout".- See Also:
- Constant Field Values
 
 - 
PROP_OAUTH2_ACCESS_TOKENpublic static final java.lang.String PROP_OAUTH2_ACCESS_TOKEN Defines the name of the ConnectionFactory property / System Property specifying the OAuth 2.0 access token that connections will use for all authentication attempts with the EMS server.NOTE: See TibjmsOAuthfor an overview of OAuth 2.0 support in the client.
 If an access token is configured through this property, connections will always use that access token for authentication with the EMS server. Connections will not attempt to obtain access tokens using OAuth 2.0 grants (seePROP_OAUTH2_SERVER_URL) or user-defined callbacks (seePROP_OAUTH2_TOKEN_FETCH_CALLBACK_OBJECT).
 In the event of access token expiration, connections that use OAuth 2.0 grants or user-defined callbacks will automatically obtain a new access token and re-authenticate with the EMS server. However, connections that use a configured access token will not be able to handle this scenario and will experience authentication failures.
 This property is defined as String "com.tibco.tibjms.oauth2.access.token". If set as a ConnectionFactory property it applies to all connections created using that factory. If set as a System Property it applies to all connections created by the client library. The environment variableTIBEMS_OAUTH2_ACCESS_TOKENserves as an equivalent to the System Property.
 System properties can be set programmatically, or by passing the -D option when starting the Java client application. For example,java -Dcom.tibco.tibjms.oauth2.access.token=access_token_string ... - Since:
- EMS 10.3
- See Also:
- Constant Field Values
 
 - 
PROP_OAUTH2_SERVER_URLpublic static final java.lang.String PROP_OAUTH2_SERVER_URL Defines the name of the ConnectionFactory property / System Property specifying the HTTP or HTTPS URL of the OAuth 2.0 authorization server that will issue the OAuth 2.0 access tokens.NOTE: See TibjmsOAuthfor an overview of OAuth 2.0 support in the client.
 When this property is set along withPROP_OAUTH2_CLIENT_IDandPROP_OAUTH2_CLIENT_SECRET, connections will automatically request access tokens from an OAuth 2.0 authorization server using OAuth 2.0 grants and use them to authenticate with the EMS server.
 Two OAuth 2.0 grant types are supported for obtaining access tokens in this manner: client credentials grant and resource owner password credentials grant. If the 'userName' parameter for the connection creation method is null, the client credentials grant is used. If the 'userName' parameter is not null, the resource owner password credentials grant is used, with the 'userName' and 'password' parameter values serving as the username and password credentials for the grant.
 Refresh tokens are supported when using the resource owner password credentials grant type. If the authorization server issues a refresh token along with the requested access token, the connection object will use that refresh token instead of the grant the next time it needs to request an access token. If it fails to obtain a new access token using the refresh token, it will try again using the grant.
 This property is defined as String "com.tibco.tibjms.oauth2.server.url". If set as a ConnectionFactory property it applies to all connections created using that factory. If set as a System Property it applies to all connections created by the client library. The environment variableTIBEMS_OAUTH2_SERVER_URLserves as an alternative to the System Property.
 System properties can be set programmatically, or by passing the -D option when starting the Java client application. For example,java -Dcom.tibco.tibjms.oauth2.server.url=https://oauth2_server_url/token_endpoint ... - Since:
- EMS 10.3
- See Also:
- Constant Field Values
 
 - 
PROP_OAUTH2_CLIENT_IDpublic static final java.lang.String PROP_OAUTH2_CLIENT_ID Defines the name of the ConnectionFactory property / System Property specifying the OAuth 2.0 client ID to use when connecting to the OAuth 2.0 authorization server.This property must be set along with PROP_OAUTH2_SERVER_URLandPROP_OAUTH2_CLIENT_SECRETin order to successfully request access tokens from an OAuth 2.0 authorization server using an OAuth 2.0 grant.
 This property is defined as String "com.tibco.tibjms.oauth2.client.id". If set as a ConnectionFactory property it applies to all connections created using that factory. If set as a System Property it applies to all connections created by the client library. The environment variableTIBEMS_OAUTH2_CLIENT_IDserves as an alternative to the System Property.
 System properties can be set programmatically, or by passing the -D option when starting the Java client application. For example,java -Dcom.tibco.tibjms.oauth2.client.id=client_id_string ... - Since:
- EMS 10.3
- See Also:
- Constant Field Values
 
 - 
PROP_OAUTH2_CLIENT_SECRETpublic static final java.lang.String PROP_OAUTH2_CLIENT_SECRET Defines the name of the ConnectionFactory property / System Property specifying the OAuth 2.0 client secret to use when connecting to the OAuth 2.0 authorization server.This property must be set along with PROP_OAUTH2_SERVER_URLandPROP_OAUTH2_CLIENT_IDin order to successfully request access tokens from an OAuth 2.0 authorization server using an OAuth 2.0 grant.
 This property is defined as String "com.tibco.tibjms.oauth2.client.secret". If set as a ConnectionFactory property it applies to all connections created using that factory. If set as a System Property it applies to all connections created by the client library. The environment variableTIBEMS_OAUTH2_CLIENT_SECRETserves as an alternative to the System Property.
 System properties can be set programmatically, or by passing the -D option when starting the Java client application. For example,java -Dcom.tibco.tibjms.oauth2.client.secret=client_secret_string ... - Since:
- EMS 10.3
- See Also:
- Constant Field Values
 
 - 
PROP_OAUTH2_TOKEN_FETCH_CALLBACK_OBJECTpublic static final java.lang.String PROP_OAUTH2_TOKEN_FETCH_CALLBACK_OBJECT Defines the name of the ConnectionFactory property specifying the object whoseonOAuth2TokenFetchRequestmethod will be invoked whenever a connection needs to acquire an OAuth 2.0 access token.NOTE: See TibjmsOAuthfor an overview of OAuth 2.0 support in the client.
 ConnectionFactory objects can be configured to create connections capable of directly contacting an OAuth 2.0 provider and requesting access tokens. If you wish to instead procure access tokens via an external mechanism and provide them directly to your connections, you can use this ConnectionFactory property to provide an instance of a class that implements theTibjmsOAuth2TokenFetchCallbackinterface. Connections created using the factory will invoke theonOAuth2TokenFetchRequestmethod from the instance whenever they require an access token for authentication.
 If this ConnectionFactory property is set, connections created using the factory will never attempt to request access tokens from an OAuth 2.0 authorization server using an OAuth 2.0 grant - even if the relevant OAuth 2.0 properties were set for the factory.
 If a ConnectionFactory object is configured with both an access token (seePROP_OAUTH2_ACCESS_TOKEN) and a user-defined callback, connections created using the factory will always use the access token for authentication.
 This property is defined as String "com.tibco.tibjms.oauth2.token.fetch.callback.object".- Since:
- EMS 10.3
- See Also:
- Constant Field Values
 
 - 
PROP_OAUTH2_SERVER_TRUST_FILEpublic static final java.lang.String PROP_OAUTH2_SERVER_TRUST_FILE Defines the name of the ConnectionFactory property / System property specifying either the path to a trust file, or a byte-array of the trust contents for verifying the identity of the secure OAuth 2.0 authorization server.The trust set via this property must contain one or more PEM-encoded public certificates that will be used to validate the certificate presented by the secure OAuth 2.0 authorization server host. 
 The trust does not need to be set if connecting to an OAuth 2.0 authorization server with an HTTP URL.
 This property is defined as String "com.tibco.tibjms.oauth2.server.trust.file". If set as a ConnectionFactory property it applies to all connections created using that factory. If set as a System Property it applies to all connections created by the client library. The environment variableTIBEMS_OAUTH2_SERVER_TRUST_FILEserves as an alternative to the System Property.
 System properties can be set programmatically, or by passing the -D option when starting the Java client application. For example,java -Dcom.tibco.tibjms.oauth2.server.trust.file=/path/to/trustfile ... - Since:
- EMS 10.3
- See Also:
- Constant Field Values
 
 - 
PROP_OAUTH2_DISABLE_VERIFY_HOSTNAMEpublic static final java.lang.String PROP_OAUTH2_DISABLE_VERIFY_HOSTNAME Defines the name of the ConnectionFactory property / System property specifying whether to disable client verification of the hostname in the secure OAuth 2.0 authorization server host's certificate.Unless this property is explicitly set to 'true', client verification of the host name in the secure OAuth 2.0 authorization server host's certificate is always performed by default. 
 This property is defined as String "com.tibco.tibjms.oauth2.disable.verify.hostname". If set as a ConnectionFactory property it applies to all connections created using that factory. If set as a System Property it applies to all connections created by the client library. The environment variableTIBEMS_OAUTH2_DISABLE_VERIFY_HOSTNAMEserves as an alternative to the System Property.
 System properties can be set programmatically, or by passing the -D option when starting the Java client application. For example,java -Dcom.tibco.tibjms.oauth2.disable.verify.hostname=true ... - Since:
- EMS 10.3
- See Also:
- Constant Field Values
 
 - 
PROP_OAUTH2_EXPECTED_HOSTNAMEpublic static final java.lang.String PROP_OAUTH2_EXPECTED_HOSTNAME Defines the name of the ConnectionFactory property / System Property specifying the hostname expected to be set in the secure OAuth 2.0 authorization server host's certificate.The expected host name set via this property is used to validate the actual host name found in the secure OAuth 2.0 authorization server host's certificate. If not set, the expected host name defaults to the name of the authorization server's host. This verification is only performed if host name verification has not been explicitly disabled by setting the PROP_OAUTH2_DISABLE_VERIFY_HOSTNAMEproperty to 'true'.
 This property is defined as String "com.tibco.tibjms.oauth2.expected.hostname". If set as a ConnectionFactory property it applies to all connections created using that factory. If set as a System Property it applies to all connections created by the client library. The environment variableTIBEMS_OAUTH2_EXPECTED_HOSTNAMEserves as an alternative to the System Property.
 System properties can be set programmatically, or by passing the -D option when starting the Java client application. For example,java -Dcom.tibco.tibjms.oauth2.expected.hostname=expected_hostname ... - Since:
- EMS 10.3
- See Also:
- Constant Field Values
 
 - 
FACTORY_MULTICAST_ENABLED@Deprecated public static final java.lang.String FACTORY_MULTICAST_ENABLED Deprecated.As of release 8.3Defines the name of the ConnectionFactory property specifying whether MessageConsumers subscribed to a multicast-enabled topic are to receive messages over multicast.
 This property is defined as String "com.tibco.tibjms.multicast.enabled".- See Also:
- Constant Field Values
 
 - 
FACTORY_MULTICAST_DAEMON@Deprecated public static final java.lang.String FACTORY_MULTICAST_DAEMON Deprecated.As of release 8.3Defines the name of the ConnectionFactory property specifying the port of the multicast daemon used by MessageConsumers subscribed to multicast-enabled topics.
 This property is defined as String "com.tibco.tibjms.multicast.daemon".- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getMessageSizepublic static int getMessageSize(Message msg) Returns the total wire size of the message which was received or sent. If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method as well as getMessageBodySize and similar. Notice that total wire size of the message is the exact number of bytes sent over the network when an application sends the message. The total wire size of the message may be slightly greater than the summ of the wire size of message headers, properties and the body, due to extra control information encoded in the overal message wire representation. If the body of the message is compressed, this method returns the size of the wire representation using compressed body bytes. Notice that the server may add additional control information into the message before sending it to consumers. Thus the size of the received message is normally slightly bigger than the size of the same message when it was sent.- Throws:
- java.lang.IllegalArgumentException- if parameter is null or is a foreign Jakarta Messaging message implementation.
 
 - 
getMessageHeadersSizepublic static int getMessageHeadersSize(Message msg) Returns the total wire size of the message headers for a message which was received or sent. If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method.- Throws:
- java.lang.IllegalArgumentException- if parameter is null or is a foreign Jakarta Messaging message implementation.
 
 - 
getMessagePropertiesSizepublic static int getMessagePropertiesSize(Message msg) Returns the total wire size of the message properties for a message which was received or sent. If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method.- Throws:
- java.lang.IllegalArgumentException- if parameter is null or is a foreign Jakarta Messaging message implementation.
 
 - 
getMessageBodySizepublic static int getMessageBodySize(Message msg) Returns the total wire size of the message body for a message which was received or sent. If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method. If the body of the message is compressed, this method returns the size of the compressed wire representation.- Throws:
- java.lang.IllegalArgumentException- if parameter is null or is a foreign Jakarta Messaging message implementation.
 
 - 
calculateMessageSizepublic static int calculateMessageSize(Message msg) throws JMSException Calculates and returns total size of the message wire representation. This method always creates internally the actual wire format of the message regardless of the state of the message.- Throws:
- java.lang.IllegalArgumentException- if parameter is null or is a foreign Jakarta Messaging message implementation.
- JMSException- if an error occurred while building message wire representation.
 
 - 
setAllowCloseInCallbackpublic static void setAllowCloseInCallback(boolean allow) Sets if the Session.close(), Connection.close(), Connection.stop(), JMSContext.close() or JMSContext.stop() methods can be called in the MessageListener callback. According to the Jakarta Messaging 2.0 specification, calling any of these methods must trigger an IllegalStateException or an IllegalStateRuntimeException. If calling them inside the callback is allowed then the close() or stop() method called inside the callback will not throw an exception and will proceed without waiting for the same callback to return.
 - 
getAllowCloseInCallbackpublic static boolean getAllowCloseInCallback() Returns if allowed to call close() in callbacks.
 - 
setAllowCallbackInClose@Deprecated public static void setAllowCallbackInClose(boolean allow) Deprecated.This method has been misnamed and replaced bysetAllowCloseInCallback.
 - 
getAllowCallbackInClose@Deprecated public static boolean getAllowCallbackInClose() Deprecated.This method has been misnamed and replaced bygetAllowCloseInCallback.
 - 
setExceptionOnFTSwitchpublic static void setExceptionOnFTSwitch(boolean callExceptionListener) Sets if ExceptionListener set on the Connection should be called after fault-tolerant switch. When EMS application performs fault-tolerant switch it may notify the Connection's ExceptionListener by calling it with JMSException providing the information about fault-tolerant switch. If calling the Connection's ExceptionListener is set, it is called with the JMSException which has the vendor error code (JMSException.getErrorCode()) set to the String in the form:
 FT-SWITCH: <new-server-url> An EMS application can recognize such calls by analyzing the error code in the passed JMSException and perform necessary actions. Notice that the ExceptionListener is called with the special JMSException only when fault-tolerant switch has been performed succesfully. In case the fault-tolerant switch has failed, the Connection's ExceptionListener will be called with regular JMSException (it will not have error code in the form 'FT-SWITCH: <new-server-url>') specifying that the connection to EMS Server has been terminated. Notice that by default Connection's ExceptionListener is not called after a successfull fault-tolerant switch. NOTE: when the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.
 - 
getExceptionOnFTSwitchpublic static boolean getExceptionOnFTSwitch() Returns if exception listener is called on FT switch.
 - 
setExceptionOnFTEventspublic static void setExceptionOnFTEvents(boolean callExceptionListener) Sets if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected. Similarly tosetExceptionOnFTSwitch(boolean), if this method is called and if a Connection's ExceptionListener is set, (and the connection has FT urls), then all above events will trigger the call to the ExceptionListener.onException callback with a JMSException which has the vendor error code (JMSException.getErrorCode()) set to the String in the form:FT-SWITCH: event where event is:
 - Disconnected from server url, will attempt to reconnect
- Reconnecting to next server url, attempt n out of m
- Reconnected to server url
 
 An EMS application can recognize such calls by analyzing the error code in the passed JMSException and perform necessary actions. Notice that this property replaces the property Tibjms.setExceptionOnFTSwitch(boolean), which means that if both are called, only one "reconnected" event will be passed to the ExceptionListener.onException callback (the one described above). We recommend that if Tibjms.setExceptionOnFTSwitch(boolean) was formerly used, and the user wishes to capture all FT events, this new method be used instead and the ExceptionListener.onException callback modified to handle these new vendor error codes.
 NOTE: when the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.
 - 
getExceptionOnFTEventspublic static boolean getExceptionOnFTEvents() Returns if exception listener is called on FT events (disconnected, reconnect attempt, and reconnected)
 - 
setSessionDispatcherDaemonpublic static void setSessionDispatcherDaemon(boolean makeDaemon) Sets if Session dispatcher threads should be daemon. When EMS application uses message listeners, TIBCO Enterprise Message Service client creates internal dispatcher threads for each Session which has at least one asynchronous message consumer. By default session dispatcher threads are not set to be daemon threads.
 - 
getSessionDispatcherDaemonpublic static boolean getSessionDispatcherDaemon() Returns if session dispatcher threads are daemon.
 - 
setConnectAttemptspublic static void setConnectAttempts(java.lang.String specs) Sets the parameters for the number of attempts the connections make to connect to the server. When too many clients connect to the same server, the server may not be able to accept all connections at the same time. This parameter specifies the number of attempts and delay between the attempt the connections perform in order to connect to the server. The value of this parameter is a String in the form "NN[,DELAY]" where NN is the number of attempts and DELAY is delay in milliseconds between the attempts. Minimum value of NN is 1, minimum value of DELAY is 250 milliseconds. Default value used is "2,500".
 - 
getConnectAttemptspublic static java.lang.String getConnectAttempts() Returns the connect attempts setting.
 - 
setReconnectAttemptspublic static void setReconnectAttempts(java.lang.String specs) Sets the parameter for the number of attempts the connections make to reconnect to the backup server during fault-tolerant switch. This parameter is similar to the parameter set by setConnectAttempts method. The difference is that it may be necessary to use different parameters during reconnect than during the initial connect. Initial connect of the clients to the server is normally distributed in time and there are less chances of the server exceeding its maximum accept queue. During fault-tolerant switch, all connected clients automatically try to reconnect to the backup server, approximately at the same time. When the number of connections is large, it may require more attempts to reconnect than the initial connect. The value of this parameter is a String in the form "NN[,DELAY]" where NN is the number of attempts and DELAY is delay in milliseconds between the attempts. Minimum value of NN is 1, minimum value of DELAY is 250 milliseconds. Default value used is "4,500".
 - 
getReconnectAttemptspublic static java.lang.String getReconnectAttempts() Returns the reconnect attempts setting.
 - 
setConnectAttemptTimeoutpublic static void setConnectAttemptTimeout(int timeout) Sets the parameter for the maxmimum amount of time a client will wait for the connection to be established. This timeout is in milliseconds When too many clients connect to the same server, the server may not be able to accept all connections at the same time or may run out of system resources. This parameter specifies the amount of time a client is willing to wait for a connection to be established. Internally the client library will tear down any hung connections (either because of non-availability of system resources or some other EMS server problem) after this timeout. NOTE: minimum value is 100 milliseconds, if value less than 100 milliseconds is specified, then during the connection establishment the minimum value of 100 milliseconds is used. Default value is 0, i.e no timeout.
 - 
getConnectAttemptTimeoutpublic static int getConnectAttemptTimeout() Returns the connect attempt timeout value
 - 
setReconnectAttemptTimeoutpublic static void setReconnectAttemptTimeout(int timeout) Sets the parameter for the maxmimum amount of time a client will wait for the reconnect to complete. This timeout is in milliseconds This parameter is similar to setConnectAttemptTimoeut The difference is that it may be necessary to use different parameters during reconnect than during the initial connect. Initial connect of the clients to the server is normally distributed in time and there are less chances of the server exceeding its maximum accept queue. During fault-tolerant switch, all connected clients automatically try to reconnect to the backup server, approximately at the same time. When the number of connections is large, it may require more reconnect time to reconnect than the initial connect. The value of this property is an integer in milliseconds. NOTE: minimum value is 100 milliseconds, if value less than 100 milliseconds is specified, then during the connection establishment the minimum value of 100 milliseconds is used. Default value is 0, i.e no timeout.
 - 
getReconnectAttemptTimeoutpublic static int getReconnectAttemptTimeout() Returns the reconnect attempt timeout value
 - 
setSocketReceiveBufferSizepublic static void setSocketReceiveBufferSize(int size) Sets the size of the socket receive buffer size for client connections. Some operating systems may ignore this setting.
 - 
getSocketReceiveBufferSizepublic static int getSocketReceiveBufferSize() Returns the size of socket receive buffer.
 - 
setSocketSendBufferSizepublic static void setSocketSendBufferSize(int size) Sets the size of the socket send buffer size for client connections. Some operating systems may ignore this setting.
 - 
getSocketSendBufferSizepublic static int getSocketSendBufferSize() Returns the size of socket send buffer.
 - 
setPingIntervalpublic static void setPingInterval(int seconds) Sets the ping interval in seconds used by inactive connections. Zero value disables pinging inactive connections. This method, if necessary, should be called before the first connection is created by the application. Subsequent calls have no effect.
 - 
getPingIntervalpublic static int getPingInterval() Returns the ping interval in seconds used by inactive connections.
 - 
setSocketConnectTimeoutpublic static void setSocketConnectTimeout(long milliseconds) Sets the timeout in milliseconds used by low-level socket connect calls. This only used with Java version 1.4.0 or higher.
 - 
getSocketConnectTimeoutpublic static long getSocketConnectTimeout() Returns the timeout in milliseconds used by low-level socket connect calls. This only used with Java version 1.4.0 or higher.
 - 
setEncodingpublic static void setEncoding(java.lang.String encodingName) throws JMSExceptionSet global string encoding for messages. Specified encoding will apply to all String values and names of properties and message fields but does not apply to message header fields and writeUTF method of BytesMessage.- Throws:
- JMSException
 
 - 
getEncodingpublic static java.lang.String getEncoding() Retursn global string encoding for messages. Returns null if encoding is not set. If global encoding is not set, encoding can be set for each message. Otherwise messages use default encoding UTF8 to encode strings in the wire representation of the message.
 - 
setMessageEncodingpublic static void setMessageEncoding(Message message, java.lang.String encodingName) throws JMSException Set string encoding for message. This will override global encoding setting. Specified encoding will apply to all String values and names of properties and message fields but does not apply to message header fields and writeUTF method of BytesMessage.- Throws:
- JMSException
 
 - 
getMessageEncodingpublic static java.lang.String getMessageEncoding(Message message) Returns string encoding name set for this message. Returns null if no encoding was set, in that case message uses default encoding UTF8.
 - 
getAsBytespublic static byte[] getAsBytes(Message message) throws JMSException Return a copy of the message data as a byte array, suitable for archiving in a file. To reconstruct the message from bytes use method createFromBytes(). Parameter must be an instance of TIBCO Enterprise Message Service message object.- Throws:
- JMSException
 
 - 
createFromBytespublic static Message createFromBytes(byte[] bytes) throws JMSException Create a message from specified byte array. Specified byte array must be previously obtained using method getAsBytes(). Created message is set to read-only state, use setWriteable method to enable message modification without erasing its content.- Throws:
- JMSException
 
 - 
makeWriteablepublic static void makeWriteable(Message message) throws JMSException Set message to writeable state without resetting its content.- Throws:
- JMSException
 
 - 
getConnectionActiveURLpublic static java.lang.String getConnectionActiveURL(Connection connection) throws JMSException Returns a string representing the URL of the server that this connection is currently connected to.- Throws:
- JMSException
 
 - 
getConnectionActiveURLpublic static java.lang.String getConnectionActiveURL(JMSContext context) Returns a string representing the URL of the server that the connection used by this context is currently connected to.- Throws:
- JMSRuntimeException
- Since:
- EMS 8.0
 
 - 
setNPSendCheckModepublic static void setNPSendCheckMode(MessageProducer producer, int mode) Set the mode defining when a producer should check the result of sending aNON_PERSISTENTmessage.This mode only applies to messages sent using the javax.jms.DeliveryMode.NON_PERSISTENTdelivery mode and a non-transactionalSession; it does not apply to cases when a message was sent using thejavax.jms.DeliveryMode.PERSISTENTor theRELIABLE_DELIVERYdelivery mode or if the correspondingSessionis transactional.If the producer's send check mode is not set, it may execute the mode applied globally to all producers via the EMS server parameter. Setting any mode other than NPSEND_CHECK_DEFAULTunconditionally overrides the global setting defined by the server.Normally, applications use the server's setting or configure producers with a specific send mode only once. However, if required, applications may choose to change this mode before sending every message. When a producer does not check the result of sending a message, it will not know if any problem has occurred and the message was not processed by the server. If a producer checks the result of the send, the sendmethod will receive the server's response to the send and throw the appropriate exception if any problem has occurred. However, this will reduce the producer's performance.- Parameters:
- producer- message producer, must not be- null
- mode- one of constants- NPSEND_CHECK_DEFAULT,- NPSEND_CHECK_ALWAYS,- NPSEND_CHECK_NEVER,- NPSEND_CHECK_TEMP_DEST,- NPSEND_CHECK_AUTHor- NPSEND_CHECK_TEMP_AUTH
- Throws:
- java.lang.IllegalArgumentException- if the producer is- nullor if the mode value is invalid.
- Since:
- EMS 4.4
- See Also:
- getNPSendCheckMode(javax.jms.MessageProducer)
 
 - 
setNPSendCheckModepublic static void setNPSendCheckMode(JMSProducer producer, int mode) Set the mode defining when a producer should check the result of sending aNON_PERSISTENTmessage.This mode only applies to messages sent using the javax.jms.DeliveryMode.NON_PERSISTENTdelivery mode and a parentJMSContextwith a non-transactional underlyingSession; it does not apply to cases when a message was sent using thejavax.jms.DeliveryMode.PERSISTENTor theRELIABLE_DELIVERYdelivery mode or if the underlyingSessionof the correspondingJMSContextis transactional.If the producer's send check mode is not set, it may execute the mode applied globally to all producers via the EMS server parameter. Setting any mode other than NPSEND_CHECK_DEFAULTunconditionally overrides the global setting defined by the server.Normally, applications use the server's setting or configure producers with a specific send mode only once. However, if required, applications may choose to change this mode before sending every message. When a producer does not check the result of sending a message, it will not know if any problem has occurred and the message was not processed by the server. If a producer checks the result of the send, the sendmethod will receive the server's response to the send and throw the appropriate exception if any problem has occurred. However, this will reduce the producer's performance.- Parameters:
- producer-- JMSProducer, must not be- null
- mode- one of constants- NPSEND_CHECK_DEFAULT,- NPSEND_CHECK_ALWAYS,- NPSEND_CHECK_NEVER,- NPSEND_CHECK_TEMP_DEST,- NPSEND_CHECK_AUTHor- NPSEND_CHECK_TEMP_AUTH
- Throws:
- java.lang.IllegalArgumentException- if the producer is- nullor if the mode value is invalid.
- Since:
- EMS 8.0
- See Also:
- getNPSendCheckMode(javax.jms.JMSProducer)
 
 - 
getNPSendCheckModepublic static int getNPSendCheckMode(MessageProducer producer) Returns the mode defining when a producer checks the result of sending aNON_PERSISTENTmessage.This method returns the send check mode previously set by setNPSendCheckMode(javax.jms.MessageProducer, int)method. Notice that if the returned value isNPSEND_CHECK_DEFAULTthen the effective mode can be set by the server parameter applied to all producers.- Parameters:
- producer- message producer, must not be- null
- Returns:
- one of constants NPSEND_CHECK_DEFAULT,NPSEND_CHECK_ALWAYS,NPSEND_CHECK_NEVER,NPSEND_CHECK_TEMP_DEST,NPSEND_CHECK_AUTHorNPSEND_CHECK_TEMP_AUTH
- Throws:
- java.lang.IllegalArgumentException- if producer is- null
- Since:
- EMS 4.4
- See Also:
- setNPSendCheckMode(javax.jms.MessageProducer, int)
 
 - 
getNPSendCheckModepublic static int getNPSendCheckMode(JMSProducer producer) Returns the mode defining when a producer checks the result of sending aNON_PERSISTENTmessage.This method returns the send check mode previously set by the setNPSendCheckMode(javax.jms.JMSProducer, int)method. Notice that if the returned value isNPSEND_CHECK_DEFAULTthen the effective mode can be set by the server parameter applied to all producers.- Parameters:
- producer-- JMSProducer, must not be- null
- Returns:
- one of constants NPSEND_CHECK_DEFAULT,NPSEND_CHECK_ALWAYS,NPSEND_CHECK_NEVER,NPSEND_CHECK_TEMP_DEST,NPSEND_CHECK_AUTHorNPSEND_CHECK_TEMP_AUTH
- Throws:
- java.lang.IllegalArgumentException- if the producer is- null
- Since:
- EMS 8.0
- See Also:
- setNPSendCheckMode(javax.jms.JMSProducer, int)
 
 - 
setMulticastEnabled@Deprecated public static void setMulticastEnabled(boolean enabled) Deprecated.As of release 8.3Set whether MessageConsumers subscribed to a multicast-enabled topic will receive messages 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
 
 - 
getMulticastEnabled@Deprecated public static boolean getMulticastEnabled() Deprecated.As of release 8.3Get whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.- Returns:
- trueif multicast is enabled
 
 - 
setMulticastDaemon@Deprecated public static 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 override the default port supplied by the server and the port specified on the connection factory. - Parameters:
- port- the port of the multicast daemon
- Since:
- EMS 5.0
 
 - 
getMulticastDaemon@Deprecated public static java.lang.String getMulticastDaemon() Deprecated.As of release 8.3Get the port on which the EMS client will connect to the multicast daemon.- Returns:
- the port of the multicast daemon
 
 - 
isConsumerMulticast@Deprecated public static boolean isConsumerMulticast(MessageConsumer consumer) Deprecated.As of release 8.3Checks if a MessageConsumer is receiving messages over multicast.- Parameters:
- consumer- the MessageConsumer to check
- Returns:
- trueif MessageConsumer is receiving messages over multicast
- Throws:
- java.lang.IllegalArgumentException- if consumer is- nullor foreign.
- Since:
- EMS 5.0
 
 - 
setMulticastExceptionListener@Deprecated public static void setMulticastExceptionListener(TibjmsMulticastExceptionListener listener) Deprecated.As of release 8.3Registers a TibjmsMulticastExceptionListener for handling multicast exceptions.If a serious problem with EMS Multicast is detected, the MulticastExceptionListener is informed if one has been registered. It does this by calling the listener's onMulticastException method, passing it the affected MessageConsumer and a JMSException argument describing the problem. - Parameters:
- listener- the URL of the multicast daemon
- Throws:
- java.lang.IllegalArgumentException- if listener is- null.
- Since:
- EMS 5.0
 
 - 
setTraceFilepublic static void setTraceFile(java.lang.String fileName) throws java.io.IOExceptionUse this method to instruct the TIBCO EMS Client library to direct the tracing, that would normally go to stderr or stdout, to a file namedfileName. This call alone does not generate tracing, that is, the tracing still needs to be enabled as usual: from the admin tool and/or with the ssl trace parameter in order to trace TLS connections' handshake.
 The trace file is opened in append mode. AnIOExceptionwill be thrown if the file can not be opened, and the tracing will be directed to stderr or stdout based on the connection's tracing setting (check the admin commandset server client_tracefor more details).
 Since there is only one trace file per JVM, anIllegalStateExceptionwill be thrown if this method is called with a non null file name after a trace file has already been set.
 Passnullto this method to instruct the TIBCO EMS Client library to stop directing tracing to the file. Normal tracing (stderr or stdout) will then resume.- Parameters:
- fileName- the name of the TIBCO EMS Client trace file for this JVM, or- nullto stop directing tracing to the file.
- Throws:
- java.io.IOException- if an error occurs while opening/creating the file.
- java.lang.IllegalStateException- if this method is called twice with a non null fileName.
- Since:
- EMS 5.0
 
 - 
recoverMsgpublic static void recoverMsg(Message msg) throws JMSException, IllegalStateException, java.lang.IllegalArgumentException Recover a single message.- Parameters:
- msg- the Message to recover
- Throws:
- java.lang.IllegalArgumentException- if message is- nullor invalid.
- java.lang.IllegalStateException- if illegal Ack Mode or session is closed
- JMSException- if message was never delivered
- IllegalStateException
- Since:
- EMS 6.0
 
 
- 
 
-