|
Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) B14291-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
This is an Oracle class which implements 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 agentName, boolean enableHTTP, boolean enableSMTP, java.lang.String certLocation) 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. |
AdtMessage |
createAdtMessage() Creates an AdtMessage . |
AQjmsAdtMessage |
createAdtMessage(CustomDatum payload) Creates an initialized AdtMessage . |
void |
createAQAgent(java.lang.String agentName) Create an AQ agent. |
void |
createAQAgent(java.lang.String agentName, boolean enableHTTP, boolean enableSMTP, java.lang.String certLocation) Create an AQ agent. |
QueueBrowser |
createBrowser(Queue queue) Creates a QueueBrowser to peek at the messages in the specified queue. |
QueueBrowser |
createBrowser(Queue queue, java.lang.Object payloadFactory) Creates a QueueBrowser to peek at the messages in the specified queue containing ADT messages. |
QueueBrowser |
createBrowser(Queue queue, java.lang.String messageSelector) Creates a QueueBrowser to peek at the messages in the specified queue. |
QueueBrowser |
createBrowser(Queue queue, java.lang.String messageSelector, boolean locked) Creates a QueueBrowser to peek at the messages in the specified queue. |
QueueBrowser |
createBrowser(Queue queue, java.lang.String messageSelector, java.lang.Object payloadFactory) Creates a QueueBrowser to peek at the messages on the specified queue containing ADT messages. |
QueueBrowser |
createBrowser(Queue queue, java.lang.String messageSelector, java.lang.Object payloadFactory, boolean locked) Creates a QueueBrowser to peek at the messages on the specified queue containing ADT messages. |
TopicBrowser |
createBrowser(Topic topic, java.lang.String consumerName) Creates a TopicBrowser to peek at the messages on the specified topic. |
TopicBrowser |
createBrowser(Topic topic, java.lang.String consumerName, boolean locked) Creates a TopicBrowser to peek at the messages on the specified topic. |
TopicBrowser |
createBrowser(Topic topic, java.lang.String consumerName, java.lang.Object payloadFactory) Creates a TopicBrowser to peek at the messages on the specified topic containing ADT messages. |
TopicBrowser |
createBrowser(Topic topic, java.lang.String consumerName, java.lang.Object payloadFactory, boolean locked) Creates a TopicBrowser to peek at the messages on the specified topic containing ADT messages. |
TopicBrowser |
createBrowser(Topic topic, java.lang.String consumerName, java.lang.String messageSelector) Creates a TopicBrowser to peek at the messages on the specified topic. |
TopicBrowser |
createBrowser(Topic topic, java.lang.String consumerName, java.lang.String messageSelector, boolean locked) Creates a TopicBrowser to peek at the messages on the specified topic. |
TopicBrowser |
createBrowser(Topic topic, java.lang.String consumerName, java.lang.String messageSelector, java.lang.Object payloadFactory) Creates a TopicBrowser to peek at the messages on the specified topic containing ADT messages. |
TopicBrowser |
createBrowser(Topic topic, java.lang.String consumerName, java.lang.String messageSelector, java.lang.Object payloadFactory, boolean locked) Creates a TopicBrowser to peek at the messages on the specified topic containing ADT messages. |
BytesMessage |
createBytesMessage() Creates a BytesMessage object. |
MessageConsumer |
createConsumer(Destination destination) Creates a MessageConsumer for the specified destination. |
MessageConsumer |
createConsumer(Destination destination, java.lang.String messageSelector) Creates a MessageConsumer for the specified destination, using a message selector. |
MessageConsumer |
createConsumer(Destination destination, java.lang.String messageSelector, boolean NoLocal) Creates MessageConsumer for the specified destination, using a message selector. |
MessageConsumer |
createConsumer(Destination destination, java.lang.String messageSelector, java.lang.Object payloadFactory, java.lang.String transformation, boolean noLocal) A generic routine to create a MessageConsumer used to receive messages from the specified destination. |
TopicSubscriber |
createDurableSubscriber(Topic topic, java.lang.String subscriberName) Creates a durable subscriber to the specified topic. |
TopicSubscriber |
createDurableSubscriber(Topic topic, java.lang.String subscriberName, java.lang.Object payloadFactory) Creates a durable subscriber to the specified topic. |
TopicSubscriber |
createDurableSubscriber(Topic topic, java.lang.String subscriberName, java.lang.String messageSelector, boolean noLocal) Creates a durable subscriber to the specified topic. |
TopicSubscriber |
createDurableSubscriber(Topic topic, java.lang.String subscriberName, java.lang.String messageSelector, boolean noLocal, java.lang.Object payloadFactory) Creates a durable subscriber to the specified topic. |
TopicSubscriber |
createDurableSubscriber(Topic topic, java.lang.String subscriberName, java.lang.String messageSelector, boolean noLocal, java.lang.Object payloadFactory, java.lang.String transformation) Create a durable Subscriber to the specified topic. |
MapMessage |
createMapMessage() Creates a MapMessage . |
Message |
createMessage() Creates a Message object. |
ObjectMessage |
createObjectMessage() Creates an ObjectMessage . |
ObjectMessage |
createObjectMessage(java.io.Serializable object) Creates an initialized ObjectMessage . |
AdtMessage |
createORAMessage() Creates an AdtMessage . |
AQjmsAdtMessage |
createORAMessage(ORAData payload) Creates an initialized AdtMessage . |
MessageProducer |
createProducer(Destination destination) Creates a MessageProducer to send messages to the specified destination. |
TopicPublisher |
createPublisher(Topic topic) Create a Publisher for the specified topic. |
Queue |
createQueue(oracle.AQ.AQQueueTable queueTable, java.lang.String queueName, AQjmsDestinationProperty destinationProperty) Create a queue. |
Queue |
createQueue(oracle.AQ.AQQueueTable queueTable, java.lang.String queueName, AQjmsDestinationProperty destinationProperty, boolean autonomous) |
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) |
QueueReceiver |
createReceiver(Queue queue) Creates a QueueReceiver to receive messages from a queue containing JMS payloads. |
QueueReceiver |
createReceiver(Queue queue, java.lang.Object payloadFactory) Creates a QueueReceiver to receive messages from a queue containing ADT messages. |
QueueReceiver |
createReceiver(Queue queue, java.lang.String messageSelector) Creates a QueueReceiver to receive messages from a queue containing JMS payloads. |
QueueReceiver |
createReceiver(Queue queue, java.lang.String messageSelector, java.lang.Object payloadFactory) Creates a QueueReceiver to receive messages from a queue containing ADT messages. |
void |
createRemoteSubscriber(Topic topic, oracle.jms.AQjmsAgent remoteSubscriber, java.lang.String messageSelector) Creates a remote topic subscriber. |
void |
createRemoteSubscriber(Topic topic, oracle.jms.AQjmsAgent remoteSubscriber, java.lang.String messageSelector, java.lang.Object payloadFactory) Creates a remote topic subscriber. |
void |
createRemoteSubscriber(Topic topic, oracle.jms.AQjmsAgent remoteSubscriber, java.lang.String messageSelector, java.lang.Object payloadFactory, java.lang.String transformation) Creates a remote topic subscriber. |
QueueSender |
createSender(Queue queue) Creates a QueueSender to send messages to a queue. |
StreamMessage |
createStreamMessage() Creates a StreamMessage . |
TopicSubscriber |
createSubscriber(Topic topic) Creates a nondurable subscriber to the specified topic. |
TopicSubscriber |
createSubscriber(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. |
TemporaryQueue |
createTemporaryQueue() Creates a TemporaryQueue object. |
TemporaryTopic |
createTemporaryTopic() Create a temporary topic. |
TextMessage |
createTextMessage() Creates a TextMessage . |
TextMessage |
createTextMessage(java.lang.String text) Creates an initialized TextMessage . |
TextMessage |
createTextMessage(java.lang.StringBuffer stringBuffer) Creates an initialized TextMessage . |
Topic |
createTopic(oracle.AQ.AQQueueTable queueTable, java.lang.String topicName, AQjmsDestinationProperty destinationProperty) Create a topic |
Topic |
createTopic(oracle.AQ.AQQueueTable queueTable, java.lang.String topicName, AQjmsDestinationProperty destinationProperty, boolean autonomous) |
Topic |
createTopic(java.lang.String topicName) Creates a topic identity given a Topic name. |
AQjmsTopicReceiver |
createTopicReceiver(Topic topic, java.lang.String receiverName, java.lang.String messageSelector) Creates a TopicReceiver to receive messages from the specified topic. |
AQjmsTopicReceiver |
createTopicReceiver(Topic topic, java.lang.String receiverName, java.lang.String messageSelector, java.lang.Object payloadFactory) Creates a TopicReceiver to receive messages from the specified topic. |
void |
disableDBAccess(java.lang.String agentName, java.lang.String dbUserName) Disable Agent Database Access This method revokes the privileges of the specified database user. |
void |
dropAQAgent(java.lang.String agentName) Drop AQ agent. |
void |
enableDBAccess(java.lang.String agentName, java.lang.String dbUserName) 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 this session was created. |
int |
getAcknowledgeMode() Returns the acknowledgement mode of the session. |
java.sql.Connection |
getDBConnection() Return the JDBC connection used to connect to the database. |
AQjmsConnection |
getJmsConnection() This method returns the JMS connection in which this session was created. |
MessageListener |
getMessageListener() Returns this session's distinguished message listener. |
protected long[] |
getOCIHandles() |
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. |
Topic |
getTopic(java.lang.String owner, java.lang.String name) Get an existing topic. |
boolean |
getTransacted() Checks if this 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 adminOption) Grants AQ system privileges to users/roles. |
void |
recover() Rolls back the current transaction in the Session.CLIENT_ACKNOWLEDGE mode if this session is a non-transacted session. |
void |
restartConsumers() Restarts receive on all consumers in cons_list Called when a commit or rollback is detected |
void |
revokeSystemPrivilege(java.lang.String privilege, java.lang.String grantee) Revokes AQ system privilege from user/roles. |
void |
rollback() Rolls back 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(MessageListener listener) Sets this session's distinguished message listener. |
void |
unbindAgent(oracle.jms.AQjmsAgent agent) remove an agent from LDAP server (unbind) |
void |
unsubscribe(java.lang.String subscriberName) Unsubscribe a durable subscription that has been created by a client. |
void |
unsubscribe(Topic topic, oracle.jms.AQjmsAgent remoteSubscriber) Unsubscribe a remote durable subscription that has been created by a client on the specified topic |
void |
unsubscribe(Topic topic, java.lang.String subscriberName) 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 BytesMessage createBytesMessage() throws JMSException
BytesMessage
object. A BytesMessage
object is used to send a message containing a stream of uninterpreted bytes.createBytesMessage
in interface Session
JMSException
- if the message is not created due to some error.public MapMessage createMapMessage() throws JMSException
MapMessage
. A MapMessage
is used to send a set of name-value pairs where names are String
s and values are instances of Java primitive types.createMapMessage
in interface Session
JMSException
- if the message is not created due to some error.public Message createMessage() throws JMSException
Message
object. The Message
interface is the root interface of all JMS messages. A Message
object holds all the standard message header information. It can be sent when a message containing only header information is sufficient.createMessage
in interface Session
JMSException
- if the message is not created due to some error.public ObjectMessage createObjectMessage() throws JMSException
ObjectMessage
. An ObjectMessage
is used to send a message that contains a serializable Java object.createObjectMessage
in interface Session
JMSException
- if the message is not created due to some error.public ObjectMessage createObjectMessage(java.io.Serializable object) throws JMSException
ObjectMessage
. An ObjectMessage
is used to send a message that contains a serializable Java object.createObjectMessage
in interface Session
object
- the object to use to initialize this messageJMSException
- if the message is not created due to some error.public AdtMessage createAdtMessage() throws JMSException
AdtMessage
. An AdtMessage
is used to send a message that contains a Java object that maps to an Oracle SQL ADT and implements the Oracle CustomDatum
interface.JMSException
- if the message is not created due to some error.public AQjmsAdtMessage createAdtMessage(CustomDatum payload) throws JMSException
AdtMessage
. An AQjmsAdtMessage
is used to send a message that contains a Java object that maps to an Oracle SQL ADT and implements the Oracle CustomDatum
interface.
Important: CustomDatum
support (and hence this method) will be deprecated in a future release.
payload
- the object to use to initialize this messageJMSException
- if the message is not created due to some error.createORAMessage(ORAData)
public AdtMessage createORAMessage() throws JMSException
AdtMessage
. An AdtMessage
is used to send a message that contains a Java object that maps to an Oracle SQL ADT and implements the ORAData
interface.JMSException
- if the message is not created due to some error.public AQjmsAdtMessage createORAMessage(ORAData payload) throws JMSException
AdtMessage
. An AQjmsAdtMessage
is used to send a message that contains a Java object that maps to an Oracle SQL ADT and implements the ORAData
interface.payload
- the object to use to initialize this messageJMSException
- if the message is not created due to some error.public StreamMessage createStreamMessage() throws JMSException
StreamMessage
. A StreamMessage
is used to send a stream of Java primitives.createStreamMessage
in interface Session
JMSException
- if the message is not created due to some error.public TextMessage createTextMessage() throws JMSException
TextMessage
. A TextMessage
is used to send a message containing a text payload.createTextMessage
in interface Session
JMSException
- if the message is not created due to some error.public TextMessage createTextMessage(java.lang.StringBuffer stringBuffer) throws JMSException
TextMessage
. A TextMessage
is used to send a message containing a text payload.stringBuffer
- the string buffer used to initialize this messageJMSException
- if the message is not created due to some error.public TextMessage createTextMessage(java.lang.String text) throws JMSException
TextMessage
. A TextMessage
is used to send a message containing a text payload.createTextMessage
in interface Session
text
- the text payload used to initialize this messageJMSException
- if the message is not created due to some error.public boolean getTransacted() throws JMSException
getTransacted
in interface Session
true
iff in transacted modeJMSException
- if this session is closed.public int getAckMode() throws JMSException
Important: This method will be deprecated in a future release. Use getAcknowledgeMode()
instead.
JMSException
- if this session is closed.getAcknowledgeMode()
public void commit() throws JMSException
commit
in interface Session
JMSException
- if the transaction is not committed due to some error.public void rollback() throws JMSException
rollback
in interface Session
JMSException
- if the transaction is not rolled back due to some 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
JMSException
- if the session is not closed due to some error.public void recover() throws JMSException
Session.CLIENT_ACKNOWLEDGE
mode if this session is a non-transacted session. Otherwise, this call could come from a message listener's onMessage()
method, in which case the transaction should be rolled back for all acknowledgement modes (since the listener did not successfully process the message). In all other cases the call is ignoredrecover
in interface Session
JMSException
- if the JMS provider fails to stop and restart message delivery due to some internal error.Session.recover()
public MessageListener getMessageListener() throws JMSException
getMessageListener
in interface Session
JMSException
- if the message listener is not retrieved due to some error.Session.setMessageListener(javax.jms.MessageListener)
, ServerSessionPool
, ServerSession
public void setMessageListener(MessageListener listener) throws JMSException
setMessageListener
in interface Session
listener
- the message listener to associate with this sessionJMSException
- if the message listener is not set due to some error.Session.getMessageListener()
, ServerSessionPool
, ServerSession
public 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
- name of queue, format is schema.queueName (where the schema. is optional)JMSException
- if the queue is not created due to some error.public QueueReceiver createReceiver(Queue queue) throws JMSException
QueueReceiver
to receive messages from a queue containing JMS payloads.
This method is used to create receivers for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
For Sys.AnyData
queues, the typemap must be populated with ORADataFactory
objects for any user-defined SQL types.
createReceiver
in interface QueueSession
queue
- the queue to accessJMSException
- if a receiver is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.public QueueReceiver createReceiver(Queue queue, java.lang.Object payloadFactory) throws JMSException
QueueReceiver
to receive messages from a queue containing ADT messages.
This method is used to create receivers for queues that contain Oracle ADT payloads.
queue
- the queue to accesspayloadFactory
- CustomDatumFactory
/ORADataFactory
for the java class that maps to the Oracle ADTJMSException
- if a receiver is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.public QueueReceiver createReceiver(Queue queue, java.lang.String messageSelector) throws JMSException
QueueReceiver
to receive messages from a queue containing JMS payloads.
This method is used to create receivers for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
For Sys.AnyData
queues, the typemap must be populated with ORADataFactory
objects 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 deliveredJMSMessageID
to retrieve messages that have the specified message ID. All message IDs must be prefixed with "ID:". For example, JMSMessageID = 'ID:2345234523452345'
.JMSCorrelationID
to retrieve messages that have a certain correlationID. For example, JMSCorrelationID = 'RUSH'
.JMSException
- if a receiver is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.InvalidSelectorException
- if the message selector is invalid.public QueueReceiver createReceiver(Queue queue, java.lang.String messageSelector, java.lang.Object payloadFactory) throws JMSException
QueueReceiver
to receive messages from a queue containing ADT messages.
This method is used to create receivers for queues that contain Oracle ADT payloads.
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredpayloadFactory
- CustomDatumFactory
/ORADataFactory
for the java class that maps to the Oracle ADTJMSException
- if a receiver is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.InvalidSelectorException
- if the message selector is invalid.public QueueSender createSender(Queue queue) throws JMSException
QueueSender
to send messages to a queue.createSender
in interface QueueSession
queue
- the queue to access, or null
to create an unidentifed producerJMSException
- if a sender is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.public QueueBrowser createBrowser(Queue queue) throws JMSException
QueueBrowser
to peek at the messages in the specified queue.
This method is used to create browsers for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
createBrowser
in interface QueueSession
queue
- the queue to accessJMSException
- if a browser is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.public QueueBrowser createBrowser(Queue queue, java.lang.Object payloadFactory) throws JMSException
QueueBrowser
to peek at the messages in the specified queue containing ADT messages.
This method is used to create receivers for queues that contain Oracle ADT payloads.
queue
- the queue to accesspayloadFactory
- 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 browser is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.public QueueBrowser createBrowser(Queue queue, java.lang.String messageSelector) throws JMSException
QueueBrowser
to peek at the messages in the specified queue.
This method is used to create browsers for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
For Sys.AnyData
queues, the typemap must be populated with ORADataFactory
objects 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 browser is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.InvalidSelectorException
- if the message selector is invalid.public QueueBrowser createBrowser(Queue queue, java.lang.String messageSelector, boolean locked) throws JMSException
QueueBrowser
to peek at the messages in the specified queue.
This method is used to create browsers for queues that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
For Sys.AnyData
queues, the typemap must be populated with ORADataFactory
objects 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 browser is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.InvalidSelectorException
- if the message selector is invalid.public QueueBrowser createBrowser(Queue queue, java.lang.String messageSelector, java.lang.Object payloadFactory) throws JMSException
QueueBrowser
to peek at the messages on the specified queue containing ADT messages.
This method is used to create browsers for queues that contain Oracle ADT payloads.
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredpayloadFactory
- 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 browser is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.public QueueBrowser createBrowser(Queue queue, java.lang.String messageSelector, java.lang.Object payloadFactory, boolean locked) throws JMSException
QueueBrowser
to peek at the messages on the specified queue containing ADT messages.
This method is used to create browsers for queues that contain Oracle ADT payloads.
queue
- the queue to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredpayloadFactory
- 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. Use ORAData
instead.
JMSException
- if a browser is not created due to some error.InvalidDestinationException
- if an invalid Queue
is specified.public TopicBrowser createBrowser(Topic topic, java.lang.String consumerName) throws JMSException
TopicBrowser
to peek at the messages on the specified topic. Subscribers are durable.
This method is used to create browsers for topics that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
topic
- the topic to accessconsumerName
- the name of the durable subscriber/consumerJMSException
- if a browser is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.public TopicBrowser createBrowser(Topic topic, java.lang.String consumerName, boolean locked) throws JMSException
TopicBrowser
to peek at the messages on the specified topic. Subscribers are durable.
This method is used to create browsers for topics that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
topic
- the topic to accessconsumerName
- 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 browser is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.public TopicBrowser createBrowser(Topic topic, java.lang.String consumerName, java.lang.Object payloadFactory) throws JMSException
TopicBrowser
to peek at the messages on the specified topic containing ADT messages. Subscribers are durable.
This method is used to create receivers for topics that contain Oracle ADT payloads.
topic
- the topic to accessconsumerName
- the name of the durable subscriber/consumerpayloadFactory
- 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 browser is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.public TopicBrowser createBrowser(Topic topic, java.lang.String consumerName, java.lang.Object payloadFactory, boolean locked) throws JMSException
TopicBrowser
to peek at the messages on the specified topic containing ADT messages. Subscribers are durable.
This method is used to create receivers for topics that contain Oracle ADT payloads.
topic
- the topic to accessconsumerName
- the name of the durable subscriber/consumerpayloadFactory
- 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.
locked
- if true
then messages are locked as they are browsed (similar to a SELECT
for UPDATE
)JMSException
- if a browser is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.public TopicBrowser createBrowser(Topic topic, java.lang.String consumerName, java.lang.String messageSelector) throws JMSException
TopicBrowser
to peek at the messages on the specified topic. Subscribers are durable.
This method is used to create browsers for topics that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
topic
- the topic to accessconsumerName
- the name of the durable subscriber/consumermessageSelector
- only messages with properties matching the message selector expression are deliveredJMSException
- if a browser is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.InvalidSelectorException
- if the message selector is invalid.public TopicBrowser createBrowser(Topic topic, java.lang.String consumerName, java.lang.String messageSelector, boolean locked) throws JMSException
TopicBrowser
to peek at the messages on the specified topic. Subscribers are durable.
This method is used to create browsers for topics that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
.
topic
- the topic to accessconsumerName
- 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 browser is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.InvalidSelectorException
- if the message selector is invalid.public TopicBrowser createBrowser(Topic topic, java.lang.String consumerName, java.lang.String messageSelector, java.lang.Object payloadFactory) throws JMSException
TopicBrowser
to peek at the messages on the specified topic containing ADT messages. Subscriber names are durable.
This method is used to create browsers for topics that contain Oracle ADT payloads.
topic
- the topic to accessconsumerName
- the name of the durable subscriber/consumer to usemessageSelector
- only messages with properties matching the message selector expression are deliveredpayloadFactory
- 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 browser is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.public TopicBrowser createBrowser(Topic topic, java.lang.String consumerName, java.lang.String messageSelector, java.lang.Object payloadFactory, boolean locked) throws JMSException
TopicBrowser
to peek at the messages on the specified topic containing ADT messages. Subscriber names are durable.
This method is used to create browsers for topics that contain Oracle ADT payloads.
topic
- the topic to accessconsumerName
- the name of the durable subscriber/consumer to usemessageSelector
- only messages with properties matching the message selector expression are deliveredpayloadFactory
- 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.
locked
- if true
then messages are locked as they are browsed (similar to a SELECT
for UPDATE
)JMSException
- if a browser is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.public 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 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 TopicSubscriber createSubscriber(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 TopicSubscriber createSubscriber(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 TopicSubscriber createDurableSubscriber(Topic topic, java.lang.String subscriberName) throws JMSException
This method is used to create browsers 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 tosubscriberName
- the name used to identify this subscriptionJMSException
- if a subscriber is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.public TopicSubscriber createDurableSubscriber(Topic topic, java.lang.String subscriberName, java.lang.Object payloadFactory) throws JMSException
This method is used to create subscribers 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 topayloadFactory
- 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 subscriber is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.public TopicSubscriber createDurableSubscriber(Topic topic, java.lang.String subscriberName, java.lang.String messageSelector, boolean noLocal) throws JMSException
This method is used to create subscribers for topics that contain standard JMS payloads (payloads of type aq$_jms_*
).
createDurableSubscriber
in interface Session
topic
- the non-temporary Topic
to subscribe tosubscriberName
- 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 TopicSubscriber createDurableSubscriber(Topic topic, java.lang.String subscriberName, java.lang.String messageSelector, boolean noLocal, java.lang.Object payloadFactory) throws JMSException
This method is used to create browsers 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. 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).
topic
- the topic to subscribe tosubscriberName
- the name used to identify this subscriptionmessageSelector
- only messages with attributes matching the message selector expression are delivered. This value may be null
.priority < 3 AND corr_id = 'Fiction'
tab.user_data.color = 'GREEN' AND tab.user_data.price < 30000
tab.user_data
.noLocal
- if set, inhibits the delivery of messages published by its own connectionpayloadFactory
- CustomDatumFactory
/ORADataFactory
for the java class that maps to the Oracle ADTJMSException
- if a session fails to create a subscriber due to some JMS error.InvalidDestinationException
- if invalid Topic specified.public TopicSubscriber createDurableSubscriber(Topic topic, java.lang.String subscriberName, java.lang.String messageSelector, boolean noLocal, java.lang.Object payloadFactory, java.lang.String transformation) throws JMSException
This method is used to create browsers 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. 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).
topic
- the topic to subscribe tosubscriberName
- the name used to identify this subscriptionmessageSelector
- only messages with attributes matching the message selector expression are delivered. This value may be null
.priority < 3 AND corr_id = 'Fiction'
tab.user_data.color = 'GREEN' AND tab.user_data.price < 30000
tab.user_data
.noLocal
- if set, inhibits the delivery of messages published by its own connectionpayloadFactory
- CustomDatumFactory
/ORADataFactory
for the java class that maps to the Oracle ADTtransformation
- 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(Topic topic, oracle.jms.AQjmsAgent remoteSubscriber, java.lang.String messageSelector) throws JMSException
aq$_jms_*
).
AQ allows topics to have remote subscribers, i.e. subscribers at other topics in the same or different database. In order to use remote subscribers you must set up propagation from the local topic to the remote subscriber/topic using one of the createRemoteSubscriber
methods and schedule propagation using the AQjmsDestination.schedulePropagation(javax.jms.Session, java.lang.String, java.util.Date, java.lang.Double, java.lang.String, java.lang.Double)
method.
topic
- the local topic to propagateremoteSubscriber
- the remote subscriber/topicremoteSubscriber
define the remote subscriber/topic:
name
- subscription name of the subscriber of the remote topic to which messages published to the local topic should be propagated, or null
if messages published to the local topic should be propagated to all subscribers of the remote topicaddress
- address of the remote topic. The syntax is schema.topicName@dblink (where the schema. and @dblink portions are optional).messageSelector
- 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
.JMSException
- if the remote subscriber is not created due to some error.public void createRemoteSubscriber(Topic topic, oracle.jms.AQjmsAgent remoteSubscriber, java.lang.String messageSelector, java.lang.Object payloadFactory) throws JMSException
AQ allows topics to have remote subscribers, i.e. subscribers at other topics in the same or different database. In order to use remote subscribers you must set up propagation from the local topic to the remote subscriber/topic using one of the createRemoteSubscriber
methods and schedule propagation using the AQjmsDestination.schedulePropagation(javax.jms.Session, java.lang.String, java.util.Date, java.lang.Double, java.lang.String, java.lang.Double)
method.
topic
- the local topic to propagateremoteSubscriber
- the remote subscriber/topicremoteSubscriber
define the remote subscriber/topic:
name
- subscription name of the subscriber of the remote topic to which messages published to the local topic should be propagated, or null
if messages published to the local topic should be propagated to all subscribers of the remote topicaddress
- address of the remote topic. The syntax is schema.topicName@dblink (where the schema. and @dblink portions are optional).messageSelector
- 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 messages.payloadFactory
- CustomDatumFactory
/ORADataFactory
for the java class that maps to the Oracle ADTJMSException
- if the remote subscriber is not created due to some error.public void createRemoteSubscriber(Topic topic, oracle.jms.AQjmsAgent remoteSubscriber, java.lang.String messageSelector, java.lang.Object payloadFactory, java.lang.String transformation) throws JMSException
AQ allows topics to have remote subscribers, i.e. subscribers at other topics in the same or different database. In order to use remote subscribers you must set up propagation from the local topic to the remote subscriber/topic using one of the createRemoteSubscriber
methods and schedule propagation using the AQjmsDestination.schedulePropagation(javax.jms.Session, java.lang.String, java.util.Date, java.lang.Double, java.lang.String, java.lang.Double)
method.
topic
- the local topic to propagateremoteSubscriber
- the remote subscriber/topicremoteSubscriber
define the remote subscriber/topic:
name
- subscription name of the subscriber of the remote topic to which messages published to the local topic should be propagated, or null
if messages published to the local topic should be propagated to all subscribers of the remote topicaddress
- address of the remote topic. The syntax is schema.topicName@dblink (where the schema. and @dblink portions are optional).payloadFactory
- CustomDatumFactory
/ORADataFactory
for the java class that maps to the Oracle ADTtransformation
- transformation to be appliedJMSException
- if the remote subscriber is not created due to some error.public AQjmsTopicReceiver createTopicReceiver(Topic topic, java.lang.String receiverName, java.lang.String messageSelector) throws JMSException
TopicReceiver
to receive messages from the specified topic. This method is used to create topic receivers for topics that contain JMS payloads (payloads of type aq$_jms_*
) or payloads of type Sys.AnyData
AQ allows messages to be sent to all subscribers of a topic or to specified recipients. The specified recipients may or may not be subscribers of the topic. If a specified recipient is not a subscriber of the topic, then one of the createTopicReceiver
methods must be used to create a TopicReceiver
which can receive the recipient's messages. TopicReceiver
s only receive messages that are enqueued using a recipient list where recipient receiverName
is included in the list.
topic
- the topic from which messages are to be receivedreceiverName
- the name of the recipientmessageSelector
- only messages with properties matching the message selector expression are deliveredcreateReceiver
for messageSelector
limitations.JMSException
- if a topic receiver is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.InvalidSelectorException
- if the message selector is invalid.createReceiver(Queue,String)
public AQjmsTopicReceiver createTopicReceiver(Topic topic, java.lang.String receiverName, java.lang.String messageSelector, java.lang.Object payloadFactory) throws JMSException
TopicReceiver
to receive messages from the specified topic. This method is used to create topic receivers for topics that contain Oracle ADT payloads.
AQ allows messages to be sent to all subscribers of a topic or to specified recipients. The specified recipients may or may not be subscribers of the topic. If a specified recipient is not a subscriber of the topic, then one of the createTopicReceiver
methods must be used to create a TopicReceiver
which can receive the recipient's messages. TopicReceiver
s only receive messages that are enqueued using a recipient list where recipient receiverName
is included in the list.
topic
- the topic from which messages are to be receivedreceiverName
- the name of the recipientmessageSelector
- only messages with properties matching the message selector expression are deliveredpayloadFactory
- CustomDatumFactory
/ORADataFactory
for the java class that maps to the Oracle ADTJMSException
- if a topic receiver is not created due to some error.InvalidDestinationException
- if an invalid Topic
is specified.InvalidSelectorException
- if the message selector is invalid.public TopicPublisher createPublisher(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 TemporaryTopic createTemporaryTopic() throws JMSException
createTemporaryTopic
in interface Session
JMSException
public void unsubscribe(java.lang.String subscriberName) throws JMSException
unsubscribe
in interface Session
subscriberName
- the name used to identify this subscriptionJMSException
- NOT_SUPPORTEDpublic void unsubscribe(Topic topic, java.lang.String subscriberName) throws JMSException
topic
- the topic subscribed tosubscriberName
- 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(Topic topic, oracle.jms.AQjmsAgent remoteSubscriber) throws JMSException
topic
- the topic subscribed toremoteSubscriber
- AQjmsAgent that refers to the remote subcriber. the address field of the AQjmsAgent cannot be null
JMSException
- 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 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 Queue createQueue(oracle.AQ.AQQueueTable queueTable, java.lang.String queueName, AQjmsDestinationProperty destinationProperty) throws JMSException
queueTable
- Queue-Table in which the queue is to be created. The queue-table must not be multiconsumer enabledqueueName
- name of the queue to be createddestinationProperty
- Queue properties.JMSException
- if the queue could not be createdAQjmsDestinationProperty
public Queue createQueue(oracle.AQ.AQQueueTable queueTable, java.lang.String queueName, AQjmsDestinationProperty destinationProperty, boolean autonomous) throws JMSException
JMSException
public Topic createTopic(oracle.AQ.AQQueueTable queueTable, java.lang.String topicName, AQjmsDestinationProperty destinationProperty) throws JMSException
queueTable
- Queue-Table in which the topic is to be created. The queue-table must be multiconsumer enabledtopicName
- name of the topic to be createddestinationProperty
- Topic properties.JMSException
- if the topic could not be createdAQjmsDestinationProperty
public Topic createTopic(oracle.AQ.AQQueueTable queueTable, java.lang.String topicName, AQjmsDestinationProperty destinationProperty, boolean autonomous) throws JMSException
JMSException
public 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 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 adminOption) throws JMSException
SYS
and SYSTEM
can use this procedure successfully.privilege
- options are:
"ENQUEUE_ANY"
- users with this privilege are allowed to enqueue messages to any queue/topic in the database"DEQUEUE_ANY"
- users with this privilege are allowed to dequeue messages from any queue/topic in the database"MANAGE_ANY"
- users with this privilege are allowed to access and make admin calls on any queue/topic in the databasegrantee
- specifies the grantee. The grantee can be a user, role or the "PUBLIC"
role.adminOption
- 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_ANY"
grantee
- specifies the grantee. The grantee can be a user, role or the "PUBLIC"
role.JMSException
- if the system privilege could not be revoked.public void createAQAgent(java.lang.String agentName) throws JMSException
agentName
- name of the AQ agentJMSException
- is the agent could not be created. Check linked SQL exception for detailspublic void createAQAgent(java.lang.String agentName, boolean enableHTTP, boolean enableSMTP, java.lang.String certLocation) throws JMSException
agentName
- name of the AQ agentenableHTTP
- allow this agent to access AQ via HTTPenableSMTP
- allow this agent to access AQ via SMTPcertLocation
- 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 agentName, boolean enableHTTP, boolean enableSMTP, java.lang.String certLocation) throws JMSException
agentName
- name of the AQ agentenableHTTP
- allow this agent to access AQ via HTTPenableSMTP
- allow this agent to access AQ via SMTPcertLocation
- 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 agentName) throws JMSException
agentName
- name of the AQ agentJMSException
- is the agent could not be dropped. Check linked SQL exception for detailspublic void enableDBAccess(java.lang.String agentName, java.lang.String dbUserName) throws JMSException
agentName
- name of the AQ agentdbUserName
- name of the database userJMSException
- is the agent/user mapping falied. Check linked SQL exception for detailspublic void disableDBAccess(java.lang.String agentName, java.lang.String dbUserName) throws JMSException
agentName
- name of the AQ agentdbUserName
- 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 void restartConsumers()
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 MessageProducer createProducer(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 MessageConsumer createConsumer(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 MessageConsumer createConsumer(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 MessageConsumer createConsumer(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 MessageConsumer createConsumer(Destination destination, java.lang.String messageSelector, java.lang.Object payloadFactory, java.lang.String transformation, boolean noLocal) throws JMSException
destination
- the destination to accessmessageSelector
- only messages with properties matching the message selector expression are deliveredpayloadFactory
- CustomDatumFactory
/ORADataFactory
for the java class that maps to the Oracle ADTCustomDatum
support will be deprecated in a future release. Use ORAData
instead.transformation
- 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 10g Release 2 (10.2) B14291-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |