|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A WLSession provides fields and methods not supported by javax.jms.Session.
WLSession provides methods for:
WLSession also supports NO_ACKNOWLEDGE and MULTICAST_NO_ACKNOWLEDGE acknowledge modes.
Session
,
QueueSession
,
TopicSession
Field Summary | |
static int |
KEEP_NEW
Multicast overrun policy specifying that the most recent messages should be saved and the oldest ones discarded, as needed, so as not to exceed the message maximum. |
static int |
KEEP_OLD
Multicast overrun policy specifying that the oldest messages should be saved and the most recent ones discarded, as needed, so as not to exceed the message maximum. |
static int |
MULTICAST_NO_ACKNOWLEDGE
Multicast mode with no acknowledge required. |
static int |
NO_ACKNOWLEDGE
No acknowledge is required. |
Fields inherited from class javax.jms.Session |
AUTO_ACKNOWLEDGE,
CLIENT_ACKNOWLEDGE,
DUPS_OK_ACKNOWLEDGE |
Method Summary | |
XMLMessage |
createXMLMessage()
Create an XMLMessage. |
XMLMessage |
createXMLMessage(java.lang.String string)
Create an initialized XMLMessage. |
int |
getMessagesMaximum()
Get the maximum number of messages that may exist for an asynchronous session that have not yet been passed to the message listener. |
int |
getOverrunPolicy()
Get overrun policy for multicast sessions. |
void |
setExceptionListener(javax.jms.ExceptionListener exceptionListener)
Set an exception listener for this session. |
void |
setMessagesMaximum(int messagesMaximum)
Set the maximum number of messages that may exist for an asynchronous session that have not yet been passed to the message listener. |
void |
setOverrunPolicy(int policy)
Set overrun policy for multicast sessions. |
Methods inherited from interface javax.jms.Session |
close,
commit,
createBytesMessage,
createMapMessage,
createMessage,
createObjectMessage,
createObjectMessage,
createStreamMessage,
createTextMessage,
createTextMessage,
getMessageListener,
getTransacted,
recover,
rollback,
run,
setMessageListener |
Field Detail |
public static final int NO_ACKNOWLEDGE
Messages sent to a NO_ACKNOWLEDGE session are immediately deleted from the server. Messages received in this mode are not recovered, and as a result messages may be lost and/or duplicate message may be delivered if an initial attempt to deliver a message fails.
This mode is supported for applications that do not require the quality of service provided by session acknowledge, and that do not want to incur the associated overhead.
You should avoid using this mode if your application cannot handle duplicate messages.
public static final int MULTICAST_NO_ACKNOWLEDGE
Messages sent to a MULTICAST_NO_ACKNOWLEDGE session share the same characteristics as NO_ACKNOWLEDGE mode.
This mode is supported for applications that want to support multicasting, and that do not require the quality of service provided by session acknowledge.
You should avoid using this mode if your application is unable to handle duplicate messages, which can result if a message fails to be delivered during the first attempt.
public static final int KEEP_OLD
public static final int KEEP_NEW
Method Detail |
public XMLMessage createXMLMessage() throws javax.jms.JMSException
createXMLMessage(String)
public XMLMessage createXMLMessage(java.lang.String string) throws javax.jms.JMSException
string
- the string used to initialize the message.createXMLMessage()
public void setExceptionListener(javax.jms.ExceptionListener exceptionListener) throws javax.jms.JMSException
If a JMS provider detects a serious problem with a session, it will inform the session's exception listener, if one has been registered. It informs the exception listener by calling the listener's onException() method and passing a JMSException describing the problem.
The exception listener allows a client to be asynchronously notified of a problem. Some sessions only consume messages, so they would have no other way to learn the session has failed.
A session serializes execution of its exception listener.
A JMS provider should attempt to resolve session problems prior to notifying the client.
exceptionListener
- the exception listener.public int getMessagesMaximum() throws javax.jms.JMSException
A value of -1 indicates that there is no limit on the number of messages. In this case, however, the limit is set to the amount of remaining virtual memory.
setMessagesMaximum(int)
public void setMessagesMaximum(int messagesMaximum) throws javax.jms.JMSException
A value of -1 indicates that there is no limit on the number of messages. In this case, however, the limit is set to the amount of remaining virtual memory.
When the number of messages reaches the specified value:
messagesMaximum
- the maximum number of messages allowed, valid values are -1, and 1 through 2^63-1 (default is 10).getMessagesMaximum()
public int getOverrunPolicy() throws javax.jms.JMSException
setOverrunPolicy(int)
public void setOverrunPolicy(int policy) throws javax.jms.JMSException
When the number of messages reaches the message maximum, messages are discarded based on the specified policy.
If set to KeepNew, the most recent messages are given priority over the oldest messages, and the oldest messages are discarded, as needed.
If set to KeepOld, the oldest messages are given priority over the most recent messages, and the most recent messages are discarded, as needed.
Message age is defined by the order of receipt, not by the JMSTimestamp value.
policy
- the overrun policy.getOverrunPolicy()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |