|
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.AQjmsSession
Oracle class implementing javax.jms.Session, javax.jms.QueueSession and javax.jms.TopicSession
Field Summary |
Fields inherited from interface javax.jms.Session |
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Method Summary | |
void |
alterAQAgent(java.lang.String agent_name, boolean enable_http, boolean enable_smtp, java.lang.String cert_loc) Alter an AQ agent. |
void |
bindAgent(oracle.jms.AQjmsAgent agent, java.lang.String certificate) Add an agent into LDAP server (bind) |
void |
close() Closes the session. |
void |
commit() Commits all messages done in this transaction and releases any locks currently held. |
oracle.jms.AdtMessage |
createAdtMessage() Create an AdtMessage. |
oracle.jms.AQjmsAdtMessage |
createAdtMessage(oracle.sql.CustomDatum payload) Create an initialized AdtMessage. |
void |
createAQAgent(java.lang.String agent_name) Create an AQ agent. |
void |
createAQAgent(java.lang.String agent_name, boolean enable_http, boolean enable_smtp, java.lang.String cert_loc) Create an AQ agent. |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue) Create a QueueBrowser to peek at the messages on the specified queue. |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue, java.lang.Object payload_factory) Create a QueueBrowser to peek at the messages on the specified queue containing ADT messages. |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue, java.lang.String messageSelector) Create a QueueBrowser to peek at the messages on the specified queue. |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue, java.lang.String messageSelector, boolean locked) Create a QueueBrowser to peek at the messages on the specified queue. |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue, java.lang.String messageSelector, java.lang.Object payload_factory) Create a QueueBrowser to peek at the messages on the specified queue containing ADT messages. |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue, java.lang.String messageSelector, java.lang.Object payload_factory, boolean locked) Create a QueueBrowser to peek at the messages on the specified queue containing ADT messages. |
oracle.jms.TopicBrowser |
createBrowser(javax.jms.Topic topic, java.lang.String cons_name) Create a TopicBrowser to peek at the messages on the specified topic. |
oracle.jms.TopicBrowser |
createBrowser(javax.jms.Topic topic, java.lang.String cons_name, boolean locked) Create a TopicBrowser to peek at the messages on the specified topic. |
oracle.jms.TopicBrowser |
createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.Object payload_factory) Create a TopicBrowser to peek at the messages on the specified topic containing ADT messages. |
oracle.jms.TopicBrowser |
createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.Object payload_factory, boolean locked) Create a TopicBrowser to peek at the messages on the specified topic containing ADT messages. |
oracle.jms.TopicBrowser |
createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.String messageSelector) Create a TopicBrowser to peek at the messages on the specified topic. |
oracle.jms.TopicBrowser |
createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.String messageSelector, boolean locked) Create a TopicBrowser to peek at the messages on the specified topic. |
oracle.jms.TopicBrowser |
createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.String messageSelector, java.lang.Object payload_factory) Create a TopicBrowser to peek at the messages on the specified topic containing ADT messages. |
oracle.jms.TopicBrowser |
createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.String messageSelector, java.lang.Object payload_factory, boolean locked) Create a TopicBrowser to peek at the messages on the specified topic containing ADT messages. |
javax.jms.BytesMessage |
createBytesMessage() Creates a BytesMessage object. |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination) Creates a MessageConsumer for the specified destination. |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination, java.lang.String messageSelector) Creates a MessageConsumer for the specified destination, using a message selector. |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination, java.lang.String messageSelector, boolean NoLocal) Creates MessageConsumer for the specified destination, using a message selector. |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination, java.lang.String messageSelector, java.lang.Object payload_factory, java.lang.String transformation, boolean noLocal) A generic routine to create a MessageConsumer used to receive messages from the specified destination. |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name) Create a durable Subscriber to the specified topic. |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name, java.lang.Object payload_factory) Create a durable Subscriber to the specified topic. |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name, java.lang.String messageSelector, boolean noLocal) Create a durable Subscriber to the specified topic. |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name, java.lang.String messageSelector, boolean noLocal, java.lang.Object payload_factory) Create a durable Subscriber to the specified topic. |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name, java.lang.String messageSelector, boolean noLocal, java.lang.Object payload_factory, java.lang.String transformation) Create a durable Subscriber to the specified topic. |
javax.jms.MapMessage |
createMapMessage() Create a MapMessage. |
javax.jms.Message |
createMessage() Create a TextMessage but treat it as a generic, header-only message. |
javax.jms.ObjectMessage |
createObjectMessage() Create an ObjectMessage. |
javax.jms.ObjectMessage |
createObjectMessage(java.io.Serializable object) Create an initialized ObjectMessage. |
oracle.jms.AdtMessage |
createORAMessage() Create an AdtMessage. |
oracle.jms.AQjmsAdtMessage |
createORAMessage(oracle.sql.ORAData payload) Create an initialized AdtMessage. |
javax.jms.MessageProducer |
createProducer(javax.jms.Destination destination) Creates a MessageProducer to send messages to the specified destination. |
javax.jms.TopicPublisher |
createPublisher(javax.jms.Topic topic) Create a Publisher for the specified topic. |
javax.jms.Queue |
createQueue(oracle.AQ.AQQueueTable q_table, java.lang.String queue_name, oracle.jms.AQjmsDestinationProperty dest_property) Create a queue. |
javax.jms.Queue |
createQueue(oracle.AQ.AQQueueTable q_table, java.lang.String queue_name, oracle.jms.AQjmsDestinationProperty dest_property, boolean autonomous) |
javax.jms.Queue |
createQueue(java.lang.String queueName) Creates a queue identity given a Queue name. |
oracle.AQ.AQQueueTable |
createQueueTable(java.lang.String owner, java.lang.String name, oracle.AQ.AQQueueTableProperty property) Create a Queue Table. |
oracle.AQ.AQQueueTable |
createQueueTable(java.lang.String owner, java.lang.String name, oracle.AQ.AQQueueTableProperty property, boolean autonomous) |
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue) Create a QueueReceiver to receive messages from queue containing JMS payloads. |
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue, java.lang.Object payload_factory) Create a QueueReceiver to receive messages from the specified queue containing ADT messages. |
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue, java.lang.String messageSelector) Create a QueueReceiver to receive messages from a queue containing JMS payloads. |
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue, java.lang.String messageSelector, java.lang.Object payload_factory) Create a QueueReceiver to receive messages from the specified queue containing ADT messages. |
void |
createRemoteSubscriber(javax.jms.Topic topic, oracle.jms.AQjmsAgent remote_subscriber, java.lang.String messageSelector) Create a remote subscriber for a topic. |
void |
createRemoteSubscriber(javax.jms.Topic topic, oracle.jms.AQjmsAgent remote_subscriber, java.lang.String messageSelector, java.lang.Object payload_factory) Create a remote subscriber for a topic. |
void |
createRemoteSubscriber(javax.jms.Topic topic, oracle.jms.AQjmsAgent remote_subscriber, java.lang.String messageSelector, java.lang.Object payload_factory, java.lang.String transformation) Create a remote subscriber for a topic. |
javax.jms.QueueSender |
createSender(javax.jms.Queue queue) Create a QueueSender to send messages to the specified queue. |
javax.jms.StreamMessage |
createStreamMessage() Create a StreamMessage. |
javax.jms.TopicSubscriber |
createSubscriber(javax.jms.Topic topic) Creates a nondurable subscriber to the specified topic. |
javax.jms.TopicSubscriber |
createSubscriber(javax.jms.Topic topic, java.lang.String messageSelector, boolean noLocal) Creates a nondurable subscriber to the specified topic, using a message selector or specifying whether messages published by its own connection should be delivered to it. |
javax.jms.TemporaryQueue |
createTemporaryQueue() Creates a TemporaryQueue object. |
javax.jms.TemporaryTopic |
createTemporaryTopic() Create a temporary topic. |
javax.jms.TextMessage |
createTextMessage() Create a TextMessage. |
javax.jms.TextMessage |
createTextMessage(java.lang.String text) Create an initialized TextMessage. |
javax.jms.TextMessage |
createTextMessage(java.lang.StringBuffer stringBuffer) Create an initialized TextMessage. |
javax.jms.Topic |
createTopic(oracle.AQ.AQQueueTable q_table, java.lang.String topic_name, oracle.jms.AQjmsDestinationProperty dest_property) Create a topic |
javax.jms.Topic |
createTopic(oracle.AQ.AQQueueTable q_table, java.lang.String topic_name, oracle.jms.AQjmsDestinationProperty dest_property, boolean autonomous) |
javax.jms.Topic |
createTopic(java.lang.String topicName) Creates a topic identity given a Topic name. |
oracle.jms.AQjmsTopicReceiver |
createTopicReceiver(javax.jms.Topic topic, java.lang.String receiver_name, java.lang.String messageSelector) Create a TopicReceiver to receive messages from the specified topic. |
oracle.jms.AQjmsTopicReceiver |
createTopicReceiver(javax.jms.Topic topic, java.lang.String receiver_name, java.lang.String messageSelector, java.lang.Object payload_factory) Create a TopicReceiver to receive messages from the specified topic. |
void |
disableDBAccess(java.lang.String agent_name, java.lang.String db_username) Disable Agent Database Access This method revokes the privileges of the specified database user. |
void |
dropAQAgent(java.lang.String agent_name) Drop AQ agent. |
void |
enableDBAccess(java.lang.String agent_name, java.lang.String db_username) Enable Agent Database Access This method enables the given agent name to have the privileges of the specified database user. |
int |
getAckMode() Returns the acknowledgement mode with which the session was created Important: This method will be deprecated in a future release.Use getAcknowledgeMode() instead. |
int |
getAcknowledgeMode() Returns the acknowledgement mode of the session. |
java.sql.Connection |
getDBConnection() Return the JDBC connection used to connect to the database. |
oracle.jms.AQjmsConnection |
getJmsConnection() This method returns the JMS connection in which this session was created |
javax.jms.MessageListener |
getMessageListener() Return the session's distinguished message listener. |
protected long[] |
getOCIHandles() |
javax.jms.Queue |
getQueue(java.lang.String owner, java.lang.String name) Get an existing queue. |
oracle.AQ.AQQueueTable |
getQueueTable(java.lang.String owner, java.lang.String name) Get a handle to an existing queue-table If owner of queue-table is not the same as the user which opened the connection, the caller must have AQ enqueue/dequeue priveleges on queues/topics in the queue table. |
javax.jms.Topic |
getTopic(java.lang.String owner, java.lang.String name) Get an existing topic. |
boolean |
getTransacted() Indicates whether the session is in transacted mode. |
java.util.Map |
getTypeMap() Get the JDBC type map |
void |
grantSystemPrivilege(java.lang.String privilege, java.lang.String grantee, boolean admin_option) Grant AQ system privileges to users/roles. |
void |
recover() Commits the current transaction in the CLIENT_ACKNOWLEDGE mode if the session is a non transacted session. |
void |
revokeSystemPrivilege(java.lang.String privilege, java.lang.String grantee) Revoke AQ system privilege from user/roles |
void |
rollback() Rollback any messages done in this transaction and releases any locks currently held. |
void |
run() Optional operation, intended to be used only by Application Servers, not by ordinary JMS clients. |
void |
setMessageListener(javax.jms.MessageListener listener) Set the session's distinguished message listener. |
void |
unbindAgent(oracle.jms.AQjmsAgent agent) remove an agent from LDAP server (unbind) |
void |
unsubscribe(java.lang.String subs_name) Unsubscribe a durable subscription that has been created by a client. |
void |
unsubscribe(javax.jms.Topic topic, oracle.jms.AQjmsAgent remote_subscriber) Unsubscribe a remote durable subscription that has been created by a client on the specified topic |
void |
unsubscribe(javax.jms.Topic topic, java.lang.String subs_name) Unsubscribe a durable subscription that has been created by a client on the specified topic |
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 javax.jms.BytesMessage createBytesMessage() throws JMSException
Session
BytesMessage
object. A BytesMessage
object is used to send a message containing a stream of uninterpreted bytes.createBytesMessage
in interface Session
JMSException
- if the JMS provider fails to create this message due to some internal error.public javax.jms.MapMessage createMapMessage() throws JMSException
createMapMessage
in interface Session
JMSException
- if some error occurs during message creationpublic javax.jms.Message createMessage() throws JMSException
createMessage
in interface Session
JMSException
- NOT_SUPPORTEDpublic javax.jms.ObjectMessage createObjectMessage() throws JMSException
createObjectMessage
in interface Session
JMSException
- if some error occurs during message creationpublic javax.jms.ObjectMessage createObjectMessage(java.io.Serializable object) throws JMSException
createObjectMessage
in interface Session
object
- the object to use to initialize this message.JMSException
- if some error occurs during message creationpublic oracle.jms.AdtMessage createAdtMessage() throws JMSException
JMSException
- if some error occurs during message creationpublic oracle.jms.AQjmsAdtMessage createAdtMessage(oracle.sql.CustomDatum payload) throws JMSException
Important: CustomDatum support (and hence this method) will be deprecated in a future release
payload
- the object to use to initialize this message. This object must support the Oracle CustomDatum interfaceJMSException
- if some error occurs during message creationcreateORAMessage(ORAData)
public oracle.jms.AdtMessage createORAMessage() throws JMSException
JMSException
- if some error occurs during message creationpublic oracle.jms.AQjmsAdtMessage createORAMessage(oracle.sql.ORAData payload) throws JMSException
payload
- the object to use to initialize this message.JMSException
- if some error occurs during message creationpublic javax.jms.StreamMessage createStreamMessage() throws JMSException
createStreamMessage
in interface Session
JMSException
- if some error occurs during message creationpublic javax.jms.TextMessage createTextMessage() throws JMSException
createTextMessage
in interface Session
JMSException
- if some error occurs during message creationpublic javax.jms.TextMessage createTextMessage(java.lang.StringBuffer stringBuffer) throws JMSException
stringBuffer
- the string buffer used to initialize this message.JMSException
- if some error occurs during message creationpublic javax.jms.TextMessage createTextMessage(java.lang.String text) throws JMSException
createTextMessage
in interface Session
text
- the string used to initialize this messageJMSException
- if some error occurs during message creationpublic boolean getTransacted() throws JMSException
Session
getTransacted
in interface Session
JMSException
- if the JMS provider fails to return the transaction mode due to some internal error.public int getAckMode() throws JMSException
Important: This method will be deprecated in a future release.Use getAcknowledgeMode() instead.
JMSException
- if session is closedgetAcknowledgeMode()
public void commit() throws JMSException
Session
commit
in interface Session
JMSException
- if the JMS provider fails to commit the transaction due to some internal error.public void rollback() throws JMSException
rollback
in interface Session
JMSException
- if JMS implementation fails to rollback the the transaction due to some internal error.public void close() throws JMSException
Session
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.
There is no need to close the producers and consumers of a closed session.
This call will block until a receive
call or message listener in progress has completed. A blocked message consumer receive
call returns null
when this session is closed.
Closing a transacted session must roll back the transaction in progress.
This method is the only Session
method that can be called concurrently.
Invoking any other Session
method on a closed session must throw a JMSException.IllegalStateException
. Closing a closed session must not throw an exception.
close
in interface Session
close
in class oracle.jms.AQjmsObject
JMSException
- if the JMS provider fails to close the session due to some internal error.public void recover() throws JMSException
recover
in interface Session
JMSException
- if the JMS provider fails to stop and restart message delivery due to some internal error.Session.recover()
public javax.jms.MessageListener getMessageListener() throws JMSException
getMessageListener
in interface Session
JMSException
- if JMS fails to get the message listener due to an internal error in JMS Provider.Session.setMessageListener(javax.jms.MessageListener)
, ServerSessionPool
, ServerSession
public void setMessageListener(javax.jms.MessageListener listener) throws JMSException
setMessageListener
in interface Session
listener
- the message listener to associate with this session.JMSException
- if JMS fails to set the message listener due to an internal error in JMS Provider.Session.getMessageListener()
, ServerSessionPool
, ServerSession
public javax.jms.Queue createQueue(java.lang.String queueName) throws JMSException
QueueSession
Queue
name.
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.
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 createTemporaryQueue
method.
createQueue
in interface QueueSession
queueName
- the name of this Queue
Queue
with the given nameJMSException
- if the session fails to create a queue due to some internal error.public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue) throws JMSException
This method can be used to create receivers only for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payload of type Sys.AnyData
For Sys.AnyData
queues, the typemap must be populated with OraDataFactory object for any user-defined SQL types.
createReceiver
in interface QueueSession
queue
- the queue to accessJMSException
- if a session fails to create a receiver due to some JMS error.InvalidDestinationException
- if invalid Queue specified.public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue, java.lang.Object payload_factory) throws JMSException
This method is used to create receivers only for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)
queue
- the queue to accesspayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADTJMSException
- if a session fails to create a receiver due to some JMS error.InvalidDestinationException
- if invalid Queue specified.public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue, java.lang.String messageSelector) throws JMSException
This method can be used to create receivers only for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payload of type Sys.AnyData
For Sys.AnyData
queues, the typemap must be populated with OraDataFactory object for any user-defined SQL types.
createReceiver
in interface QueueSession
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are delivered The selector for the QueueReceiver can be one of the following:JMSException
- if a session fails to create a receiver due to some JMS error.InvalidDestinationException
- if invalid Queue specified.InvalidSelectorException
- if the message selector is invalid.public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue, java.lang.String messageSelector, java.lang.Object payload_factory) throws JMSException
This method is used to create receivers for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADTJMSException
- if a session fails to create a receiver due to some JMS error.InvalidDestinationException
- if invalid Queue specified.InvalidSelectorException
- if the message selector is invalid.public javax.jms.QueueSender createSender(javax.jms.Queue queue) throws JMSException
createSender
in interface QueueSession
queue
- the queue to access, or null if this is an unidentifed producer.JMSException
- if a session fails to create a sender due to some JMS error.InvalidDestinationException
- if invalid Queue specified.public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue) throws JMSException
This method can be used to create browsers only for queues that contain JMS payloads (payloads of type aq$_jms_*
)
createBrowser
in interface QueueSession
queue
- the queue to accessJMSException
- if a session fails to create a browser due to some internal error.InvalidDestinationException
- if invalid Queue specified.public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.Object payload_factory) throws JMSException
This method is used to create receivers for queues that only contain Oracle ADT payloads (instead of the standard JMS defined payloads)
queue
- the queue to accesspayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT.
Important: CustomDatum support will be deprecated in a future release. Use ORAData instead
JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Queue specified.public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.String messageSelector) throws JMSException
This method can be used to create browsers only for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payload of type sys.anydata
For sys.anydata
queues, the typemap must be populated with OraDataFactory object for any user-defined SQL types.
createBrowser
in interface QueueSession
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredJMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Queue specified.InvalidSelectorException
- if the message selector is invalid.public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.String messageSelector, boolean locked) throws JMSException
This method can be used to create browsers only for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payload of type sys.anydata
For sys.anydata
queues, the typemap must be populated with OraDataFactory object for any user-defined SQL types.
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredlocked
- if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Queue specified.InvalidSelectorException
- if the message selector is invalid.public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.String messageSelector, java.lang.Object payload_factory) throws JMSException
This method is used to create browsers for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Important: CustomDatum support will be deprecated in a future release
JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Queue specified.public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.String messageSelector, java.lang.Object payload_factory, boolean locked) throws JMSException
This method is used to create browsers only for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADTlocked
- if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)
Important: CustomDatum support will be deprecated in a future release
JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Queue specified.public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic, java.lang.String cons_name) throws JMSException
This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*
)
topic
- the topic to accesscons_name
- the name of the durable subscriber/consumerJMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic, java.lang.String cons_name, boolean locked) throws JMSException
This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*
)
topic
- the topic to accesscons_name
- the name of the durable subscriber/consumerlocked
- if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.Object payload_factory) throws JMSException
This method is used to create receivers only for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads)
topic
- the topic to accesscons_name
- the name of the durable subscriber/consumerpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Important: CustomDatum support will be deprecated in a future release
JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.Object payload_factory, boolean locked) throws JMSException
This method is used to create receivers only for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads)
topic
- the topic to accesscons_name
- the name of the durable subscriber/consumerpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Important: CustomDatum support will be deprecated in a future release
locked
- if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.String messageSelector) throws JMSException
This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*
)
topic
- the topic to accesscons_name
- the name of the durable subscriber/consumermessageSelector
- only messages with properties matching the message selector expression are deliveredJMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Topic specified.InvalidSelectorException
- if the message selector is invalid.public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.String messageSelector, boolean locked) throws JMSException
This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*
)
topic
- the topic to accesscons_name
- the name of the durable subscriber/consumermessageSelector
- only messages with properties matching the message selector expression are deliveredlocked
- if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Topic specified.InvalidSelectorException
- if the message selector is invalid.public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.String messageSelector, java.lang.Object payload_factory) throws JMSException
This method is used to create browsers for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads)
topic
- the topic to accesscons_name
- the name of the durable subscriber/consumer to usemessageSelector
- only messages with properties matching the message selector expression are deliveredpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Important: CustomDatum support will be deprecated in a future release
JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic, java.lang.String cons_name, java.lang.String messageSelector, java.lang.Object payload_factory, boolean locked) throws JMSException
This method is used to create browsers for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads)
topic
- the topic to accesscons_name
- the name of the durable subscriber/consumer to usemessageSelector
- only messages with properties matching the message selector expression are deliveredpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Important: CustomDatum support will be deprecated in a future release
locked
- if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)JMSException
- if a session fails to create a browser due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public javax.jms.TemporaryQueue createTemporaryQueue() throws JMSException
QueueSession
TemporaryQueue
object. Its lifetime will be that of the QueueConnection
unless it is deleted earlier.createTemporaryQueue
in interface QueueSession
JMSException
- if the session fails to create a temporary queue due to some internal error.public javax.jms.Topic createTopic(java.lang.String topicName) throws JMSException
TopicSession
Topic
name.
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.
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 createTemporaryTopic
method.
createTopic
in interface Session
topicName
- the name of this Topic
Topic
with the given nameJMSException
- if the session fails to create a topic due to some internal error.public javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic) throws JMSException
TopicSession
A client uses a TopicSubscriber
object to receive messages that have been published to a topic.
Regular TopicSubscriber
objects are not durable. They receive only messages that are published while they are active.
In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal
attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.
createSubscriber
in interface TopicSession
topic
- the Topic
to subscribe toJMSException
- if the session fails to create a subscriber due to some internal error.public javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic, java.lang.String messageSelector, boolean noLocal) throws JMSException
TopicSession
A client uses a TopicSubscriber
object to receive messages that have been published to a topic.
Regular TopicSubscriber
objects are not durable. They receive only messages that are published while they are active.
Messages filtered out by a subscriber's message selector will never be delivered to the subscriber. From the subscriber's perspective, they do not exist.
In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal
attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.
createSubscriber
in interface TopicSession
topic
- the Topic
to subscribe tomessageSelector
- 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.noLocal
- if set, inhibits the delivery of messages published by its own connectionJMSException
- if the session fails to create a subscriber due to some internal error.public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name) throws JMSException
This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*
) A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name and message selector.
createDurableSubscriber
in interface Session
topic
- the topic to subscribe tosubs_name
- the name used to identify this subscription.JMSException
- if a session fails to create a subscriber due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name, java.lang.Object payload_factory) throws JMSException
This method is used to create subscribers only for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads) A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name and message selector.
topic
- the topic to subscribe topayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Important: CustomDatum support will be deprecated in a future release. Use ORADataFactory payload factories instead
JMSException
- if a session fails to create a subscriber due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name, java.lang.String messageSelector, boolean noLocal) throws JMSException
This method can be used to create subscribers only for topics that contain standard JMS payloads (payloads of type aq$_jms_*
)
createDurableSubscriber
in interface Session
topic
- the non-temporary Topic
to subscribe tosubs_name
- the name used to identify this subscriptionmessageSelector
- 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.noLocal
- if set, inhibits the delivery of messages published by its own connectionJMSException
- if the session fails to create a subscriber due to some internal error.Session.createDurableSubscriber(Topic,String,String,boolean)
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name, java.lang.String messageSelector, boolean noLocal, java.lang.Object payload_factory) throws JMSException
This method is used to create browsers only for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads) A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name and message selector.
topic
- the topic to subscribe tomessageSelector
- only messages with attributes matching the message selector expression are delivered. This value may be null.noLocal
- if set, inhibits the delivery of messages published by its own connectionpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT ADT messages do not contain any user defined properties. However, the selector can be used to select messages based on priority or correlation id or attribute values of the message payload The syntax for the selector for queues containing ADT messages is different from the syntax for selectors on queues containing standard JMS payloads (text, stream, object, bytes, map) The selector is similar to the AQ rules syntaxJMSException
- if a session fails to create a subscriber due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String subs_name, java.lang.String messageSelector, boolean noLocal, java.lang.Object payload_factory, java.lang.String transformation) throws JMSException
This method is used to create browsers only for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads) A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name and message selector.
topic
- the topic to subscribe tomessageSelector
- only messages with attributes matching the message selector expression are delivered. This value may be null.noLocal
- if set, inhibits the delivery of messages published by its own connectionpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT ADT messages do not contain any user defined properties. However, the selector can be used to select messages based on priority or correlation id or attribute values of the message payload The syntax for the selector for queues containing ADT messages is different from the syntax for selectors on queues containing standard JMS payloads (text, stream, object, bytes, map) The selector is similar to the AQ rules syntaxtransformation
- transformation for this subscriberJMSException
- if a session fails to create a subscriber due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public void createRemoteSubscriber(javax.jms.Topic topic, oracle.jms.AQjmsAgent remote_subscriber, java.lang.String messageSelector) throws JMSException
aq$_jms_*
AQ allows topics to have remote subscribers, ie subscribers at other topics in the same or different database. In order to use remote subscribers, you must set up propagation between the two local and remote topic
topic
- the topic to subscribe toremote_subscriber
- AQjmsAgent that refers to the remote subscribermessageSelector
- only messages with properties matching the message selector expression are delivered. This value may be null. The selector syntax is the same as that for createDurableSubscriberJMSException
public void createRemoteSubscriber(javax.jms.Topic topic, oracle.jms.AQjmsAgent remote_subscriber, java.lang.String messageSelector, java.lang.Object payload_factory) throws JMSException
AQ allows topics to have remote subscribers, ie subscribers at other topics in the same or different database. In order to use remote subscribers, you must set up propagation between the two local and remote topic
topic
- the topic to subscribe toremote_subscriber
- AQjmsAgent that refers to the remote subscribermessageSelector
- only messages with properties matching the message selector expression are delivered. This value may be null. The selector syntax is the same as that for createDurableSubscriber for topics with ADT messagespayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADTJMSException
public void createRemoteSubscriber(javax.jms.Topic topic, oracle.jms.AQjmsAgent remote_subscriber, java.lang.String messageSelector, java.lang.Object payload_factory, java.lang.String transformation) throws JMSException
AQ allows topics to have remote subscribers, ie subscribers at other topics in the same or different database. In order to use remote subscribers, you must set up propagation between the two local and remote topic
topic
- the topic to subscribe toremote_subscriber
- AQjmsAgent that refers to the remote subscribermessageSelector
- only messages with properties matching the message selector expression are delivered. This value may be null. The selector syntax is the same as that for createDurableSubscriber for topics with ADT messagespayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADTJMSException
public oracle.jms.AQjmsTopicReceiver createTopicReceiver(javax.jms.Topic topic, java.lang.String receiver_name, java.lang.String messageSelector) throws JMSException
AQ allows messages to be sent to all subscribers of a topic or to specified recipients. These receivers may or may not be subscribers of the topic. If the reciever is not a subscriber to the topic, it will receive only those messages that are explicity sent to it. This method must be used order to create a TopicReceiver object for consumers that are not subscribers of the topic
topic
- the topic to accessmessageSelector
-JMSException
- if a session fails to create a receiver due to some JMS error.InvalidDestinationException
- if invalid Topic specified.InvalidSelectorException
- if the message selector is invalid.public oracle.jms.AQjmsTopicReceiver createTopicReceiver(javax.jms.Topic topic, java.lang.String receiver_name, java.lang.String messageSelector, java.lang.Object payload_factory) throws JMSException
AQ allows messages to be sent to all subscribers of a topic or to specified recipients. These receivers may or may not be subscribers of the topic. If the reciever is not a subscriber to the topic, it will receive only those messages that are explicity sent to it This method must be used order to create a TopicReceiver object for consumers that are not subscribers of the topic
topic
- the topic to accessmessageSelector
-JMSException
- if a session fails to create a receiver due to some JMS error.InvalidDestinationException
- if invalid Topic specified.InvalidSelectorException
- if the message selector is invalid.public javax.jms.TopicPublisher createPublisher(javax.jms.Topic topic) throws JMSException
createPublisher
in interface TopicSession
topic
- the topic to publish to, or null if this is an unidentifed producer.JMSException
- if a session fails to create a publisher due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public javax.jms.TemporaryTopic createTemporaryTopic() throws JMSException
createTemporaryTopic
in interface Session
JMSException
public void unsubscribe(java.lang.String subs_name) throws JMSException
unsubscribe
in interface Session
subs_name
- the name used to identify this subscriptionJMSException
- NOT_SUPPORTEDpublic void unsubscribe(javax.jms.Topic topic, java.lang.String subs_name) throws JMSException
topic
- the topic subscribed tosubs_name
- the name used to identify this subscription.JMSException
- if JMS fails to unsubscribe to durable subscription due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public void unsubscribe(javax.jms.Topic topic, oracle.jms.AQjmsAgent remote_subscriber) throws JMSException
topic
- the topic subscribed toremote_subscriber
- AQjmsAgent that refers to the remote subcriber. the address field of the AQjmsAgent cannot be nullJMSException
- if JMS fails to unsubscribe to durable subscription due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public void run()
Session
run
in interface Session
ServerSession
public java.sql.Connection getDBConnection() throws JMSException
JMSException
- if JMS fails to get the JDBC connectionpublic java.util.Map getTypeMap() throws JMSException
JMSException
- if type map not found or if the connection is closedpublic oracle.jms.AQjmsConnection getJmsConnection() throws JMSException
JMSException
- if JMS fails to get the connectionpublic oracle.AQ.AQQueueTable createQueueTable(java.lang.String owner, java.lang.String name, oracle.AQ.AQQueueTableProperty property) throws JMSException
owner
- the queue table owner (schema)name
- queue table nameproperty
- queue table properties. If the queuetable will be used to hold queues, then the queuetable must not be multiconsumer enabled (default). If the queue table will be used to hold topics the queuetable must be multiconsumer enabledJMSException
- if the QueueTable cannot be createdAQQueueTableProperty
, AQQueueTableProperty.setMultiConsumer(boolean)
public oracle.AQ.AQQueueTable createQueueTable(java.lang.String owner, java.lang.String name, oracle.AQ.AQQueueTableProperty property, boolean autonomous) throws JMSException
JMSException
public oracle.AQ.AQQueueTable getQueueTable(java.lang.String owner, java.lang.String name) throws JMSException
owner
- the owner (schema) of the queue-tablename
- queue-table nameJMSException
- if the queue table does not exist or if the user does not have privileges on any queue/topic in the queue-tablepublic javax.jms.Queue createQueue(oracle.AQ.AQQueueTable q_table, java.lang.String queue_name, oracle.jms.AQjmsDestinationProperty dest_property) throws JMSException
q_table
- Queue-Table in which the queue is to be created. The queue-table must not be multiconsumer enabledqueue_name
- name of the queue to be createddest_property
- Queue properties.JMSException
- if the queue could not be createdAQjmsDestinationProperty
public javax.jms.Queue createQueue(oracle.AQ.AQQueueTable q_table, java.lang.String queue_name, oracle.jms.AQjmsDestinationProperty dest_property, boolean autonomous) throws JMSException
JMSException
public javax.jms.Topic createTopic(oracle.AQ.AQQueueTable q_table, java.lang.String topic_name, oracle.jms.AQjmsDestinationProperty dest_property) throws JMSException
q_table
- Queue-Table in which the topic is to be created. The queue-table must be multiconsumer enabledtopic_name
- name of the topic to be createddest_property
- Topic properties.JMSException
- if the topic could not be createdAQjmsDestinationProperty
public javax.jms.Topic createTopic(oracle.AQ.AQQueueTable q_table, java.lang.String topic_name, oracle.jms.AQjmsDestinationProperty dest_property, boolean autonomous) throws JMSException
JMSException
public javax.jms.Queue getQueue(java.lang.String owner, java.lang.String name) throws JMSException
owner
- queue owner (schema)name
- queue nameJMSException
- if the queue could not be returned due to some errorpublic javax.jms.Topic getTopic(java.lang.String owner, java.lang.String name) throws JMSException
owner
- topic owner (schema)name
- topic nameJMSException
- if the topic could not be returned due to some errorpublic void grantSystemPrivilege(java.lang.String privilege, java.lang.String grantee, boolean admin_option) throws JMSException
privilege
- options are ENQUEUE_ANY, DEQUEUE_ANY and MANAGE_ANYgrantee
- specifies the grantee. The grantee can be a user, role or the PUBLIC roleadmin_option
- if this is set to true, the grantee is allowed to use this procedure to grant the system privilege to other users or rolesJMSException
- if the system privilege could not be granted.public void revokeSystemPrivilege(java.lang.String privilege, java.lang.String grantee) throws JMSException
privilege
- options are ENQUEUE_ANY, DEQUEUE_ANY and MANAGE_ANYgrantee
- specifies the grantee. The grantee can be a user, role or the PUBLIC roleJMSException
- if the system privilege could not be revokedpublic void createAQAgent(java.lang.String agent_name) throws JMSException
agent_name
- name of the AQ agentJMSException
- is the agent could not be created. Check linked SQL exception for detailspublic void createAQAgent(java.lang.String agent_name, boolean enable_http, boolean enable_smtp, java.lang.String cert_loc) throws JMSException
agent_name
- name of the AQ agentenable_http
- allow this agent to access AQ via HTTPenable_smtp
- allow this agent to access AQ via SMTPcert_loc
- certificate location - used authentication when accessing queues via SMTP. Not required for other protocolsJMSException
- is the agent could not be created. Check linked SQL exception for detailspublic void alterAQAgent(java.lang.String agent_name, boolean enable_http, boolean enable_smtp, java.lang.String cert_loc) throws JMSException
agent_name
- name of the AQ agentenable_http
- allow this agent to access AQ via HTTPenable_smtp
- allow this agent to access AQ via SMTPcert_loc
- certificate location - used authentication when accessing queues via SMTP. Not required for other protocolsJMSException
- is the agent could not be altered. Check linked SQL exception for detailspublic void dropAQAgent(java.lang.String agent_name) throws JMSException
agent_name
- name of the AQ agentJMSException
- is the agent could not be dropped. Check linked SQL exception for detailspublic void enableDBAccess(java.lang.String agent_name, java.lang.String db_username) throws JMSException
agent_name
- name of the AQ agentdb_username
- name of the database userJMSException
- is the agent/user mapping falied. Check linked SQL exception for detailspublic void disableDBAccess(java.lang.String agent_name, java.lang.String db_username) throws JMSException
agent_name
- name of the AQ agentdb_username
- name of the database userJMSException
- is the agent/user mapping falied. Check linked SQL exception for detailspublic void bindAgent(oracle.jms.AQjmsAgent agent, java.lang.String certificate) throws JMSException
agent
- the agent to be bindedcertificate
- the digital certificate of the agentJMSException
- if the bind call failedpublic void unbindAgent(oracle.jms.AQjmsAgent agent) throws JMSException
agent
- -- the agent to be unbindedJMSException
- if the bind call failedprotected long[] getOCIHandles() throws JMSException
JMSException
public int getAcknowledgeMode() throws JMSException
getAcknowledgeMode
in interface Session
JMSException
- if the JMS provider fails to return the acknowledgment mode due to some internal error.AQjmsConnection.createSession(boolean, int)
public javax.jms.MessageProducer createProducer(javax.jms.Destination destination) throws JMSException
MessageProducer
to send messages to the specified destination.
A client uses a MessageProducer
object to send messages to a destination. Since Queue
and Topic
both inherit from Destination
, they can be used in the destination parameter to create a MessageProducer
object.
createProducer
in interface Session
destination
- the Destination
to send to, or null if this is a producer which does not have a specified destination.JMSException
- if the session fails to create a MessageProducer due to some internal error.InvalidDestinationException
- if an invalid destination is specified.public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination) throws JMSException
Session
MessageConsumer
for the specified destination. Since Queue
and Topic
both inherit from Destination
, they can be used in the destination parameter to create a MessageConsumer
.createConsumer
in interface Session
destination
- the Destination
to access.JMSException
- if the session fails to create a consumer due to some internal error.public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, java.lang.String messageSelector) throws JMSException
Session
MessageConsumer
for the specified destination, using a message selector. Since Queue
and Topic
both inherit from Destination
, they can be used in the destination parameter to create a MessageConsumer
.
A client uses a MessageConsumer
object to receive messages that have been sent to a destination.
createConsumer
in interface Session
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.JMSException
- if the session fails to create a MessageConsumer due to some internal error.public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, java.lang.String messageSelector, boolean NoLocal) throws JMSException
Session
MessageConsumer
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.
Since Queue
and Topic
both inherit from Destination
, they can be used in the destination parameter to create a MessageConsumer
.
A client uses a MessageConsumer
object to receive messages that have been published to a destination.
In some cases, a connection may both publish and subscribe to a topic. The consumer NoLocal
attribute allows a consumer to inhibit the delivery of messages published by its own connection. The default value for this attribute is False. The noLocal
value must be supported by destinations that are topics.
createConsumer
in interface Session
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.NoLocal
- - if true, and the destination is a topic, inhibits the delivery of messages published by its own connection. The behavior for NoLocal
is not specified if the destination is a queue.JMSException
- if the session fails to create a MessageConsumer due to some internal error.public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, java.lang.String messageSelector, java.lang.Object payload_factory, java.lang.String transformation, boolean noLocal) throws JMSException
destination
- the destination to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredpayload_factory
- CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADTtransformation
- transformation if any involvednoLocal
- - if true, and the destination is a topic, inhibits the delivery of messages published by its own connection. The behavior for NoLocal
is not specified if the destination is a queue.JMSException
- if a session fails to create a consumer due to some JMS error.InvalidDestinationException
- if invalid Destination specified.InvalidSelectorException
- if the message selector is invalid.
|
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 |