|
||||||||
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.JmsTopicConnection | +--org.exolab.jms.client.JmsXATopicConnection
This class extends JmsTopicConnection
and is used to gain
an XA topic connection. All functionality comes from the base class.
XATopicConnection
,
XATopicSession
Constructor Summary | |
JmsXATopicConnection(JmsXATopicConnectionFactory factory,
java.lang.String id,
java.lang.String username,
java.lang.String password)
Instantiate an instance of this connection using the specified client identity. |
Method Summary | |
protected void |
addSession(org.exolab.jms.client.JmsSession session)
Add the specified session to the list of managed sessions |
void |
close()
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Topic topic,
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 selector,
javax.jms.ServerSessionPool pool,
int maxMessages)
Create a durable connection consumer for this connection |
javax.jms.TopicSession |
createTopicSession(boolean transacted,
int ack)
Create a new topic session |
javax.jms.XATopicSession |
createXATopicSession()
|
void |
destroy()
Release all resources used by this connection, including supporting sessions |
protected void |
ensureOpen()
Verifies that the connection is open |
java.lang.String |
getClientID()
|
java.lang.String |
getConnectionId()
Return the identity of this connection. |
javax.jms.ExceptionListener |
getExceptionListener()
|
javax.jms.ConnectionMetaData |
getMetaData()
|
protected java.util.Enumeration |
getSessions()
Returns an enumeration of all sessions managed by this connection |
protected boolean |
isManaged(org.exolab.jms.client.JmsSession session)
Test whether the specified session is managed by this connection |
protected boolean |
isStopped()
Return 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 id)
|
void |
setExceptionListener(javax.jms.ExceptionListener listener)
|
protected void |
setModified()
Flags this connection as being modified. |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.jms.TopicConnection |
createConnectionConsumer, createDurableConnectionConsumer |
Methods inherited from interface javax.jms.Connection |
close, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop |
Constructor Detail |
public JmsXATopicConnection(JmsXATopicConnectionFactory factory, java.lang.String id, java.lang.String username, java.lang.String password) throws javax.jms.JMSException
If there are any problems during the creation process the JMSException is raised
factory
- factory creating this objectid
- client identityusername
- client usernamepassword
- client passwordjavax.jms.JMSException
- if there is any problem creating this objectMethod Detail |
public javax.jms.XATopicSession createXATopicSession() throws javax.jms.JMSException
createXATopicSession
in interface javax.jms.XATopicConnection
public javax.jms.TopicSession createTopicSession(boolean transacted, int ack) throws javax.jms.JMSException
org.exolab.jms.client.JmsTopicConnection
createTopicSession
in interface javax.jms.XATopicConnection
createTopicSession
in class org.exolab.jms.client.JmsTopicConnection
org.exolab.jms.client.JmsTopicConnection
transacted
- if true
, the session is transacted.ackMode
- indicates whether the consumer or the client will
acknowledge any messages it receives. This parameter will be 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 session cannot be createdpublic javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic, java.lang.String selector, javax.jms.ServerSessionPool pool, int maxMessages) throws javax.jms.JMSException
createConnectionConsumer
in interface javax.jms.TopicConnection
topic
- the topic to accessselector
- the message selector. May be null
pool
- the server session pool to associate with the consumermaxMessages
- the maximum number of messages that can be assigned
to a server session at one timeInvalidSelectorException
- if the message selector is invalidjavax.jms.JMSException
- if the connection consumer cannot be createdpublic javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, java.lang.String subscriptionName, java.lang.String selector, javax.jms.ServerSessionPool pool, int maxMessages) throws javax.jms.JMSException
createDurableConnectionConsumer
in interface javax.jms.TopicConnection
topic
- the topic to accesssubscriptionName
- the durable subscription nameselector
- the message selector. May be null
pool
- the server session pool to associate with the consumermaxMessages
- the maximum number of messages that can be assigned
to a server session at one timeInvalidSelectorException
- if the message selector is invalidjavax.jms.JMSException
- if the connection consumer cannot be createdpublic java.lang.String getClientID() throws javax.jms.JMSException
getClientID
in interface javax.jms.Connection
public void setClientID(java.lang.String id) throws javax.jms.JMSException
setClientID
in interface javax.jms.Connection
public javax.jms.ConnectionMetaData getMetaData() throws javax.jms.JMSException
getMetaData
in interface javax.jms.Connection
public javax.jms.ExceptionListener getExceptionListener() throws javax.jms.JMSException
getExceptionListener
in interface javax.jms.Connection
public void setExceptionListener(javax.jms.ExceptionListener listener) throws javax.jms.JMSException
setExceptionListener
in interface javax.jms.Connection
public void notifyExceptionListener(javax.jms.JMSException message)
message
- message to deliverpublic void start() throws javax.jms.JMSException
start
in interface javax.jms.Connection
public void stop() throws javax.jms.JMSException
stop
in interface javax.jms.Connection
public void close() throws javax.jms.JMSException
close
in interface javax.jms.Connection
public void destroy() throws javax.jms.JMSException
javax.jms.JMSException
- - error completing this requestpublic java.lang.String getConnectionId()
protected 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 isManaged(org.exolab.jms.client.JmsSession session)
session
- session to test againstprotected java.util.Enumeration getSessions()
protected boolean isStopped()
true
if stoppedprotected void setModified()
JmsConnection.setClientID(java.lang.String)
will result in an
IllegalStateException
being thrownprotected 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 |