public class Tibjms
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_FACTORY_PASSWORD
Defines the name of the ConnectionFactory property specifying
default user password set for Connections created by the factory.
|
static java.lang.String |
DEFAULT_FACTORY_USERNAME
Defines the name of the ConnectionFactory property specifying
default user name set for Connections created by the factory.
|
static int |
EXPLICIT_CLIENT_ACKNOWLEDGE
Defines explicit client acknowledge mode.
|
static int |
EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE
Defines explicit client acknowledge mode with dups_ok.
|
static 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.
|
static 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.
|
static 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". |
static 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.
|
static 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).
|
static 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.
|
static int |
FACTORY_LOAD_BALANCE_METRIC_NONE
Indicates that no load balancing metric has been set for the connection
factory.
|
static java.lang.String |
FACTORY_MULTICAST_DAEMON
Deprecated.
As of release 8.3
|
static java.lang.String |
FACTORY_MULTICAST_ENABLED
Deprecated.
As of release 8.3
|
static 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.
|
static java.lang.String |
FACTORY_RECONNECT_ATTEMPT_DELAY
Defines the name of the ConnectionFactory property specifying
the interval between reconnection attempts.
|
static 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". |
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static java.lang.String |
JMS_TIBCO_SS_SENDER
Deprecated.
As of release 8.6
|
static int |
NO_ACKNOWLEDGE
Defines no acknowledge acknowledge mode.
|
static int |
NPSEND_CHECK_ALWAYS
Defines mode when producer always checks result of sending a NON_PERSISTENT message.
|
static int |
NPSEND_CHECK_AUTH
Defines mode when producer checks result of sending a NON_PERSISTENT message
only when server authorization is enabled.
|
static int |
NPSEND_CHECK_DEFAULT
Defines default check mode for sending a NON_PERSISTENT messages.
|
static int |
NPSEND_CHECK_NEVER
Defines mode when producer never checks result of sending a NON_PERSISTENT message.
|
static 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.
|
static int |
NPSEND_CHECK_TEMP_DEST
Defines mode when producer checks result of sending a NON_PERSISTENT message
only when sending into temporary destination.
|
static 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.
|
static 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.
|
static 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.
|
static java.lang.String |
PROP_DAEMON_DISPATCHER
Defines the name of the System Property controlling the type of
Session dispatcher threads.
|
static 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.
|
static 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.
|
static 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.
|
static java.lang.String |
PROP_MULTICAST_DAEMON
Deprecated.
As of release 8.3
|
static java.lang.String |
PROP_MULTICAST_ENABLED
Deprecated.
As of release 8.3
|
static java.lang.String |
PROP_PING_INTERVAL
Defines the name of the System Property setting the ping interval
for inactive connections.
|
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static 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.
|
static java.lang.String |
PROP_SSL_DEBUG_TRACE
Defines the name of the System Property specifying
debug tracing for TLS connections.
|
static java.lang.String |
PROP_SSL_TRACE
Defines the name of the System Property specifying tracing
for TLS connections.
|
static 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". |
static java.lang.String |
PROP_TX_SEND_DEST_CHECK
The send or publish methods of the
JMSProducer ,
MessageProducer , QueueSender , and
TopicPublisher classes that take a
Destination parameter throw and an
InvalidDestinationRuntimeException or an
InvalidDestinationException if 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 int |
RELIABLE_DELIVERY
Defines reliable delivery mode.
|
Modifier and Type | Method and Description |
---|---|
static int |
calculateMessageSize(Message msg)
Calculates and returns total size of the message wire representation.
|
static Message |
createFromBytes(byte[] bytes)
Create a message from specified byte array.
|
static boolean |
getAllowCallbackInClose()
Deprecated.
This method has been misnamed and replaced
by
getAllowCloseInCallback . |
static boolean |
getAllowCloseInCallback()
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.String |
getConnectAttempts()
Returns the connect attempts setting.
|
static int |
getConnectAttemptTimeout()
Returns the connect attempt timeout value
|
static java.lang.String |
getConnectionActiveURL(Connection connection)
Returns a string representing the URL of the server that this connection
is currently connected to.
|
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.
|
static java.lang.String |
getEncoding()
Retursn global string encoding for messages.
|
static boolean |
getExceptionOnFTEvents()
Returns if exception listener is called on FT events (disconnected, reconnect
attempt, and reconnected)
|
static boolean |
getExceptionOnFTSwitch()
Returns if exception listener is called on FT switch.
|
static int |
getMessageBodySize(Message msg)
Returns the total wire size of the message body for a message
which was received or sent.
|
static java.lang.String |
getMessageEncoding(Message message)
Returns string encoding name set for this message.
|
static int |
getMessageHeadersSize(Message msg)
Returns the total wire size of the message headers for a message
which was received or sent.
|
static int |
getMessagePropertiesSize(Message msg)
Returns the total wire size of the message properties for a message
which was received or sent.
|
static int |
getMessageSize(Message msg)
Returns the total wire size of the message which was received or sent.
|
static java.lang.String |
getMulticastDaemon()
Deprecated.
As of release 8.3
|
static boolean |
getMulticastEnabled()
Deprecated.
As of release 8.3
|
static int |
getNPSendCheckMode(JMSProducer producer)
Returns the mode defining when a producer checks the
result of sending a
NON_PERSISTENT message. |
static int |
getNPSendCheckMode(MessageProducer producer)
Returns the mode defining when a producer checks the result of sending
a
NON_PERSISTENT message. |
static int |
getPingInterval()
Returns the ping interval in seconds used by inactive connections.
|
static java.lang.String |
getReconnectAttempts()
Returns the reconnect attempts setting.
|
static int |
getReconnectAttemptTimeout()
Returns the reconnect attempt timeout value
|
static boolean |
getSessionDispatcherDaemon()
Returns if session dispatcher threads are daemon.
|
static long |
getSocketConnectTimeout()
Returns the timeout in milliseconds used by low-level socket connect calls.
|
static int |
getSocketReceiveBufferSize()
Returns the size of socket receive buffer.
|
static int |
getSocketSendBufferSize()
Returns the size of socket send buffer.
|
static boolean |
isConsumerMulticast(MessageConsumer consumer)
Deprecated.
As of release 8.3
|
static void |
makeWriteable(Message message)
Set message to writeable state without resetting its content.
|
static void |
recoverMsg(Message msg)
Recover a single message.
|
static void |
setAllowCallbackInClose(boolean allow)
Deprecated.
This method has been misnamed and replaced
by
setAllowCloseInCallback . |
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.
|
static void |
setConnectAttempts(java.lang.String specs)
Sets the parameters for the number of attempts the connections
make to connect to the server.
|
static void |
setConnectAttemptTimeout(int timeout)
Sets the parameter for the maxmimum amount of time a client will
wait for the connection to be established.
|
static void |
setEncoding(java.lang.String encodingName)
Set global string encoding for messages.
|
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.
|
static void |
setExceptionOnFTSwitch(boolean callExceptionListener)
Sets if ExceptionListener set on the Connection should be called after
fault-tolerant switch.
|
static void |
setMessageEncoding(Message message,
java.lang.String encodingName)
Set string encoding for message.
|
static void |
setMulticastDaemon(java.lang.String port)
Deprecated.
As of release 8.3
|
static void |
setMulticastEnabled(boolean enabled)
Deprecated.
As of release 8.3
|
static void |
setMulticastExceptionListener(TibjmsMulticastExceptionListener listener)
Deprecated.
As of release 8.3
|
static void |
setNPSendCheckMode(JMSProducer producer,
int mode)
Set the mode defining when a producer should check the result of sending
a
NON_PERSISTENT message. |
static void |
setNPSendCheckMode(MessageProducer producer,
int mode)
Set the mode defining when a producer should check the result of sending
a
NON_PERSISTENT message. |
static void |
setPingInterval(int seconds)
Sets the ping interval in seconds used by inactive connections.
|
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.
|
static void |
setReconnectAttemptTimeout(int timeout)
Sets the parameter for the maxmimum amount of time a client will
wait for the reconnect to complete.
|
static void |
setSessionDispatcherDaemon(boolean makeDaemon)
Sets if Session dispatcher threads should be daemon.
|
static void |
setSocketConnectTimeout(long milliseconds)
Sets the timeout in milliseconds used by low-level socket connect calls.
|
static void |
setSocketReceiveBufferSize(int size)
Sets the size of the socket receive buffer size for client connections.
|
static void |
setSocketSendBufferSize(int size)
Sets the size of the socket send buffer size for client connections.
|
static void |
setTraceFile(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 named
fileName . |
public static final int RELIABLE_DELIVERY
public static final int NO_ACKNOWLEDGE
public static final int EXPLICIT_CLIENT_ACKNOWLEDGE
public static final int EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE
public static final int NPSEND_CHECK_DEFAULT
setNPSendCheckMode(javax.jms.MessageProducer, int)
,
setNPSendCheckMode(javax.jms.JMSProducer, int)
public static final int NPSEND_CHECK_ALWAYS
setNPSendCheckMode(javax.jms.MessageProducer, int)
,
setNPSendCheckMode(javax.jms.JMSProducer, int)
public static final int NPSEND_CHECK_NEVER
setNPSendCheckMode(javax.jms.MessageProducer, int)
,
setNPSendCheckMode(javax.jms.JMSProducer, int)
public static final int NPSEND_CHECK_TEMP_DEST
setNPSendCheckMode(javax.jms.MessageProducer, int)
,
setNPSendCheckMode(javax.jms.JMSProducer, int)
public static final int NPSEND_CHECK_AUTH
setNPSendCheckMode(javax.jms.MessageProducer, int)
,
setNPSendCheckMode(javax.jms.JMSProducer, int)
public static final int NPSEND_CHECK_TEMP_AUTH
setNPSendCheckMode(javax.jms.MessageProducer, int)
,
setNPSendCheckMode(javax.jms.JMSProducer, int)
public static final java.lang.String JMS_TIBCO_IMPORTED
public static final java.lang.String JMS_TIBCO_SENDER
public static final java.lang.String JMS_TIBCO_DISABLE_SENDER
@Deprecated public static final java.lang.String JMS_TIBCO_SS_SENDER
public static final java.lang.String JMS_TIBCO_CM_PUBLISHER
public static final java.lang.String JMS_TIBCO_CM_SEQUENCE
public static final java.lang.String JMS_TIBCO_MSG_EXT
public static final java.lang.String JMS_TIBCO_MSG_TRACE
null
, or a string "body" if
message trace should print the message data fields.
public static final java.lang.String JMS_TIBCO_COMPRESS
public static final java.lang.String JMS_TIBCO_PRESERVE_UNDELIVERED
public static final java.lang.String PROP_MESSAGE_ENCODING
public static final java.lang.String PROP_SOCKET_RECEIVE
public static final java.lang.String PROP_SOCKET_SEND
public static final java.lang.String PROP_DAEMON_DISPATCHER
public static final java.lang.String PROP_FT_SWITCH_EXCEPTION
FT-SWITCH: <new-server-url>A JMS 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:
public static final java.lang.String PROP_FT_EVENTS_EXCEPTION
PROP_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: eventwhere event is:
public static final java.lang.String PROP_CLOSE_IN_CALLBACK
public static final java.lang.String PROP_SOCKET_CONNECT_TIMEOUT
public static final java.lang.String PROP_CONNECT_ATTEMPTS
public static final java.lang.String PROP_RECONNECT_ATTEMPTS
public static final java.lang.String PROP_PING_INTERVAL
public static final java.lang.String PROP_CONNECT_ATTEMPT_TIMEOUT
public static final java.lang.String PROP_RECONNECT_ATTEMPT_TIMEOUT
public static final java.lang.String PROP_RESTORE_8_3_0_CONNECT_BEHAVIOR
public static final java.lang.String PROP_TX_SEND_DEST_CHECK
JMSProducer
,
MessageProducer
, QueueSender
, and
TopicPublisher
classes that take a
Destination
parameter throw and an
InvalidDestinationRuntimeException
or an
InvalidDestinationException
if 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.
public static final java.lang.String PROP_SSL_TRACE
public static final java.lang.String PROP_SSL_DEBUG_TRACE
@Deprecated public static final java.lang.String PROP_MULTICAST_ENABLED
@Deprecated public static final java.lang.String PROP_MULTICAST_DAEMON
public static final java.lang.String PROP_TRACE_FILE
public static final java.lang.String DEFAULT_FACTORY_USERNAME
public static final java.lang.String DEFAULT_FACTORY_PASSWORD
public static final java.lang.String FACTORY_LOAD_BALANCE_METRIC
public static final int FACTORY_LOAD_BALANCE_METRIC_NONE
public static final int FACTORY_LOAD_BALANCE_METRIC_CONNECTIONS
public static final int FACTORY_LOAD_BALANCE_METRIC_BYTE_RATE
public static final java.lang.String FACTORY_CONNECT_ATTEMPT_COUNT
public static final java.lang.String FACTORY_CONNECT_ATTEMPT_DELAY
public static final java.lang.String FACTORY_CONNECT_ATTEMPT_TIMEOUT
public static final java.lang.String FACTORY_RECONNECT_ATTEMPT_COUNT
public static final java.lang.String FACTORY_RECONNECT_ATTEMPT_DELAY
public static final java.lang.String FACTORY_RECONNECT_ATTEMPT_TIMEOUT
@Deprecated public static final java.lang.String FACTORY_MULTICAST_ENABLED
@Deprecated public static final java.lang.String FACTORY_MULTICAST_DAEMON
public static int getMessageSize(Message msg)
java.lang.IllegalArgumentException
- if parameter is null
or is a foreign JMS message implementation.public static int getMessageHeadersSize(Message msg)
java.lang.IllegalArgumentException
- if parameter is null
or is a foreign JMS message implementation.public static int getMessagePropertiesSize(Message msg)
java.lang.IllegalArgumentException
- if parameter is null
or is a foreign JMS message implementation.public static int getMessageBodySize(Message msg)
java.lang.IllegalArgumentException
- if parameter is null
or is a foreign JMS message implementation.public static int calculateMessageSize(Message msg) throws JMSException
java.lang.IllegalArgumentException
- if parameter is null
or is a foreign JMS message implementation.JMSException
- if an error occurred while building
message wire representation.public static void setAllowCloseInCallback(boolean allow)
public static boolean getAllowCloseInCallback()
@Deprecated public static void setAllowCallbackInClose(boolean allow)
setAllowCloseInCallback
.@Deprecated public static boolean getAllowCallbackInClose()
getAllowCloseInCallback
.public static void setExceptionOnFTSwitch(boolean callExceptionListener)
FT-SWITCH: <new-server-url>A JMS 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:
public static boolean getExceptionOnFTSwitch()
public static void setExceptionOnFTEvents(boolean callExceptionListener)
setExceptionOnFTSwitch(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: eventwhere event is:
public static boolean getExceptionOnFTEvents()
public static void setSessionDispatcherDaemon(boolean makeDaemon)
public static boolean getSessionDispatcherDaemon()
public static void setConnectAttempts(java.lang.String specs)
public static java.lang.String getConnectAttempts()
public static void setReconnectAttempts(java.lang.String specs)
public static java.lang.String getReconnectAttempts()
public static void setConnectAttemptTimeout(int timeout)
public static int getConnectAttemptTimeout()
public static void setReconnectAttemptTimeout(int timeout)
public static int getReconnectAttemptTimeout()
public static void setSocketReceiveBufferSize(int size)
public static int getSocketReceiveBufferSize()
public static void setSocketSendBufferSize(int size)
public static int getSocketSendBufferSize()
public static void setPingInterval(int seconds)
public static int getPingInterval()
public static void setSocketConnectTimeout(long milliseconds)
public static long getSocketConnectTimeout()
public static void setEncoding(java.lang.String encodingName) throws JMSException
JMSException
public static java.lang.String getEncoding()
public static void setMessageEncoding(Message message, java.lang.String encodingName) throws JMSException
JMSException
public static java.lang.String getMessageEncoding(Message message)
public static byte[] getAsBytes(Message message) throws JMSException
JMSException
public static Message createFromBytes(byte[] bytes) throws JMSException
JMSException
public static void makeWriteable(Message message) throws JMSException
JMSException
public static java.lang.String getConnectionActiveURL(Connection connection) throws JMSException
JMSException
public static java.lang.String getConnectionActiveURL(JMSContext context)
JMSRuntimeException
public static void setNPSendCheckMode(MessageProducer producer, int mode)
NON_PERSISTENT
message.
This mode only applies to messages sent using the
javax.jms.DeliveryMode.NON_PERSISTENT
delivery mode and a
non-transactional Session
; it does not apply to
cases when a message was sent using the
javax.jms.DeliveryMode.PERSISTENT
or the
RELIABLE_DELIVERY
delivery mode or if the corresponding
Session
is 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_DEFAULT
unconditionally 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 send
method 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.
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_AUTH
or NPSEND_CHECK_TEMP_AUTH
java.lang.IllegalArgumentException
- if the producer is null
or if
the mode value is invalid.getNPSendCheckMode(javax.jms.MessageProducer)
public static void setNPSendCheckMode(JMSProducer producer, int mode)
NON_PERSISTENT
message.
This mode only applies to messages sent using the
javax.jms.DeliveryMode.NON_PERSISTENT
delivery mode and
a parent JMSContext
with a non-transactional underlying
Session
; it does not apply to cases when a message
was sent using the javax.jms.DeliveryMode.PERSISTENT
or
the RELIABLE_DELIVERY
delivery mode or if the underlying
Session
of the corresponding JMSContext
is
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_DEFAULT
unconditionally
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
send
method 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.
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_AUTH
or NPSEND_CHECK_TEMP_AUTH
java.lang.IllegalArgumentException
- if the producer is null
or if the mode value is invalid.getNPSendCheckMode(javax.jms.JMSProducer)
public static int getNPSendCheckMode(MessageProducer producer)
NON_PERSISTENT
message.
This method returns the send check mode previously set by setNPSendCheckMode(javax.jms.MessageProducer, int)
method. Notice that if the returned value is NPSEND_CHECK_DEFAULT
then
the effective mode can be set by the server parameter applied to all producers.
producer
- message producer, must not be null
NPSEND_CHECK_DEFAULT
,
NPSEND_CHECK_ALWAYS
, NPSEND_CHECK_NEVER
,
NPSEND_CHECK_TEMP_DEST
, NPSEND_CHECK_AUTH
or NPSEND_CHECK_TEMP_AUTH
java.lang.IllegalArgumentException
- if producer is null
setNPSendCheckMode(javax.jms.MessageProducer, int)
public static int getNPSendCheckMode(JMSProducer producer)
NON_PERSISTENT
message.
This method returns the send check mode previously set by the
setNPSendCheckMode(javax.jms.JMSProducer, int)
method. Notice that if the returned value is
NPSEND_CHECK_DEFAULT
then the effective mode can be set by the
server parameter applied to all producers.
producer
- JMSProducer
, must not be null
NPSEND_CHECK_DEFAULT
,
NPSEND_CHECK_ALWAYS
, NPSEND_CHECK_NEVER
,
NPSEND_CHECK_TEMP_DEST
, NPSEND_CHECK_AUTH
or NPSEND_CHECK_TEMP_AUTH
java.lang.IllegalArgumentException
- if the producer is null
setNPSendCheckMode(javax.jms.JMSProducer, int)
@Deprecated public static void setMulticastEnabled(boolean enabled)
When enabled, MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
The default is enabled.
enabled
- true
to enable multicast, false
to disable multicast@Deprecated public static boolean getMulticastEnabled()
true
if multicast is enabled@Deprecated public static void setMulticastDaemon(java.lang.String port)
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.
port
- the port of the multicast daemon@Deprecated public static java.lang.String getMulticastDaemon()
@Deprecated public static boolean isConsumerMulticast(MessageConsumer consumer)
consumer
- the MessageConsumer to checktrue
if MessageConsumer is receiving messages
over multicastjava.lang.IllegalArgumentException
- if consumer is null
or
foreign.@Deprecated public static void setMulticastExceptionListener(TibjmsMulticastExceptionListener listener)
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.
listener
- the URL of the multicast daemonjava.lang.IllegalArgumentException
- if listener is null
.public static void setTraceFile(java.lang.String fileName) throws java.io.IOException
fileName
.
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.IOException
will 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
command set server client_trace
for more details).IllegalStateException
will be thrown if this method is called with a non null file name after a
trace file has already been set.null
to this method to instruct the TIBCO EMS Client library
to stop directing tracing to the file. Normal tracing (stderr or stdout) will then
resume.fileName
- the name of the TIBCO EMS Client trace file for this JVM, or
null
to stop directing tracing to the file.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.public static void recoverMsg(Message msg) throws JMSException, IllegalStateException, java.lang.IllegalArgumentException
msg
- the Message to recoverjava.lang.IllegalArgumentException
- if message is null
or
invalid.java.lang.IllegalStateException
- if illegal Ack Mode or session is closedJMSException
- if message was never deliveredIllegalStateException
Copyright © Cloud Software Group, Inc. All rights reserved