|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.exolab.jms.client.JmsConnection
|
+--org.exolab.jms.client.JmsQueueConnection
|
+--org.exolab.jms.client.JmsXAQueueConnection
Client implementation of the javax.jms.XAQueueConnection
interface.
| Constructor Summary | |
JmsXAQueueConnection(JmsXAConnectionFactory factory,
java.lang.String id,
java.lang.String username,
java.lang.String password)
Construct a new JmsXAQueueConnection. |
|
| Method Summary | |
protected void |
addSession(org.exolab.jms.client.JmsSession session)
Add the specified session to the list of managed sessions. |
void |
close()
Closes the connection. |
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination destination,
java.lang.String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
Creates a connection consumer for this connection (optional operation). |
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Queue queue,
java.lang.String selector,
javax.jms.ServerSessionPool pool,
int maxMessages)
Create a connection consumer for this connection |
javax.jms.ConnectionConsumer |
createDurableConnectionConsumer(javax.jms.Topic topic,
java.lang.String subscriptionName,
java.lang.String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
This implementation always throws IllegalStateException,
as per section 4.11 of the JMS specification. |
javax.jms.QueueSession |
createQueueSession(boolean transacted,
int acknowledgeMode)
Creates an XAQueueSession object. |
javax.jms.Session |
createSession(boolean transacted,
int acknowledgeMode)
Creates a Session object. |
javax.jms.XAQueueSession |
createXAQueueSession()
Creates an XAQueueSession object. |
javax.jms.XASession |
createXASession()
Creates an XASession object. |
protected void |
deleteTemporaryDestination(JmsDestination destination)
Delete the temporary destination and all the registered sessions consumers waiting to receive messages from this destination will be stopped. |
protected void |
ensureOpen()
Verifies that the connection is open. |
java.lang.String |
getClientID()
Gets the client identifier for this connection. |
long |
getConnectionId()
Returns the connection identifier. |
javax.jms.ExceptionListener |
getExceptionListener()
Returns the ExceptionListener for this connection. |
javax.jms.ConnectionMetaData |
getMetaData()
Returns the metadata for this connection. |
protected ServerConnection |
getServerConnection()
Returns the server connection. |
protected boolean |
isStopped()
Returns the running state of the connection. |
void |
notifyExceptionListener(javax.jms.JMSException message)
Notify the exception listener of a JMSException. |
protected void |
removeSession(org.exolab.jms.client.JmsSession session)
Remove the specified session from the list of managed sessions. |
void |
setClientID(java.lang.String clientID)
Sets the client identifier for this connection. |
void |
setExceptionListener(javax.jms.ExceptionListener listener)
Sets an exception listener for this connection. |
protected void |
setModified()
Flags this connection as being modified. |
void |
start()
Starts (or restarts) a connection's delivery of incoming messages. |
void |
stop()
Temporarily stops a connection's delivery of incoming messages. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jms.XAConnection |
createSession |
| Methods inherited from interface javax.jms.Connection |
close, createConnectionConsumer, createDurableConnectionConsumer, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop |
| Methods inherited from interface javax.jms.QueueConnection |
createConnectionConsumer |
| Constructor Detail |
public JmsXAQueueConnection(JmsXAConnectionFactory factory,
java.lang.String id,
java.lang.String username,
java.lang.String password)
throws javax.jms.JMSException
JmsXAQueueConnection.factory - factory creating this objectid - the connection identifierusername - client usernamepassword - client passwordjavax.jms.JMSException - if there is any problem creating this object| Method Detail |
public javax.jms.XASession createXASession()
throws javax.jms.JMSException
XASession object.createXASession in interface javax.jms.XAConnectionXASessionjavax.jms.JMSException - if the XAConnection object fails to
create an XASession due to some
internal error.
public javax.jms.XAQueueSession createXAQueueSession()
throws javax.jms.JMSException
XAQueueSession object.createXAQueueSession in interface javax.jms.XAQueueConnectionXAQueueSessionjavax.jms.JMSException - if the XAQueueConnection object fails
to create an XA queue session due to some internal
error.
public javax.jms.QueueSession createQueueSession(boolean transacted,
int acknowledgeMode)
throws javax.jms.JMSException
XAQueueSession object.createQueueSession in interface javax.jms.XAQueueConnectioncreateQueueSession in class org.exolab.jms.client.JmsQueueConnectiontransacted - usage undefinedacknowledgeMode - usage undefinedXAQueueSessionjavax.jms.JMSException - if the XAQueueConnection object fails
to create an XA queue session due to some internal
error.
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue,
java.lang.String selector,
javax.jms.ServerSessionPool pool,
int maxMessages)
throws javax.jms.JMSException
createConnectionConsumer in interface javax.jms.QueueConnectionqueue - the queue to accessselector - the message selector. May be nullpool - the server session pool to associate with the
consumermaxMessages - the maximum number of messages that can be assigned to
a server session at one timejavax.jms.InvalidSelectorException - if the message selector is invalidjavax.jms.JMSException - if the connection consumer cannot be
created
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic,
java.lang.String subscriptionName,
java.lang.String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
throws javax.jms.JMSException
IllegalStateException,
as per section 4.11 of the JMS specification.createDurableConnectionConsumer in interface javax.jms.ConnectioncreateDurableConnectionConsumer in class org.exolab.jms.client.JmsConnectionjava.lang.IllegalStateException - if invokedpublic long getConnectionId()
public java.lang.String getClientID()
throws javax.jms.JMSException
getClientID in interface javax.jms.Connectionjavax.jms.JMSException - if the JMS provider fails to return the client ID
for this connection due to some internal error.
public void setClientID(java.lang.String clientID)
throws javax.jms.JMSException
setClientID in interface javax.jms.ConnectionclientID - the unique client identifierjavax.jms.JMSException - if the JMS provider fails to set the
client ID for this connection due to
some internal error.javax.jms.InvalidClientIDException - if the JMS client specifies an invalid
or duplicate client ID.javax.jms.IllegalStateException - if the JMS client attempts to set a
connection's client ID at the wrong time
or when it has been administratively
configured.
public javax.jms.ConnectionMetaData getMetaData()
throws javax.jms.JMSException
getMetaData in interface javax.jms.Connectionjavax.jms.JMSException - if the JMS provider fails to get the connection
metadata for this connection.
public javax.jms.ExceptionListener getExceptionListener()
throws javax.jms.JMSException
ExceptionListener for this connection.getExceptionListener in interface javax.jms.ConnectionExceptionListener for this connection, or
null if none is associated with this connection.javax.jms.JMSException - if the JMS provider fails to get the
ExceptionListener for this connection.
public void setExceptionListener(javax.jms.ExceptionListener listener)
throws javax.jms.JMSException
setExceptionListener in interface javax.jms.Connectionlistener - the exception listenerjavax.jms.JMSException - if the JMS provider fails to set the exception
listener for this connection.public void notifyExceptionListener(javax.jms.JMSException message)
message - message to deliver
public void start()
throws javax.jms.JMSException
start on a connection that has already been started is
ignored.start in interface javax.jms.Connectionjavax.jms.JMSException - if the JMS provider fails to start message delivery
due to some internal error.
public void stop()
throws javax.jms.JMSException
start method. When
the connection is stopped, delivery to all the connection's message
consumers is inhibited: synchronous receives block, and messages are not
delivered to message listeners.
This call blocks until receives and/or message listeners in progress have completed.
Stopping a connection has no effect on its ability to send messages. A
call to stop on a connection that has already been stopped
is ignored.
stop in interface javax.jms.Connectionjavax.jms.JMSException - if the JMS provider fails to stop message delivery
due to some internal error.
public void close()
throws javax.jms.JMSException
When this method is invoked, it should not return until message
processing has been shut down in an orderly fashion. This means that all
message listeners that may have been running have returned, and that all
pending receives have returned. A close terminates all pending message
receives on the connection's sessions' consumers. The receives may return
with a message or with null, depending on whether there was a message
available at the time of the close. If one or more of the connection's
sessions' message listeners is processing a message at the time when
connection close is invoked, all the facilities of the
connection and its sessions must remain available to those listeners
until they return control to the JMS provider.
Closing a connection causes any of its sessions' transactions in
progress to be rolled back. In the case where a session's work is
coordinated by an external transaction manager, a session's
commit and rollback methods are not used and
the result of a closed session's work is determined later by the
transaction manager.
Invoking the acknowledge method of a received message
from a closed connection's session must throw an
IllegalStateException.
Closing a closed connection must NOT throw an exception.
close in interface javax.jms.Connectionjavax.jms.JMSException - if the JMS provider fails to close the connection
due to some internal error.
public javax.jms.Session createSession(boolean transacted,
int acknowledgeMode)
throws javax.jms.JMSException
Session object.createSession in interface javax.jms.Connectiontransacted - indicates whether the session is transactedacknowledgeMode - indicates whether the consumer or the client will
acknowledge any messages it receives; ignored if
the session is transacted. Legal values are
Session.AUTO_ACKNOWLEDGE,
Session.CLIENT_ACKNOWLEDGE, and
Session.DUPS_OK_ACKNOWLEDGE.javax.jms.JMSException - if the Connection object fails to
create a session due to some internal error or lack
of support for the specific transaction and
acknowledgement mode.Session.AUTO_ACKNOWLEDGE,
Session.CLIENT_ACKNOWLEDGE,
Session.DUPS_OK_ACKNOWLEDGE
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination,
java.lang.String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
throws javax.jms.JMSException
createConnectionConsumer in interface javax.jms.Connectiondestination - the destination to accessmessageSelector - 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.sessionPool - the server session pool to associate with this
connection consumermaxMessages - the maximum number of messages that can be
assigned to a server session at one timejavax.jms.JMSException - if the Connection object fails to
create a connection consumer due to some internal
error or invalid arguments for
sessionPool and
messageSelector.javax.jms.InvalidDestinationException - if an invalid destination is
specified.javax.jms.InvalidSelectorException - if the message selector is invalid.
protected ServerConnection getServerConnection()
throws javax.jms.JMSException
javax.jms.JMSException - if the connection is nullprotected void addSession(org.exolab.jms.client.JmsSession session)
session - session to registerprotected void removeSession(org.exolab.jms.client.JmsSession session)
session - session to removeprotected boolean isStopped()
true if stoppedprotected void setModified()
JmsConnection.setClientID(java.lang.String) will result in an IllegalStateException
being thrown.
protected void deleteTemporaryDestination(JmsDestination destination)
throws javax.jms.JMSException
destination - temporary destination to deletejavax.jms.JMSException -
protected void ensureOpen()
throws javax.jms.IllegalStateException
javax.jms.IllegalStateException - if the connection is closed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||