|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jms.AQjmsObject | +--oracle.jms.AQjmsConnection
Oracle class implementing javax.jms.QueueConnection, javax.jms.TopicConnection
Method Summary | |
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 messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) This method is not supported in the current release |
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Topic topic, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, 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) Create a durable connection consumer for this connection. |
javax.jms.QueueSession |
createQueueSession(boolean transacted, int ack_mode) create a queue session |
javax.jms.Session |
createSession(boolean transacted, int acknowledgeMode) Creates a Session object. |
javax.jms.TopicSession |
createTopicSession(boolean transacted, int ack_mode) Create a TopicSession |
java.lang.String |
getClientID() Get the client identifier for this connection. |
javax.jms.Session |
getCurrentJmsSession() Return the current open JMS session for this connection Important: This method will be deprecated in a future release |
javax.jms.ExceptionListener |
getExceptionListener() Get Exception Listener for this Connection. |
javax.jms.ConnectionMetaData |
getMetaData() Get the meta data for this connection. |
oracle.jdbc.pool.OracleOCIConnectionPool |
getOCIConnectionPool() Get the underlying Connection Pool for this connection |
protected boolean |
isUseTempLobs() Getter and Setter for m_usetemplobs |
void |
setClientID(java.lang.String clientID) Set the client identifier for this connection |
void |
setExceptionListener(javax.jms.ExceptionListener listener) Set an exception listener for this connection. |
void |
start() Start (or restart) a Connection's delivery of incoming messages. |
void |
stop() Used to temporarily stop a Connection's delivery of incoming messages. |
Methods inherited from class oracle.jms.AQjmsObject |
checkClosed, children, finalize, getID, getParent, isOpen, localClose, preClose |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.String getClientID() throws JMSException
getClientID
in interface Connection
JMSException
- if JMS implementation fails to return the client ID for this Connection due to some internal error.public void setClientID(java.lang.String clientID) throws JMSException
setClientID
in interface Connection
clientID
- the unique client identifierJMSException
- if the JMS provider fails to set the client ID for this connection due to some internal error.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 JMSException
getMetaData
in interface Connection
JMSException
- general exception if JMS implementation fails to get the Connection meta-data for this Connection.ConnectionMetaData
public void setExceptionListener(javax.jms.ExceptionListener listener) throws JMSException
setExceptionListener
in interface Connection
listener
- the exception listenerJMSException
public javax.jms.ExceptionListener getExceptionListener() throws JMSException
getExceptionListener
in interface Connection
ExceptionListener
for this connection, or null. if no ExceptionListener
is associated with this connection.JMSException
Connection.setExceptionListener(javax.jms.ExceptionListener)
protected boolean isUseTempLobs()
public void start() throws JMSException
start
in interface Connection
JMSException
- if JMS implementation fails to start the message delivery due to some internal error.Connection.stop()
public void stop() throws JMSException
stop
in interface Connection
JMSException
- if JMS implementation fails to stop the message delivery due to some internal error.Connection.start()
public void close() throws JMSException
Connection
Since a provider typically allocates significant resources outside the JVM on behalf of a connection, clients should close these resources when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.
There is no need to close the sessions, producers, and consumers of a closed connection.
Closing a connection causes all temporary destinations to be deleted.
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. Closing a connection does NOT force an acknowledgment of client-acknowledged sessions.
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 Connection
close
in class oracle.jms.AQjmsObject
JMSException
- if the JMS provider fails to close the connection due to some internal error. For example, a failure to release resources or to close a socket connection can cause this exception to be thrown.public javax.jms.QueueSession createQueueSession(boolean transacted, int ack_mode) throws JMSException
createQueueSession
in interface QueueConnection
transacted
- is session transacted?ack_mode
- 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
.JMSException
- if JMS fails to create queue sessionSession.AUTO_ACKNOWLEDGE
, Session.CLIENT_ACKNOWLEDGE
, Session.DUPS_OK_ACKNOWLEDGE
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws JMSException
createConnectionConsumer
in interface QueueConnection
queue
- the queue 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 timeJMSException
- NOT_SUPPORTEDConnectionConsumer
public javax.jms.TopicSession createTopicSession(boolean transacted, int ack_mode) throws JMSException
createTopicSession
in interface TopicConnection
transacted
- if true, the session is transacted.ack_mode
- 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
.JMSException
- if JMS Connection fails to create a session due to some internal error or lack of support for specific transaction and acknowledgement mode.Session.AUTO_ACKNOWLEDGE
, Session.CLIENT_ACKNOWLEDGE
, Session.DUPS_OK_ACKNOWLEDGE
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws JMSException
createConnectionConsumer
in interface TopicConnection
topic
- the topic 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 timeJMSException
- NOT_SUPPORTEDConnectionConsumer
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws JMSException
createDurableConnectionConsumer
in interface Connection
topic
- the topic to accesssubscriptionName
- durable subscription namemessageSelector
- 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 durable connection consumermaxMessages
- the maximum number of messages that can be assigned to a server session at one timeJMSException
- NOT_SUPPORTEDConnectionConsumer
public javax.jms.Session getCurrentJmsSession()
Important: This method will be deprecated in a future release
null
, if no JMS Session is currently available.public oracle.jdbc.pool.OracleOCIConnectionPool getOCIConnectionPool()
public javax.jms.Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
Session
object.createSession
in interface Connection
transacted
- 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
.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 JMSException
createConnectionConsumer
in interface Connection
destination
- 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 timeJMSException
- if the Connection
object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool
and messageSelector
.InvalidDestinationException
- if an invalid destination is specified.InvalidSelectorException
- if the message selector is invalid.ConnectionConsumer
|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |