Configure CertificateCheckUrl per container for curl-like TLS checks, classify Sonic permission errors, and extend setup wizard for container management. Co-authored-by: Cursor <cursoragent@cursor.com>
1547 lines
66 KiB
HTML
1547 lines
66 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.5.0_19) on Fri Aug 12 11:25:14 EDT 2011 -->
|
|
<TITLE>
|
|
Session (Management Application API)
|
|
</TITLE>
|
|
|
|
<META NAME="keywords" CONTENT="javax.jms.Session interface">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
parent.document.title="Session (Management Application API)";
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="Session.html#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
Sonic Management API</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="ServerSessionPool.html" title="interface in javax.jms"><B>PREV CLASS</B></A>
|
|
<A HREF="StreamMessage.html" title="interface in javax.jms"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html@javax%252Fjms%252FSession.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Session.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | <A HREF="Session.html#field_summary">FIELD</A> | CONSTR | <A HREF="Session.html#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="Session.html#field_detail">FIELD</A> | CONSTR | <A HREF="Session.html#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
javax.jms</FONT>
|
|
<BR>
|
|
Interface Session</H2>
|
|
<DL>
|
|
<DT><B>All Superinterfaces:</B> <DD>java.lang.Runnable</DD>
|
|
</DL>
|
|
<DL>
|
|
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="QueueSession.html" title="interface in javax.jms">QueueSession</A>, <A HREF="TopicSession.html" title="interface in javax.jms">TopicSession</A>, <A HREF="XAQueueSession.html" title="interface in javax.jms">XAQueueSession</A>, <A HREF="XASession.html" title="interface in javax.jms">XASession</A>, <A HREF="XATopicSession.html" title="interface in javax.jms">XATopicSession</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public interface <B>Session</B><DT>extends java.lang.Runnable</DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
<P>A <CODE>Session</CODE> object is a single-threaded context for producing and consuming
|
|
messages. Although it may allocate provider resources outside the Java
|
|
virtual machine (JVM), it is considered a lightweight JMS object.
|
|
|
|
<P>A session serves several purposes:
|
|
|
|
<UL>
|
|
<LI>It is a factory for its message producers and consumers.
|
|
<LI>It supplies provider-optimized message factories.
|
|
<LI>It is a factory for <CODE>TemporaryTopics</CODE> and
|
|
<CODE>TemporaryQueues</CODE>.
|
|
<LI> It provides a way to create <CODE>Queue</CODE> or <CODE>Topic</CODE>
|
|
objects for those clients that need to dynamically manipulate
|
|
provider-specific destination names.
|
|
<LI>It supports a single series of transactions that combine work
|
|
spanning its producers and consumers into atomic units.
|
|
<LI>It defines a serial order for the messages it consumes and
|
|
the messages it produces.
|
|
<LI>It retains messages it consumes until they have been
|
|
acknowledged.
|
|
<LI>It serializes execution of message listeners registered with
|
|
its message consumers.
|
|
<LI> It is a factory for <CODE>QueueBrowsers</CODE>.
|
|
</UL>
|
|
|
|
<P>A session can create and service multiple message producers and
|
|
consumers.
|
|
|
|
<P>One typical use is to have a thread block on a synchronous
|
|
<CODE>MessageConsumer</CODE> until a message arrives. The thread may then
|
|
use one or more of the <CODE>Session</CODE>'s <CODE>MessageProducer</CODE>s.
|
|
|
|
<P>If a client desires to have one thread produce messages while others
|
|
consume them, the client should use a separate session for its producing
|
|
thread.
|
|
|
|
<P>Once a connection has been started, any session with one or more
|
|
registered message listeners is dedicated to the thread of control that
|
|
delivers messages to it. It is erroneous for client code to use this session
|
|
or any of its constituent objects from another thread of control. The
|
|
only exception to this rule is the use of the session or connection
|
|
<CODE>close</CODE> method.
|
|
|
|
<P>It should be easy for most clients to partition their work naturally
|
|
into sessions. This model allows clients to start simply and incrementally
|
|
add message processing complexity as their need for concurrency grows.
|
|
|
|
<P>The <CODE>close</CODE> method is the only session method that can be
|
|
called while some other session method is being executed in another thread.
|
|
|
|
<P>A session may be specified as transacted. Each transacted
|
|
session supports a single series of transactions. Each transaction groups
|
|
a set of message sends and a set of message receives into an atomic unit
|
|
of work. In effect, transactions organize a session's input message
|
|
stream and output message stream into series of atomic units. When a
|
|
transaction commits, its atomic unit of input is acknowledged and its
|
|
associated atomic unit of output is sent. If a transaction rollback is
|
|
done, the transaction's sent messages are destroyed and the session's input
|
|
is automatically recovered.
|
|
|
|
<P>The content of a transaction's input and output units is simply those
|
|
messages that have been produced and consumed within the session's current
|
|
transaction.
|
|
|
|
<P>A transaction is completed using either its session's <CODE>commit</CODE>
|
|
method or its session's <CODE>rollback</CODE> method. The completion of a
|
|
session's current transaction automatically begins the next. The result is
|
|
that a transacted session always has a current transaction within which its
|
|
work is done.
|
|
|
|
<P>The Java Transaction Service (JTS) or some other transaction monitor may
|
|
be used to combine a session's transaction with transactions on other
|
|
resources (databases, other JMS sessions, etc.). Since Java distributed
|
|
transactions are controlled via the Java Transaction API (JTA), use of the
|
|
session's <CODE>commit</CODE> and <CODE>rollback</CODE> methods in
|
|
this context is prohibited.
|
|
|
|
<P>The JMS API does not require support for JTA; however, it does define
|
|
how a provider supplies this support.
|
|
|
|
<P>Although it is also possible for a JMS client to handle distributed
|
|
transactions directly, it is unlikely that many JMS clients will do this.
|
|
Support for JTA in the JMS API is targeted at systems vendors who will be
|
|
integrating the JMS API into their application server products.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="QueueSession.html" title="interface in javax.jms"><CODE>QueueSession</CODE></A>,
|
|
<A HREF="TopicSession.html" title="interface in javax.jms"><CODE>TopicSession</CODE></A>,
|
|
<A HREF="XASession.html" title="interface in javax.jms"><CODE>XASession</CODE></A></DL>
|
|
<HR>
|
|
|
|
<P>
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
<A NAME="field_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Field Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#AUTO_ACKNOWLEDGE">AUTO_ACKNOWLEDGE</A></B></CODE>
|
|
|
|
<BR>
|
|
With this acknowledgment mode, the session automatically acknowledges
|
|
a client's receipt of a message either when the session has successfully
|
|
returned from a call to <CODE>receive</CODE> or when the message
|
|
listener the session has called to process the message successfully
|
|
returns.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#CLIENT_ACKNOWLEDGE">CLIENT_ACKNOWLEDGE</A></B></CODE>
|
|
|
|
<BR>
|
|
With this acknowledgment mode, the client acknowledges a consumed
|
|
message by calling the message's <CODE>acknowledge</CODE> method.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#DUPS_OK_ACKNOWLEDGE">DUPS_OK_ACKNOWLEDGE</A></B></CODE>
|
|
|
|
<BR>
|
|
This acknowledgment mode instructs the session to lazily acknowledge
|
|
the delivery of messages.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#SESSION_TRANSACTED">SESSION_TRANSACTED</A></B></CODE>
|
|
|
|
<BR>
|
|
This value is returned from the method
|
|
<CODE>getAcknowledgeMode</CODE> if the session is transacted.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#close()">close</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Closes the session.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#commit()">commit</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Commits all messages done in this transaction and releases any locks
|
|
currently held.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="QueueBrowser.html" title="interface in javax.jms">QueueBrowser</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createBrowser(javax.jms.Queue)">createBrowser</A></B>(<A HREF="Queue.html" title="interface in javax.jms">Queue</A> queue)</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on
|
|
the specified queue.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="QueueBrowser.html" title="interface in javax.jms">QueueBrowser</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createBrowser(javax.jms.Queue, java.lang.String)">createBrowser</A></B>(<A HREF="Queue.html" title="interface in javax.jms">Queue</A> queue,
|
|
java.lang.String messageSelector)</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on
|
|
the specified queue using a message selector.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="BytesMessage.html" title="interface in javax.jms">BytesMessage</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createBytesMessage()">createBytesMessage</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>BytesMessage</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="MessageConsumer.html" title="interface in javax.jms">MessageConsumer</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createConsumer(javax.jms.Destination)">createConsumer</A></B>(<A HREF="Destination.html" title="interface in javax.jms">Destination</A> destination)</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>MessageConsumer</CODE> for the specified destination.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="MessageConsumer.html" title="interface in javax.jms">MessageConsumer</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createConsumer(javax.jms.Destination, java.lang.String)">createConsumer</A></B>(<A HREF="Destination.html" title="interface in javax.jms">Destination</A> destination,
|
|
java.lang.String messageSelector)</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>MessageConsumer</CODE> for the specified destination,
|
|
using a message selector.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="MessageConsumer.html" title="interface in javax.jms">MessageConsumer</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createConsumer(javax.jms.Destination, java.lang.String, boolean)">createConsumer</A></B>(<A HREF="Destination.html" title="interface in javax.jms">Destination</A> destination,
|
|
java.lang.String messageSelector,
|
|
boolean NoLocal)</CODE>
|
|
|
|
<BR>
|
|
Creates <CODE>MessageConsumer</CODE> for the specified destination, using a
|
|
message selector.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="TopicSubscriber.html" title="interface in javax.jms">TopicSubscriber</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createDurableSubscriber(javax.jms.Topic, java.lang.String)">createDurableSubscriber</A></B>(<A HREF="Topic.html" title="interface in javax.jms">Topic</A> topic,
|
|
java.lang.String name)</CODE>
|
|
|
|
<BR>
|
|
Creates a durable subscriber to the specified topic.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="TopicSubscriber.html" title="interface in javax.jms">TopicSubscriber</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createDurableSubscriber(javax.jms.Topic, java.lang.String, java.lang.String, boolean)">createDurableSubscriber</A></B>(<A HREF="Topic.html" title="interface in javax.jms">Topic</A> topic,
|
|
java.lang.String name,
|
|
java.lang.String messageSelector,
|
|
boolean noLocal)</CODE>
|
|
|
|
<BR>
|
|
Creates a durable subscriber to the specified topic, using a
|
|
message selector and specifying whether messages published by its
|
|
own connection should be delivered to it.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="MapMessage.html" title="interface in javax.jms">MapMessage</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createMapMessage()">createMapMessage</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>MapMessage</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="Message.html" title="interface in javax.jms">Message</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createMessage()">createMessage</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>Message</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="ObjectMessage.html" title="interface in javax.jms">ObjectMessage</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createObjectMessage()">createObjectMessage</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates an <CODE>ObjectMessage</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="ObjectMessage.html" title="interface in javax.jms">ObjectMessage</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createObjectMessage(java.io.Serializable)">createObjectMessage</A></B>(java.io.Serializable object)</CODE>
|
|
|
|
<BR>
|
|
Creates an initialized <CODE>ObjectMessage</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="MessageProducer.html" title="interface in javax.jms">MessageProducer</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createProducer(javax.jms.Destination)">createProducer</A></B>(<A HREF="Destination.html" title="interface in javax.jms">Destination</A> destination)</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>MessageProducer</CODE> to send messages to the specified
|
|
destination.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="Queue.html" title="interface in javax.jms">Queue</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createQueue(java.lang.String)">createQueue</A></B>(java.lang.String queueName)</CODE>
|
|
|
|
<BR>
|
|
Creates a queue identity given a <CODE>Queue</CODE> name.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="StreamMessage.html" title="interface in javax.jms">StreamMessage</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createStreamMessage()">createStreamMessage</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>StreamMessage</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="TemporaryQueue.html" title="interface in javax.jms">TemporaryQueue</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createTemporaryQueue()">createTemporaryQueue</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>TemporaryQueue</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="TemporaryTopic.html" title="interface in javax.jms">TemporaryTopic</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createTemporaryTopic()">createTemporaryTopic</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>TemporaryTopic</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="TextMessage.html" title="interface in javax.jms">TextMessage</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createTextMessage()">createTextMessage</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates a <CODE>TextMessage</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="TextMessage.html" title="interface in javax.jms">TextMessage</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createTextMessage(java.lang.String)">createTextMessage</A></B>(java.lang.String text)</CODE>
|
|
|
|
<BR>
|
|
Creates an initialized <CODE>TextMessage</CODE> object.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="Topic.html" title="interface in javax.jms">Topic</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#createTopic(java.lang.String)">createTopic</A></B>(java.lang.String topicName)</CODE>
|
|
|
|
<BR>
|
|
Creates a topic identity given a <CODE>Topic</CODE> name.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#getAcknowledgeMode()">getAcknowledgeMode</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the acknowledgement mode of the session.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="MessageListener.html" title="interface in javax.jms">MessageListener</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#getMessageListener()">getMessageListener</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the session's distinguished message listener (optional).</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#getTransacted()">getTransacted</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Indicates whether the session is in transacted mode.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#recover()">recover</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Stops message delivery in this session, and restarts message delivery
|
|
with the oldest unacknowledged message.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#rollback()">rollback</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Rolls back any messages done in this transaction and releases any locks
|
|
currently held.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#run()">run</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Optional operation, intended to be used only by Application Servers,
|
|
not by ordinary JMS clients.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#setMessageListener(javax.jms.MessageListener)">setMessageListener</A></B>(<A HREF="MessageListener.html" title="interface in javax.jms">MessageListener</A> listener)</CODE>
|
|
|
|
<BR>
|
|
Sets the session's distinguished message listener (optional).</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="Session.html#unsubscribe(java.lang.String)">unsubscribe</A></B>(java.lang.String name)</CODE>
|
|
|
|
<BR>
|
|
Unsubscribes a durable subscription that has been created by a client.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
|
|
<A NAME="field_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Field Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="AUTO_ACKNOWLEDGE"><!-- --></A><H3>
|
|
AUTO_ACKNOWLEDGE</H3>
|
|
<PRE>
|
|
static final int <B>AUTO_ACKNOWLEDGE</B></PRE>
|
|
<DL>
|
|
<DD>With this acknowledgment mode, the session automatically acknowledges
|
|
a client's receipt of a message either when the session has successfully
|
|
returned from a call to <CODE>receive</CODE> or when the message
|
|
listener the session has called to process the message successfully
|
|
returns.
|
|
<P>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.jms.Session.AUTO_ACKNOWLEDGE">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="CLIENT_ACKNOWLEDGE"><!-- --></A><H3>
|
|
CLIENT_ACKNOWLEDGE</H3>
|
|
<PRE>
|
|
static final int <B>CLIENT_ACKNOWLEDGE</B></PRE>
|
|
<DL>
|
|
<DD>With this acknowledgment mode, the client acknowledges a consumed
|
|
message by calling the message's <CODE>acknowledge</CODE> method.
|
|
Acknowledging a consumed message acknowledges all messages that the
|
|
session has consumed.
|
|
|
|
<P>When client acknowledgment mode is used, a client may build up a
|
|
large number of unacknowledged messages while attempting to process
|
|
them. A JMS provider should provide administrators with a way to
|
|
limit client overrun so that clients are not driven to resource
|
|
exhaustion and ensuing failure when some resource they are using
|
|
is temporarily blocked.
|
|
<P>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="Message.html#acknowledge()"><CODE>Message.acknowledge()</CODE></A>,
|
|
<A HREF="../../constant-values.html#javax.jms.Session.CLIENT_ACKNOWLEDGE">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="DUPS_OK_ACKNOWLEDGE"><!-- --></A><H3>
|
|
DUPS_OK_ACKNOWLEDGE</H3>
|
|
<PRE>
|
|
static final int <B>DUPS_OK_ACKNOWLEDGE</B></PRE>
|
|
<DL>
|
|
<DD>This acknowledgment mode instructs the session to lazily acknowledge
|
|
the delivery of messages. This is likely to result in the delivery of
|
|
some duplicate messages if the JMS provider fails, so it should only be
|
|
used by consumers that can tolerate duplicate messages. Use of this
|
|
mode can reduce session overhead by minimizing the work the
|
|
session does to prevent duplicates.
|
|
<P>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.jms.Session.DUPS_OK_ACKNOWLEDGE">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="SESSION_TRANSACTED"><!-- --></A><H3>
|
|
SESSION_TRANSACTED</H3>
|
|
<PRE>
|
|
static final int <B>SESSION_TRANSACTED</B></PRE>
|
|
<DL>
|
|
<DD>This value is returned from the method
|
|
<CODE>getAcknowledgeMode</CODE> if the session is transacted.
|
|
If a <CODE>Session</CODE> is transacted, the acknowledgement mode
|
|
is ignored.
|
|
<P>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.jms.Session.SESSION_TRANSACTED">Constant Field Values</A></DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="close()"><!-- --></A><H3>
|
|
close</H3>
|
|
<PRE>
|
|
void <B>close</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Closes the session.
|
|
|
|
<P>Since a provider may allocate some resources on behalf of a session
|
|
outside the JVM, clients should close the resources when they are not
|
|
needed.
|
|
Relying on garbage collection to eventually reclaim these resources
|
|
may not be timely enough.
|
|
|
|
<P>There is no need to close the producers and consumers
|
|
of a closed session.
|
|
|
|
<P> This call will block until a <CODE>receive</CODE> call or message
|
|
listener in progress has completed. A blocked message consumer
|
|
<CODE>receive</CODE> call returns <CODE>null</CODE> when this session
|
|
is closed.
|
|
|
|
<P>Closing a transacted session must roll back the transaction
|
|
in progress.
|
|
|
|
<P>This method is the only <CODE>Session</CODE> method that can
|
|
be called concurrently.
|
|
|
|
<P>Invoking any other <CODE>Session</CODE> method on a closed session
|
|
must throw a <CODE>JMSException.IllegalStateException</CODE>. Closing a
|
|
closed session must <I>not</I> throw an exception.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to close the
|
|
session due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="commit()"><!-- --></A><H3>
|
|
commit</H3>
|
|
<PRE>
|
|
void <B>commit</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Commits all messages done in this transaction and releases any locks
|
|
currently held.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to commit the
|
|
transaction due to some internal error.
|
|
<DD><CODE><A HREF="TransactionRolledBackException.html" title="class in javax.jms">TransactionRolledBackException</A></CODE> - if the transaction
|
|
is rolled back due to some internal error
|
|
during commit.
|
|
<DD><CODE><A HREF="IllegalStateException.html" title="class in javax.jms">IllegalStateException</A></CODE> - if the method is not called by a
|
|
transacted session.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createBrowser(javax.jms.Queue)"><!-- --></A><H3>
|
|
createBrowser</H3>
|
|
<PRE>
|
|
<A HREF="QueueBrowser.html" title="interface in javax.jms">QueueBrowser</A> <B>createBrowser</B>(<A HREF="Queue.html" title="interface in javax.jms">Queue</A> queue)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on
|
|
the specified queue.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>queue</CODE> - the <CODE>queue</CODE> to access
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a browser
|
|
due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination
|
|
is specified<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createBrowser(javax.jms.Queue, java.lang.String)"><!-- --></A><H3>
|
|
createBrowser</H3>
|
|
<PRE>
|
|
<A HREF="QueueBrowser.html" title="interface in javax.jms">QueueBrowser</A> <B>createBrowser</B>(<A HREF="Queue.html" title="interface in javax.jms">Queue</A> queue,
|
|
java.lang.String messageSelector)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on
|
|
the specified queue using a message selector.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>queue</CODE> - the <CODE>queue</CODE> to access<DD><CODE>messageSelector</CODE> - only messages with properties matching the
|
|
message selector expression are delivered. A value of null or
|
|
an empty string indicates that there is no message selector
|
|
for the message consumer.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a browser
|
|
due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination
|
|
is specified
|
|
<DD><CODE><A HREF="InvalidSelectorException.html" title="class in javax.jms">InvalidSelectorException</A></CODE> - if the message selector is invalid.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createBytesMessage()"><!-- --></A><H3>
|
|
createBytesMessage</H3>
|
|
<PRE>
|
|
<A HREF="BytesMessage.html" title="interface in javax.jms">BytesMessage</A> <B>createBytesMessage</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>BytesMessage</CODE> object. A <CODE>BytesMessage</CODE>
|
|
object is used to send a message containing a stream of uninterpreted
|
|
bytes.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to create this message
|
|
due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createConsumer(javax.jms.Destination)"><!-- --></A><H3>
|
|
createConsumer</H3>
|
|
<PRE>
|
|
<A HREF="MessageConsumer.html" title="interface in javax.jms">MessageConsumer</A> <B>createConsumer</B>(<A HREF="Destination.html" title="interface in javax.jms">Destination</A> destination)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>MessageConsumer</CODE> for the specified destination.
|
|
Since <CODE>Queue</CODE> and <CODE>Topic</CODE>
|
|
both inherit from <CODE>Destination</CODE>, they can be used in
|
|
the destination parameter to create a <CODE>MessageConsumer</CODE>.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>destination</CODE> - the <CODE>Destination</CODE> to access.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a consumer
|
|
due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination
|
|
is specified.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createConsumer(javax.jms.Destination, java.lang.String)"><!-- --></A><H3>
|
|
createConsumer</H3>
|
|
<PRE>
|
|
<A HREF="MessageConsumer.html" title="interface in javax.jms">MessageConsumer</A> <B>createConsumer</B>(<A HREF="Destination.html" title="interface in javax.jms">Destination</A> destination,
|
|
java.lang.String messageSelector)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>MessageConsumer</CODE> for the specified destination,
|
|
using a message selector.
|
|
Since <CODE>Queue</CODE> and <CODE>Topic</CODE>
|
|
both inherit from <CODE>Destination</CODE>, they can be used in
|
|
the destination parameter to create a <CODE>MessageConsumer</CODE>.
|
|
|
|
<P>A client uses a <CODE>MessageConsumer</CODE> object to receive
|
|
messages that have been sent to a destination.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>destination</CODE> - the <CODE>Destination</CODE> to access<DD><CODE>messageSelector</CODE> - only messages with properties matching the
|
|
message selector expression are delivered. A value of null or
|
|
an empty string indicates that there is no message selector
|
|
for the message consumer.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a MessageConsumer
|
|
due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination
|
|
is specified.
|
|
<DD><CODE><A HREF="InvalidSelectorException.html" title="class in javax.jms">InvalidSelectorException</A></CODE> - if the message selector is invalid.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createConsumer(javax.jms.Destination, java.lang.String, boolean)"><!-- --></A><H3>
|
|
createConsumer</H3>
|
|
<PRE>
|
|
<A HREF="MessageConsumer.html" title="interface in javax.jms">MessageConsumer</A> <B>createConsumer</B>(<A HREF="Destination.html" title="interface in javax.jms">Destination</A> destination,
|
|
java.lang.String messageSelector,
|
|
boolean NoLocal)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates <CODE>MessageConsumer</CODE> for the specified destination, using a
|
|
message selector. This method can specify whether messages published by
|
|
its own connection should be delivered to it, if the destination is a
|
|
topic.
|
|
<P> Since <CODE>Queue</CODE> and <CODE>Topic</CODE>
|
|
both inherit from <CODE>Destination</CODE>, they can be used in
|
|
the destination parameter to create a <CODE>MessageConsumer</CODE>.
|
|
<P>A client uses a <CODE>MessageConsumer</CODE> object to receive
|
|
messages that have been published to a destination.
|
|
|
|
<P>In some cases, a connection may both publish and subscribe to a
|
|
topic. The consumer <CODE>NoLocal</CODE> attribute allows a consumer
|
|
to inhibit the delivery of messages published by its own connection.
|
|
The default value for this attribute is False. The <CODE>noLocal</CODE>
|
|
value must be supported by destinations that are topics.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>destination</CODE> - the <CODE>Destination</CODE> to access<DD><CODE>messageSelector</CODE> - only messages with properties matching the
|
|
message selector expression are delivered. A value of null or
|
|
an empty string indicates that there is no message selector
|
|
for the message consumer.<DD><CODE>NoLocal</CODE> - - if true, and the destination is a topic,
|
|
inhibits the delivery of messages published
|
|
by its own connection. The behavior for
|
|
<CODE>NoLocal</CODE> is
|
|
not specified if the destination is a queue.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a MessageConsumer
|
|
due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination
|
|
is specified.
|
|
<DD><CODE><A HREF="InvalidSelectorException.html" title="class in javax.jms">InvalidSelectorException</A></CODE> - if the message selector is invalid.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createDurableSubscriber(javax.jms.Topic, java.lang.String)"><!-- --></A><H3>
|
|
createDurableSubscriber</H3>
|
|
<PRE>
|
|
<A HREF="TopicSubscriber.html" title="interface in javax.jms">TopicSubscriber</A> <B>createDurableSubscriber</B>(<A HREF="Topic.html" title="interface in javax.jms">Topic</A> topic,
|
|
java.lang.String name)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a durable subscriber to the specified topic.
|
|
|
|
<P>If a client needs to receive all the messages published on a
|
|
topic, including the ones published while the subscriber is inactive,
|
|
it uses a durable <CODE>TopicSubscriber</CODE>. The JMS provider
|
|
retains a record of this
|
|
durable subscription and insures that all messages from the topic's
|
|
publishers are retained until they are acknowledged by this
|
|
durable subscriber or they have expired.
|
|
|
|
<P>Sessions with durable subscribers must always provide the same
|
|
client identifier. In addition, each client must specify a name that
|
|
uniquely identifies (within client identifier) each durable
|
|
subscription it creates. Only one session at a time can have a
|
|
<CODE>TopicSubscriber</CODE> for a particular durable subscription.
|
|
|
|
<P>A client can change an existing durable subscription by creating
|
|
a durable <CODE>TopicSubscriber</CODE> with the same name and a new
|
|
topic and/or
|
|
message selector. Changing a durable subscriber is equivalent to
|
|
unsubscribing (deleting) the old one and creating a new one.
|
|
|
|
<P>In some cases, a connection may both publish and subscribe to a
|
|
topic. The subscriber <CODE>NoLocal</CODE> attribute allows a subscriber
|
|
to inhibit the delivery of messages published by its own connection.
|
|
The default value for this attribute is false.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - the non-temporary <CODE>Topic</CODE> to subscribe to<DD><CODE>name</CODE> - the name used to identify this subscription
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a subscriber
|
|
due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid topic is specified.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createDurableSubscriber(javax.jms.Topic, java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
|
|
createDurableSubscriber</H3>
|
|
<PRE>
|
|
<A HREF="TopicSubscriber.html" title="interface in javax.jms">TopicSubscriber</A> <B>createDurableSubscriber</B>(<A HREF="Topic.html" title="interface in javax.jms">Topic</A> topic,
|
|
java.lang.String name,
|
|
java.lang.String messageSelector,
|
|
boolean noLocal)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a durable subscriber to the specified topic, using a
|
|
message selector and specifying whether messages published by its
|
|
own connection should be delivered to it.
|
|
|
|
<P>If a client needs to receive all the messages published on a
|
|
topic, including the ones published while the subscriber is inactive,
|
|
it uses a durable <CODE>TopicSubscriber</CODE>. The JMS provider
|
|
retains a record of this
|
|
durable subscription and insures that all messages from the topic's
|
|
publishers are retained until they are acknowledged by this
|
|
durable subscriber or they have expired.
|
|
|
|
<P>Sessions with durable subscribers must always provide the same
|
|
client identifier. In addition, each client must specify a name which
|
|
uniquely identifies (within client identifier) each durable
|
|
subscription it creates. Only one session at a time can have a
|
|
<CODE>TopicSubscriber</CODE> for a particular durable subscription.
|
|
An inactive durable subscriber is one that exists but
|
|
does not currently have a message consumer associated with it.
|
|
|
|
<P>A client can change an existing durable subscription by creating
|
|
a durable <CODE>TopicSubscriber</CODE> with the same name and a new
|
|
topic and/or
|
|
message selector. Changing a durable subscriber is equivalent to
|
|
unsubscribing (deleting) the old one and creating a new one.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - the non-temporary <CODE>Topic</CODE> to subscribe to<DD><CODE>name</CODE> - the name used to identify this subscription<DD><CODE>messageSelector</CODE> - only messages with properties matching the
|
|
message selector expression are delivered. A value of null or
|
|
an empty string indicates that there is no message selector
|
|
for the message consumer.<DD><CODE>noLocal</CODE> - if set, inhibits the delivery of messages published
|
|
by its own connection
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a subscriber
|
|
due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid topic is specified.
|
|
<DD><CODE><A HREF="InvalidSelectorException.html" title="class in javax.jms">InvalidSelectorException</A></CODE> - if the message selector is invalid.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createMapMessage()"><!-- --></A><H3>
|
|
createMapMessage</H3>
|
|
<PRE>
|
|
<A HREF="MapMessage.html" title="interface in javax.jms">MapMessage</A> <B>createMapMessage</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>MapMessage</CODE> object. A <CODE>MapMessage</CODE>
|
|
object is used to send a self-defining set of name-value pairs, where
|
|
names are <CODE>String</CODE> objects and values are primitive values
|
|
in the Java programming language.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to create this message
|
|
due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createMessage()"><!-- --></A><H3>
|
|
createMessage</H3>
|
|
<PRE>
|
|
<A HREF="Message.html" title="interface in javax.jms">Message</A> <B>createMessage</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>Message</CODE> object. The <CODE>Message</CODE>
|
|
interface is the root interface of all JMS messages. A
|
|
<CODE>Message</CODE> object holds all the
|
|
standard message header information. It can be sent when a message
|
|
containing only header information is sufficient.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to create this message
|
|
due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createObjectMessage()"><!-- --></A><H3>
|
|
createObjectMessage</H3>
|
|
<PRE>
|
|
<A HREF="ObjectMessage.html" title="interface in javax.jms">ObjectMessage</A> <B>createObjectMessage</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates an <CODE>ObjectMessage</CODE> object. An
|
|
<CODE>ObjectMessage</CODE> object is used to send a message
|
|
that contains a serializable Java object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to create this message
|
|
due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createObjectMessage(java.io.Serializable)"><!-- --></A><H3>
|
|
createObjectMessage</H3>
|
|
<PRE>
|
|
<A HREF="ObjectMessage.html" title="interface in javax.jms">ObjectMessage</A> <B>createObjectMessage</B>(java.io.Serializable object)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates an initialized <CODE>ObjectMessage</CODE> object. An
|
|
<CODE>ObjectMessage</CODE> object is used
|
|
to send a message that contains a serializable Java object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>object</CODE> - the object to use to initialize this message
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to create this message
|
|
due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createProducer(javax.jms.Destination)"><!-- --></A><H3>
|
|
createProducer</H3>
|
|
<PRE>
|
|
<A HREF="MessageProducer.html" title="interface in javax.jms">MessageProducer</A> <B>createProducer</B>(<A HREF="Destination.html" title="interface in javax.jms">Destination</A> destination)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>MessageProducer</CODE> to send messages to the specified
|
|
destination.
|
|
|
|
<P>A client uses a <CODE>MessageProducer</CODE> object to send
|
|
messages to a destination. Since <CODE>Queue</CODE> and <CODE>Topic</CODE>
|
|
both inherit from <CODE>Destination</CODE>, they can be used in
|
|
the destination parameter to create a <CODE>MessageProducer</CODE> object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>destination</CODE> - the <CODE>Destination</CODE> to send to,
|
|
or null if this is a producer which does not have a specified
|
|
destination.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a MessageProducer
|
|
due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination
|
|
is specified.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createQueue(java.lang.String)"><!-- --></A><H3>
|
|
createQueue</H3>
|
|
<PRE>
|
|
<A HREF="Queue.html" title="interface in javax.jms">Queue</A> <B>createQueue</B>(java.lang.String queueName)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a queue identity given a <CODE>Queue</CODE> name.
|
|
|
|
<P>This facility is provided for the rare cases where clients need to
|
|
dynamically manipulate queue identity. It allows the creation of a
|
|
queue identity with a provider-specific name. Clients that depend
|
|
on this ability are not portable.
|
|
|
|
<P>Note that this method is not for creating the physical queue.
|
|
The physical creation of queues is an administrative task and is not
|
|
to be initiated by the JMS API. The one exception is the
|
|
creation of temporary queues, which is accomplished with the
|
|
<CODE>createTemporaryQueue</CODE> method.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>queueName</CODE> - the name of this <CODE>Queue</CODE>
|
|
<DT><B>Returns:</B><DD>a <CODE>Queue</CODE> with the given name
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a queue
|
|
due to some internal error.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createStreamMessage()"><!-- --></A><H3>
|
|
createStreamMessage</H3>
|
|
<PRE>
|
|
<A HREF="StreamMessage.html" title="interface in javax.jms">StreamMessage</A> <B>createStreamMessage</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>StreamMessage</CODE> object. A
|
|
<CODE>StreamMessage</CODE> object is used to send a
|
|
self-defining stream of primitive values in the Java programming
|
|
language.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to create this message
|
|
due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createTemporaryQueue()"><!-- --></A><H3>
|
|
createTemporaryQueue</H3>
|
|
<PRE>
|
|
<A HREF="TemporaryQueue.html" title="interface in javax.jms">TemporaryQueue</A> <B>createTemporaryQueue</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>TemporaryQueue</CODE> object. Its lifetime will be that
|
|
of the <CODE>Connection</CODE> unless it is deleted earlier.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>a temporary queue identity
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a temporary queue
|
|
due to some internal error.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createTemporaryTopic()"><!-- --></A><H3>
|
|
createTemporaryTopic</H3>
|
|
<PRE>
|
|
<A HREF="TemporaryTopic.html" title="interface in javax.jms">TemporaryTopic</A> <B>createTemporaryTopic</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>TemporaryTopic</CODE> object. Its lifetime will be that
|
|
of the <CODE>Connection</CODE> unless it is deleted earlier.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>a temporary topic identity
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a temporary
|
|
topic due to some internal error.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createTextMessage()"><!-- --></A><H3>
|
|
createTextMessage</H3>
|
|
<PRE>
|
|
<A HREF="TextMessage.html" title="interface in javax.jms">TextMessage</A> <B>createTextMessage</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a <CODE>TextMessage</CODE> object. A <CODE>TextMessage</CODE>
|
|
object is used to send a message containing a <CODE>String</CODE>
|
|
object.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to create this message
|
|
due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createTextMessage(java.lang.String)"><!-- --></A><H3>
|
|
createTextMessage</H3>
|
|
<PRE>
|
|
<A HREF="TextMessage.html" title="interface in javax.jms">TextMessage</A> <B>createTextMessage</B>(java.lang.String text)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates an initialized <CODE>TextMessage</CODE> object. A
|
|
<CODE>TextMessage</CODE> object is used to send
|
|
a message containing a <CODE>String</CODE>.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>text</CODE> - the string used to initialize this message
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to create this message
|
|
due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createTopic(java.lang.String)"><!-- --></A><H3>
|
|
createTopic</H3>
|
|
<PRE>
|
|
<A HREF="Topic.html" title="interface in javax.jms">Topic</A> <B>createTopic</B>(java.lang.String topicName)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a topic identity given a <CODE>Topic</CODE> name.
|
|
|
|
<P>This facility is provided for the rare cases where clients need to
|
|
dynamically manipulate topic identity. This allows the creation of a
|
|
topic identity with a provider-specific name. Clients that depend
|
|
on this ability are not portable.
|
|
|
|
<P>Note that this method is not for creating the physical topic.
|
|
The physical creation of topics is an administrative task and is not
|
|
to be initiated by the JMS API. The one exception is the
|
|
creation of temporary topics, which is accomplished with the
|
|
<CODE>createTemporaryTopic</CODE> method.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>topicName</CODE> - the name of this <CODE>Topic</CODE>
|
|
<DT><B>Returns:</B><DD>a <CODE>Topic</CODE> with the given name
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a topic
|
|
due to some internal error.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAcknowledgeMode()"><!-- --></A><H3>
|
|
getAcknowledgeMode</H3>
|
|
<PRE>
|
|
int <B>getAcknowledgeMode</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Returns the acknowledgement mode of the session. The acknowledgement
|
|
mode is set at the time that the session is created. If the session is
|
|
transacted, the acknowledgement mode is ignored.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>If the session is not transacted, returns the
|
|
current acknowledgement mode for the session.
|
|
If the session
|
|
is transacted, returns SESSION_TRANSACTED.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to return the
|
|
acknowledgment mode due to some internal error.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
<DT><B>See Also:</B><DD><A HREF="Connection.html#createSession(boolean, int)"><CODE>Connection.createSession(boolean, int)</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getMessageListener()"><!-- --></A><H3>
|
|
getMessageListener</H3>
|
|
<PRE>
|
|
<A HREF="MessageListener.html" title="interface in javax.jms">MessageListener</A> <B>getMessageListener</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Returns the session's distinguished message listener (optional).
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the message listener associated with this session
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to get the message
|
|
listener due to an internal error.<DT><B>See Also:</B><DD><A HREF="Session.html#setMessageListener(javax.jms.MessageListener)"><CODE>setMessageListener(javax.jms.MessageListener)</CODE></A>,
|
|
<A HREF="ServerSessionPool.html" title="interface in javax.jms"><CODE>ServerSessionPool</CODE></A>,
|
|
<A HREF="ServerSession.html" title="interface in javax.jms"><CODE>ServerSession</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getTransacted()"><!-- --></A><H3>
|
|
getTransacted</H3>
|
|
<PRE>
|
|
boolean <B>getTransacted</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Indicates whether the session is in transacted mode.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if the session is in transacted mode
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to return the
|
|
transaction mode due to some internal error.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="recover()"><!-- --></A><H3>
|
|
recover</H3>
|
|
<PRE>
|
|
void <B>recover</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Stops message delivery in this session, and restarts message delivery
|
|
with the oldest unacknowledged message.
|
|
|
|
<P>All consumers deliver messages in a serial order.
|
|
Acknowledging a received message automatically acknowledges all
|
|
messages that have been delivered to the client.
|
|
|
|
<P>Restarting a session causes it to take the following actions:
|
|
|
|
<UL>
|
|
<LI>Stop message delivery
|
|
<LI>Mark all messages that might have been delivered but not
|
|
acknowledged as "redelivered"
|
|
<LI>Restart the delivery sequence including all unacknowledged
|
|
messages that had been previously delivered. Redelivered messages
|
|
do not have to be delivered in
|
|
exactly their original delivery order.
|
|
</UL>
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to stop and restart
|
|
message delivery due to some internal error.
|
|
<DD><CODE><A HREF="IllegalStateException.html" title="class in javax.jms">IllegalStateException</A></CODE> - if the method is called by a
|
|
transacted session.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="rollback()"><!-- --></A><H3>
|
|
rollback</H3>
|
|
<PRE>
|
|
void <B>rollback</B>()
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Rolls back any messages done in this transaction and releases any locks
|
|
currently held.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to roll back the
|
|
transaction due to some internal error.
|
|
<DD><CODE><A HREF="IllegalStateException.html" title="class in javax.jms">IllegalStateException</A></CODE> - if the method is not called by a
|
|
transacted session.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="run()"><!-- --></A><H3>
|
|
run</H3>
|
|
<PRE>
|
|
void <B>run</B>()</PRE>
|
|
<DL>
|
|
<DD>Optional operation, intended to be used only by Application Servers,
|
|
not by ordinary JMS clients.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE>run</CODE> in interface <CODE>java.lang.Runnable</CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>See Also:</B><DD><A HREF="ServerSession.html" title="interface in javax.jms"><CODE>ServerSession</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setMessageListener(javax.jms.MessageListener)"><!-- --></A><H3>
|
|
setMessageListener</H3>
|
|
<PRE>
|
|
void <B>setMessageListener</B>(<A HREF="MessageListener.html" title="interface in javax.jms">MessageListener</A> listener)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Sets the session's distinguished message listener (optional).
|
|
|
|
<P>When the distinguished message listener is set, no other form of
|
|
message receipt in the session can
|
|
be used; however, all forms of sending messages are still supported.
|
|
|
|
<P>This is an expert facility not used by regular JMS clients.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the message listener to associate with this session
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to set the message
|
|
listener due to an internal error.<DT><B>See Also:</B><DD><A HREF="Session.html#getMessageListener()"><CODE>getMessageListener()</CODE></A>,
|
|
<A HREF="ServerSessionPool.html" title="interface in javax.jms"><CODE>ServerSessionPool</CODE></A>,
|
|
<A HREF="ServerSession.html" title="interface in javax.jms"><CODE>ServerSession</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="unsubscribe(java.lang.String)"><!-- --></A><H3>
|
|
unsubscribe</H3>
|
|
<PRE>
|
|
void <B>unsubscribe</B>(java.lang.String name)
|
|
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
|
|
<DL>
|
|
<DD>Unsubscribes a durable subscription that has been created by a client.
|
|
|
|
<P>This method deletes the state being maintained on behalf of the
|
|
subscriber by its provider.
|
|
|
|
<P>It is erroneous for a client to delete a durable subscription
|
|
while there is an active <CODE>MessageConsumer</CODE>
|
|
or <CODE>TopicSubscriber</CODE> for the
|
|
subscription, or while a consumed message is part of a pending
|
|
transaction or has not been acknowledged in the session.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name used to identify this subscription
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to unsubscribe to the
|
|
durable subscription due to some internal error.
|
|
<DD><CODE><A HREF="InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid subscription name
|
|
is specified.<DT><B>Since:</B></DT>
|
|
<DD>1.1</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="Session.html#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
Sonic Management API</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="ServerSessionPool.html" title="interface in javax.jms"><B>PREV CLASS</B></A>
|
|
<A HREF="StreamMessage.html" title="interface in javax.jms"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html@javax%252Fjms%252FSession.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Session.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | <A HREF="Session.html#field_summary">FIELD</A> | CONSTR | <A HREF="Session.html#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="Session.html#field_detail">FIELD</A> | CONSTR | <A HREF="Session.html#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
<font size="-1">Copyright © 2001-2011
|
|
<a href="http://www.progress.com" target="_top"> Progress Software Corporation</a>. All Rights Reserved.
|
|
<br>HTML formatted on 12-Aug-2011.</font>
|
|
</BODY>
|
|
</HTML>
|