Oracle® Streams Advanced Queuing Java API Reference
Release 1 (10.1)

B12023-01

oracle.jms
Class AQjmsSession

java.lang.Object
  |
  +--oracle.jms.AQjmsObject
        |
        +--oracle.jms.AQjmsSession
All Implemented Interfaces:
QueueSession, java.lang.Runnable, Session, TopicSession

public class AQjmsSession
extends oracle.jms.AQjmsObject
implements QueueSession, TopicSession

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

createBytesMessage

public javax.jms.BytesMessage createBytesMessage()
                                          throws JMSException
Description copied from interface: Session
Creates a BytesMessage object. A BytesMessage object is used to send a message containing a stream of uninterpreted bytes.
Specified by:
createBytesMessage in interface Session
Throws:
JMSException - if the JMS provider fails to create this message due to some internal error.

createMapMessage

public javax.jms.MapMessage createMapMessage()
                                      throws JMSException
Create a MapMessage. A MapMessage is used to send a self-defining set of name-value pairs where names are Strings and values are Java primitive types.
Specified by:
createMapMessage in interface Session
Throws:
JMSException - if some error occurs during message creation

createMessage

public javax.jms.Message createMessage()
                                throws JMSException
Create a TextMessage but treat it as a generic, header-only message.
Specified by:
createMessage in interface Session
Throws:
JMSException - NOT_SUPPORTED

createObjectMessage

public javax.jms.ObjectMessage createObjectMessage()
                                            throws JMSException
Create an ObjectMessage. An ObjectMessage is used to send a message that containing a serializable Java object.
Specified by:
createObjectMessage in interface Session
Throws:
JMSException - if some error occurs during message creation

createObjectMessage

public javax.jms.ObjectMessage createObjectMessage(java.io.Serializable object)
                                            throws JMSException
Create an initialized ObjectMessage. An ObjectMessage is used to send a message that containing a serializable Java object.
Specified by:
createObjectMessage in interface Session
Parameters:
object - the object to use to initialize this message.
Throws:
JMSException - if some error occurs during message creation

createAdtMessage

public oracle.jms.AdtMessage createAdtMessage()
                                       throws JMSException
Create an AdtMessage. An AdtMessage is used to send a message that containing an Java object that maps to a Oracle SQL ADT. This object must support the OracleCustomDatum interface.
Throws:
JMSException - if some error occurs during message creation

createAdtMessage

public oracle.jms.AQjmsAdtMessage createAdtMessage(oracle.sql.CustomDatum payload)
                                            throws JMSException
Create an initialized AdtMessage. An AQjmsAdtMessage is used to send a message that containing an Java object that maps to a Oracle SQL ADT.

Important: CustomDatum support (and hence this method) will be deprecated in a future release

Parameters:
payload - the object to use to initialize this message. This object must support the Oracle CustomDatum interface
Throws:
JMSException - if some error occurs during message creation
See Also:
createORAMessage(ORAData)

createORAMessage

public oracle.jms.AdtMessage createORAMessage()
                                       throws JMSException
Create an AdtMessage. An AdtMessage is used to send a message that containing an Java object that maps to a Oracle SQL ADT. This object must support the ORAData interface.
Throws:
JMSException - if some error occurs during message creation

createORAMessage

public oracle.jms.AQjmsAdtMessage createORAMessage(oracle.sql.ORAData payload)
                                            throws JMSException
Create an initialized AdtMessage. An AQjmsAdtMessage is used to send a message that containing an Java object that maps to a Oracle SQL ADT. This object must support the ORAData interface.
Parameters:
payload - the object to use to initialize this message.
Throws:
JMSException - if some error occurs during message creation

createStreamMessage

public javax.jms.StreamMessage createStreamMessage()
                                            throws JMSException
Create a StreamMessage. A StreamMessage is used to send a self-defining stream of Java primitives.
Specified by:
createStreamMessage in interface Session
Throws:
JMSException - if some error occurs during message creation

createTextMessage

public javax.jms.TextMessage createTextMessage()
                                        throws JMSException
Create a TextMessage. A TextMessage is used to send a message containing a StringBuffer.
Specified by:
createTextMessage in interface Session
Throws:
JMSException - if some error occurs during message creation

createTextMessage

public javax.jms.TextMessage createTextMessage(java.lang.StringBuffer stringBuffer)
                                        throws JMSException
Create an initialized TextMessage. A TextMessage is used to send a message containing a StringBuffer.
Parameters:
stringBuffer - the string buffer used to initialize this message.
Throws:
JMSException - if some error occurs during message creation

createTextMessage

public javax.jms.TextMessage createTextMessage(java.lang.String text)
                                        throws JMSException
Create an initialized TextMessage. A TextMessage is used to send a message containing a StringBuffer.
Specified by:
createTextMessage in interface Session
Parameters:
text - the string used to initialize this message
Throws:
JMSException - if some error occurs during message creation

getTransacted

public boolean getTransacted()
                      throws JMSException
Description copied from interface: Session
Indicates whether the session is in transacted mode.
Specified by:
getTransacted in interface Session
Returns:
true if the session is in transacted mode
Throws:
JMSException - if the JMS provider fails to return the transaction mode due to some internal error.

getAckMode

public int getAckMode()
               throws JMSException
Returns the acknowledgement mode with which the session was created

Important: This method will be deprecated in a future release.Use getAcknowledgeMode() instead.

Returns:
acknowlegement mode as an int
Throws:
JMSException - if session is closed
See Also:
getAcknowledgeMode()

commit

public void commit()
            throws JMSException
Description copied from interface: Session
Commits all messages done in this transaction and releases any locks currently held.
Specified by:
commit in interface Session
Throws:
JMSException - if the JMS provider fails to commit the transaction due to some internal error.

rollback

public void rollback()
              throws JMSException
Rollback any messages done in this transaction and releases any locks currently held.
Specified by:
rollback in interface Session
Throws:
JMSException - if JMS implementation fails to rollback the the transaction due to some internal error.

close

public void close()
           throws JMSException
Description copied from interface: Session
Closes the 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.

Specified by:
close in interface Session
Overrides:
close in class oracle.jms.AQjmsObject
Throws:
JMSException - if the JMS provider fails to close the session due to some internal error.

recover

public void recover()
             throws JMSException
Commits the current transaction in the CLIENT_ACKNOWLEDGE mode if the 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 rolledback for all ack modes (since the listener did not successfully process the message). In all other cases the call is ignored
Specified by:
recover in interface Session
Throws:
JMSException - if the JMS provider fails to stop and restart message delivery due to some internal error.
See Also:
Session.recover()

getMessageListener

public javax.jms.MessageListener getMessageListener()
                                             throws JMSException
Return the session's distinguished message listener.
Specified by:
getMessageListener in interface Session
Returns:
the message listener associted with this session.
Throws:
JMSException - if JMS fails to get the message listener due to an internal error in JMS Provider.
See Also:
Session.setMessageListener(javax.jms.MessageListener), ServerSessionPool, ServerSession

setMessageListener

public void setMessageListener(javax.jms.MessageListener listener)
                        throws JMSException
Set the session's distinguished message listener. When it is set no other form of message receipt in the session can be used; however, all forms of sending messages are still supported.
Specified by:
setMessageListener in interface Session
Parameters:
listener - the message listener to associate with this session.
Throws:
JMSException - if JMS fails to set the message listener due to an internal error in JMS Provider.
See Also:
Session.getMessageListener(), ServerSessionPool, ServerSession

createQueue

public javax.jms.Queue createQueue(java.lang.String queueName)
                            throws JMSException
Description copied from interface: QueueSession
Creates a queue identity given a 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.

Specified by:
createQueue in interface QueueSession
Parameters:
queueName - the name of this Queue
Returns:
a Queue with the given name
Throws:
JMSException - if the session fails to create a queue due to some internal error.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
                                       throws JMSException
Create a QueueReceiver to receive messages from queue containing JMS payloads.

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.

Specified by:
createReceiver in interface QueueSession
Parameters:
queue - the queue to access
Throws:
JMSException - if a session fails to create a receiver due to some JMS error.
InvalidDestinationException - if invalid Queue specified.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
                                              java.lang.Object payload_factory)
                                       throws JMSException
Create a QueueReceiver to receive messages from the specified queue containing ADT messages.

This method is used to create receivers only for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)

Parameters:
queue - the queue to access
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Throws:
JMSException - if a session fails to create a receiver due to some JMS error.
InvalidDestinationException - if invalid Queue specified.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
                                              java.lang.String messageSelector)
                                       throws JMSException
Create a QueueReceiver to receive messages from a queue containing JMS payloads.

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.

Specified by:
createReceiver in interface QueueSession
Parameters:
queue - the queue to access
messageSelector - only messages with properties matching the message selector expression are delivered The selector for the QueueReceiver can be one of the following:
a. JMSMessageID = 'ID:2345234523452345' to reteive messages that have the specified message ID.
    All message IDs must be prefixed with "ID:"
b. JMSCorrelationID = 'RUSH' to retrieve messages that have a certain correlationID
Throws:
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.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
                                              java.lang.String messageSelector,
                                              java.lang.Object payload_factory)
                                       throws JMSException
Create a QueueReceiver to receive messages from the specified queue containing ADT messages.

This method is used to create receivers for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)

Parameters:
queue - the queue to access
messageSelector - only messages with properties matching the message selector expression are delivered
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
The selector for the QueueReceiver can be one of the following:
a. JMSMessageID = 'ID:2345234523452345' to reteive messages that have the specified message ID.
    All message IDs must be prefixed with "ID:"
b. JMSCorrelationID = 'RUSH' to retrieve messages that have a certain correlationID
Throws:
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.

createSender

public javax.jms.QueueSender createSender(javax.jms.Queue queue)
                                   throws JMSException
Create a QueueSender to send messages to the specified queue.
Specified by:
createSender in interface QueueSession
Parameters:
queue - the queue to access, or null if this is an unidentifed producer.
Throws:
JMSException - if a session fails to create a sender due to some JMS error.
InvalidDestinationException - if invalid Queue specified.

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue)
                                     throws JMSException
Create a QueueBrowser to peek at the messages on the specified queue.

This method can be used to create browsers only for queues that contain JMS payloads (payloads of type aq$_jms_*)

Specified by:
createBrowser in interface QueueSession
Parameters:
queue - the queue to access
Throws:
JMSException - if a session fails to create a browser due to some internal error.
InvalidDestinationException - if invalid Queue specified.

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
                                            java.lang.Object payload_factory)
                                     throws JMSException
Create a QueueBrowser to peek at the messages on the specified queue containing ADT messages.

This method is used to create receivers for queues that only contain Oracle ADT payloads (instead of the standard JMS defined payloads)

Parameters:
queue - the queue to access
payload_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

Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Queue specified.

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
                                            java.lang.String messageSelector)
                                     throws JMSException
Create a QueueBrowser to peek at the messages on the specified queue.

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.

Specified by:
createBrowser in interface QueueSession
Parameters:
queue - the queue to access
messageSelector - only messages with properties matching the message selector expression are delivered
Throws:
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.

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
                                            java.lang.String messageSelector,
                                            boolean locked)
                                     throws JMSException
Create a QueueBrowser to peek at the messages on the specified queue.

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.

Parameters:
queue - the queue to access
messageSelector - only messages with properties matching the message selector expression are delivered
locked - if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)
Throws:
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.

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
                                            java.lang.String messageSelector,
                                            java.lang.Object payload_factory)
                                     throws JMSException
Create a 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 (instead of the standard JMS defined payloads)

Parameters:
queue - the queue to access
messageSelector - only messages with properties matching the message selector expression are delivered
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT

Important: CustomDatum support will be deprecated in a future release

Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Queue specified.

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
                                            java.lang.String messageSelector,
                                            java.lang.Object payload_factory,
                                            boolean locked)
                                     throws JMSException
Create a QueueBrowser to peek at the messages on the specified queue containing ADT messages.

This method is used to create browsers only for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)

Parameters:
queue - the queue to access
messageSelector - only messages with properties matching the message selector expression are delivered
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
locked - 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

Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Queue specified.

createBrowser

public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic,
                                             java.lang.String cons_name)
                                      throws JMSException
Create a TopicBrowser to peek at the messages on the specified topic. Subscribers are durable.

This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*)

Parameters:
topic - the topic to access
cons_name - the name of the durable subscriber/consumer
Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createBrowser

public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic,
                                             java.lang.String cons_name,
                                             boolean locked)
                                      throws JMSException
Create a TopicBrowser to peek at the messages on the specified topic. Subscribers are durable.

This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*)

Parameters:
topic - the topic to access
cons_name - the name of the durable subscriber/consumer
locked - if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)
Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createBrowser

public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic,
                                             java.lang.String cons_name,
                                             java.lang.Object payload_factory)
                                      throws JMSException
Create a TopicBrowser to peek at the messages on the specified topic containing ADT messages. Subscribers are durable.

This method is used to create receivers only for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads)

Parameters:
topic - the topic to access
cons_name - the name of the durable subscriber/consumer
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT

Important: CustomDatum support will be deprecated in a future release

Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createBrowser

public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic,
                                             java.lang.String cons_name,
                                             java.lang.Object payload_factory,
                                             boolean locked)
                                      throws JMSException
Create a TopicBrowser to peek at the messages on the specified topic containing ADT messages. Subscribers are durable.

This method is used to create receivers only for topics that contain Oracle ADT payloads (instead of the standard JMS defined payloads)

Parameters:
topic - the topic to access
cons_name - the name of the durable subscriber/consumer
payload_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)
Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createBrowser

public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic,
                                             java.lang.String cons_name,
                                             java.lang.String messageSelector)
                                      throws JMSException
Create a TopicBrowser to peek at the messages on the specified topic. Subscribers are durable.

This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*)

Parameters:
topic - the topic to access
cons_name - the name of the durable subscriber/consumer
messageSelector - only messages with properties matching the message selector expression are delivered
Throws:
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.

createBrowser

public oracle.jms.TopicBrowser createBrowser(javax.jms.Topic topic,
                                             java.lang.String cons_name,
                                             java.lang.String messageSelector,
                                             boolean locked)
                                      throws JMSException
Create a TopicBrowser to peek at the messages on the specified topic. Subscribers are durable.

This method can be used to create browsers only for topics that contain JMS payloads (payloads of type aq$_jms_*)

Parameters:
topic - the topic to access
cons_name - the name of the durable subscriber/consumer
messageSelector - only messages with properties matching the message selector expression are delivered
locked - if true then messages are locked as they are browsed (similar to a SELECT for UPDATE)
Throws:
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.

createBrowser

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
Create a 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 (instead of the standard JMS defined payloads)

Parameters:
topic - the topic to access
cons_name - the name of the durable subscriber/consumer to use
messageSelector - only messages with properties matching the message selector expression are delivered
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT

Important: CustomDatum support will be deprecated in a future release

Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createBrowser

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
Create a 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 (instead of the standard JMS defined payloads)

Parameters:
topic - the topic to access
cons_name - the name of the durable subscriber/consumer to use
messageSelector - only messages with properties matching the message selector expression are delivered
payload_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)
Throws:
JMSException - if a session fails to create a browser due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createTemporaryQueue

public javax.jms.TemporaryQueue createTemporaryQueue()
                                              throws JMSException
Description copied from interface: QueueSession
Creates a TemporaryQueue object. Its lifetime will be that of the QueueConnection unless it is deleted earlier.
Specified by:
createTemporaryQueue in interface QueueSession
Returns:
a temporary queue identity
Throws:
JMSException - if the session fails to create a temporary queue due to some internal error.

createTopic

public javax.jms.Topic createTopic(java.lang.String topicName)
                            throws JMSException
Description copied from interface: TopicSession
Creates a topic identity given a 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.

Specified by:
createTopic in interface Session
Parameters:
topicName - the name of this Topic
Returns:
a Topic with the given name
Throws:
JMSException - if the session fails to create a topic due to some internal error.

createSubscriber

public javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic)
                                           throws JMSException
Description copied from interface: TopicSession
Creates a nondurable subscriber to the specified topic.

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.

Specified by:
createSubscriber in interface TopicSession
Parameters:
topic - the Topic to subscribe to
Throws:
JMSException - if the session fails to create a subscriber due to some internal error.

createSubscriber

public javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic,
                                                  java.lang.String messageSelector,
                                                  boolean noLocal)
                                           throws JMSException
Description copied from interface: TopicSession
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.

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.

Specified by:
createSubscriber in interface TopicSession
Parameters:
topic - the Topic to subscribe to
messageSelector - 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 connection
Throws:
JMSException - if the session fails to create a subscriber due to some internal error.

createDurableSubscriber

public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
                                                         java.lang.String subs_name)
                                                  throws JMSException
Create a durable Subscriber to the specified topic.

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.

Specified by:
createDurableSubscriber in interface Session
Parameters:
topic - the topic to subscribe to
subs_name - the name used to identify this subscription.
Throws:
JMSException - if a session fails to create a subscriber due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createDurableSubscriber

public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
                                                         java.lang.String subs_name,
                                                         java.lang.Object payload_factory)
                                                  throws JMSException
Create a durable Subscriber to the specified topic.

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.

Parameters:
topic - the topic to subscribe to
payload_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

Throws:
JMSException - if a session fails to create a subscriber due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createDurableSubscriber

public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
                                                         java.lang.String subs_name,
                                                         java.lang.String messageSelector,
                                                         boolean noLocal)
                                                  throws JMSException
Create a durable Subscriber to the specified topic.

This method can be used to create subscribers only for topics that contain standard JMS payloads (payloads of type aq$_jms_*)

Specified by:
createDurableSubscriber in interface Session
Parameters:
topic - the non-temporary Topic to subscribe to
subs_name - the name used to identify this subscription
messageSelector - 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 connection
Returns:
TopicSubscriber Newly created durable subscriber for this topic
Throws:
JMSException - if the session fails to create a subscriber due to some internal error.
See Also:
Session.createDurableSubscriber(Topic,String,String,boolean)

createDurableSubscriber

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
Create a durable Subscriber to the specified topic.

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.

Parameters:
topic - the topic to subscribe to
messageSelector - 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 connection
payload_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 syntax
a. Selector on priority or correlation is specified as follows
    eg:- priority < 3 AND corr_id = 'Fiction'
b. Selector on message payload is specified as follows. The attribute name must be prefixed with tab.user_data.
    eg:- tab.user_data.color = 'GREEN' AND tab.user_data.price < 30000
Throws:
JMSException - if a session fails to create a subscriber due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createDurableSubscriber

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
Create a durable Subscriber to the specified topic.

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.

Parameters:
topic - the topic to subscribe to
messageSelector - 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 connection
payload_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 syntax
a. Selector on priority or correlation is specified as follows
    eg:- priority < 3 AND corr_id = 'Fiction'
b. Selector on message payload is specified as follows. The attribute name must be prefixed with tab.user_data.
    eg:- tab.user_data.color = 'GREEN' AND tab.user_data.price < 30000
transformation - transformation for this subscriber
Throws:
JMSException - if a session fails to create a subscriber due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createRemoteSubscriber

public void createRemoteSubscriber(javax.jms.Topic topic,
                                   oracle.jms.AQjmsAgent remote_subscriber,
                                   java.lang.String messageSelector)
                            throws JMSException
Create a remote subscriber for a topic. This method can be used to create remote subscribers only for queues that contain JMS payloads (payloads of type 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

Parameters:
topic - the topic to subscribe to
remote_subscriber - AQjmsAgent that refers to the remote subscriber
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
Remote subscribers may be a specific consumer at the remote topic or all subscribers at the remote topic
A remote subscriber is defined using the AQjmsAgent structure. An AQjmsAgent consists of a name and address. The name refers to the consumer_name at the remote topic.
The address refers to the remote topic - the syntax is (schema).(topic_name)[@dblink]

1. To publish messages to a particular consumer at the remote topic, the subscription_name of the recipient
at the remote topic must be specified in the name field of AQjmsAgent. The remote topic must be specified in the address field of AQjmsAgent
2. To publish messages to all subscribers of the remote topic, the name field of AQjmsAgent must be set to null. The remote topic must be specified in the address field of AQjmsAgent
JMSException

createRemoteSubscriber

public void createRemoteSubscriber(javax.jms.Topic topic,
                                   oracle.jms.AQjmsAgent remote_subscriber,
                                   java.lang.String messageSelector,
                                   java.lang.Object payload_factory)
                            throws JMSException
Create a remote subscriber for a topic. This method is used to create browsers for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)

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

Parameters:
topic - the topic to subscribe to
remote_subscriber - AQjmsAgent that refers to the remote subscriber
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
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Remote subscribers may be a specific consumer at the remote topic or all subscribers at the remote topic
A remote subscriber is defined using the AQjmsAgent structure. An AQjmsAgent consists of a name and address. The name refers to the consumer_name at the remote topic.
The address refers to the remote topic - the syntax is (schema).(topic_name)[@dblink]

1. To publish messages to a particular consumer at the remote topic, the subscription_name of the recipient
at the remote topic must be specified in the name field of AQjmsAgent. The remote topic must be specified in the address field of AQjmsAgent
2. To publish messages to all subscribers of the remote topic, the name field of AQjmsAgent must be set to null. The remote topic must be specified in the address field of AQjmsAgent
JMSException

createRemoteSubscriber

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
Create a remote subscriber for a topic. This method is used to create browsers for queues that contain Oracle ADT payloads (instead of the standard JMS defined payloads)

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

Parameters:
topic - the topic to subscribe to
remote_subscriber - AQjmsAgent that refers to the remote subscriber
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
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
JMSException

createTopicReceiver

public oracle.jms.AQjmsTopicReceiver createTopicReceiver(javax.jms.Topic topic,
                                                         java.lang.String receiver_name,
                                                         java.lang.String messageSelector)
                                                  throws JMSException
Create a TopicReceiver to receive messages from the specified topic.

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

Parameters:
topic - the topic to access
messageSelector -
Throws:
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.

createTopicReceiver

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
Create a TopicReceiver to receive messages from the specified topic.

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

Parameters:
topic - the topic to access
messageSelector -
Throws:
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.

createPublisher

public javax.jms.TopicPublisher createPublisher(javax.jms.Topic topic)
                                         throws JMSException
Create a Publisher for the specified topic. A client uses a TopicPublisher for publishing messages on a topic.
Specified by:
createPublisher in interface TopicSession
Parameters:
topic - the topic to publish to, or null if this is an unidentifed producer.
Throws:
JMSException - if a session fails to create a publisher due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

createTemporaryTopic

public javax.jms.TemporaryTopic createTemporaryTopic()
                                              throws JMSException
Create a temporary topic. It's lifetime will be that of the TopicConnection unless deleted earlier.
Specified by:
createTemporaryTopic in interface Session
Returns:
a temporary topic identity
Throws:
JMSException

unsubscribe

public void unsubscribe(java.lang.String subs_name)
                 throws JMSException
Unsubscribe a durable subscription that has been created by a client. This method works only if the subscriber name is a key in the in-memory subscriber-topic map, else the InvalidDestinationException is thrown and clients must use AQjmsSession.unsubscribe(Topic, subs_name) instead
Specified by:
unsubscribe in interface Session
Parameters:
subs_name - the name used to identify this subscription
Throws:
JMSException - NOT_SUPPORTED

unsubscribe

public void unsubscribe(javax.jms.Topic topic,
                        java.lang.String subs_name)
                 throws JMSException
Unsubscribe a durable subscription that has been created by a client on the specified topic
Parameters:
topic - the topic subscribed to
subs_name - the name used to identify this subscription.
Throws:
JMSException - if JMS fails to unsubscribe to durable subscription due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

unsubscribe

public void unsubscribe(javax.jms.Topic topic,
                        oracle.jms.AQjmsAgent remote_subscriber)
                 throws JMSException
Unsubscribe a remote durable subscription that has been created by a client on the specified topic
Parameters:
topic - the topic subscribed to
remote_subscriber - AQjmsAgent that refers to the remote subcriber. the address field of the AQjmsAgent cannot be null
Throws:
JMSException - if JMS fails to unsubscribe to durable subscription due to some JMS error.
InvalidDestinationException - if invalid Topic specified.

run

public void run()
Description copied from interface: Session
Optional operation, intended to be used only by Application Servers, not by ordinary JMS clients.
Specified by:
run in interface Session
See Also:
ServerSession

getDBConnection

public java.sql.Connection getDBConnection()
                                    throws JMSException
Return the JDBC connection used to connect to the database. This method get the underlying JDBC connection. This connection can be used to perform other SQL operations as part of the same JMS transaction
Throws:
JMSException - if JMS fails to get the JDBC connection

getTypeMap

public java.util.Map getTypeMap()
                         throws JMSException
Get the JDBC type map
Returns:
java.util.Map TypeMap (jdk 1.1)
Throws:
JMSException - if type map not found or if the connection is closed

getJmsConnection

public oracle.jms.AQjmsConnection getJmsConnection()
                                            throws JMSException
This method returns the JMS connection in which this session was created
Throws:
JMSException - if JMS fails to get the connection

createQueueTable

public oracle.AQ.AQQueueTable createQueueTable(java.lang.String owner,
                                               java.lang.String name,
                                               oracle.AQ.AQQueueTableProperty property)
                                        throws JMSException
Create a Queue Table. A QueueTable holds both queues or topics
Parameters:
owner - the queue table owner (schema)
name - queue table name
property - 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 enabled
Throws:
JMSException - if the QueueTable cannot be created
See Also:
AQQueueTableProperty, AQQueueTableProperty.setMultiConsumer(boolean)

createQueueTable

public oracle.AQ.AQQueueTable createQueueTable(java.lang.String owner,
                                               java.lang.String name,
                                               oracle.AQ.AQQueueTableProperty property,
                                               boolean autonomous)
                                        throws JMSException
JMSException

getQueueTable

public oracle.AQ.AQQueueTable getQueueTable(java.lang.String owner,
                                            java.lang.String name)
                                     throws JMSException
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. Otherwise the queue-table will not be returned
Parameters:
owner - the owner (schema) of the queue-table
name - queue-table name
Throws:
JMSException - if the queue table does not exist or if the user does not have privileges on any queue/topic in the queue-table

createQueue

public javax.jms.Queue createQueue(oracle.AQ.AQQueueTable q_table,
                                   java.lang.String queue_name,
                                   oracle.jms.AQjmsDestinationProperty dest_property)
                            throws JMSException
Create a queue.
Parameters:
q_table - Queue-Table in which the queue is to be created. The queue-table must not be multiconsumer enabled
queue_name - name of the queue to be created
dest_property - Queue properties.
Throws:
JMSException - if the queue could not be created
See Also:
AQjmsDestinationProperty

createQueue

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

createTopic

public javax.jms.Topic createTopic(oracle.AQ.AQQueueTable q_table,
                                   java.lang.String topic_name,
                                   oracle.jms.AQjmsDestinationProperty dest_property)
                            throws JMSException
Create a topic
Parameters:
q_table - Queue-Table in which the topic is to be created. The queue-table must be multiconsumer enabled
topic_name - name of the topic to be created
dest_property - Topic properties.
Throws:
JMSException - if the topic could not be created
See Also:
AQjmsDestinationProperty

createTopic

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

getQueue

public javax.jms.Queue getQueue(java.lang.String owner,
                                java.lang.String name)
                         throws JMSException
Get an existing queue. The Queue is returned only if the user has created the queue or as enqueue/dequeue privileges on the specified queue
Parameters:
owner - queue owner (schema)
name - queue name
Throws:
JMSException - if the queue could not be returned due to some error

getTopic

public javax.jms.Topic getTopic(java.lang.String owner,
                                java.lang.String name)
                         throws JMSException
Get an existing topic. The Topic is returned only if the user has created the topic or as enqueue/dequeue privileges on the specified topic
Parameters:
owner - topic owner (schema)
name - topic name
Throws:
JMSException - if the topic could not be returned due to some error

grantSystemPrivilege

public void grantSystemPrivilege(java.lang.String privilege,
                                 java.lang.String grantee,
                                 boolean admin_option)
                          throws JMSException
Grant AQ system privileges to users/roles. Initially only SYS and SYSTEM can use this procedure successfully
Parameters:
privilege - options are ENQUEUE_ANY, DEQUEUE_ANY and MANAGE_ANY
    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 database
grantee - specifies the grantee. The grantee can be a user, role or the PUBLIC role
admin_option - if this is set to true, the grantee is allowed to use this procedure to grant the system privilege to other users or roles
Throws:
JMSException - if the system privilege could not be granted.

revokeSystemPrivilege

public void revokeSystemPrivilege(java.lang.String privilege,
                                  java.lang.String grantee)
                           throws JMSException
Revoke AQ system privilege from user/roles
Parameters:
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
Throws:
JMSException - if the system privilege could not be revoked

createAQAgent

public void createAQAgent(java.lang.String agent_name)
                   throws JMSException
Create an AQ agent. This agent can be used to access secure queues. In addition, the agent can be allowed access via protocols - HTTP/SMTP.
Parameters:
agent_name - name of the AQ agent
Throws:
JMSException - is the agent could not be created. Check linked SQL exception for details

createAQAgent

public void createAQAgent(java.lang.String agent_name,
                          boolean enable_http,
                          boolean enable_smtp,
                          java.lang.String cert_loc)
                   throws JMSException
Create an AQ agent. This agent can be used to access secure queues. In addition, the agent can be allowed access via protocols - HTTP/SMTP.
Parameters:
agent_name - name of the AQ agent
enable_http - allow this agent to access AQ via HTTP
enable_smtp - allow this agent to access AQ via SMTP
cert_loc - certificate location - used authentication when accessing queues via SMTP. Not required for other protocols
Throws:
JMSException - is the agent could not be created. Check linked SQL exception for details

alterAQAgent

public void alterAQAgent(java.lang.String agent_name,
                         boolean enable_http,
                         boolean enable_smtp,
                         java.lang.String cert_loc)
                  throws JMSException
Alter an AQ agent. This agent must have previously been created using createAQAgent This agent can be used to access secure queues. In addition, the agent can be allowed access via protocols - HTTP/SMTP.
Parameters:
agent_name - name of the AQ agent
enable_http - allow this agent to access AQ via HTTP
enable_smtp - allow this agent to access AQ via SMTP
cert_loc - certificate location - used authentication when accessing queues via SMTP. Not required for other protocols
Throws:
JMSException - is the agent could not be altered. Check linked SQL exception for details

dropAQAgent

public void dropAQAgent(java.lang.String agent_name)
                 throws JMSException
Drop AQ agent. This agent must have previously been created using createAQAgent
Parameters:
agent_name - name of the AQ agent
Throws:
JMSException - is the agent could not be dropped. Check linked SQL exception for details

enableDBAccess

public void enableDBAccess(java.lang.String agent_name,
                           java.lang.String db_username)
                    throws JMSException
Enable Agent Database Access This method enables the given agent name to have the privileges of the specified database user.
Parameters:
agent_name - name of the AQ agent
db_username - name of the database user
Throws:
JMSException - is the agent/user mapping falied. Check linked SQL exception for details

disableDBAccess

public void disableDBAccess(java.lang.String agent_name,
                            java.lang.String db_username)
                     throws JMSException
Disable Agent Database Access This method revokes the privileges of the specified database user. from the given agent.
Parameters:
agent_name - name of the AQ agent
db_username - name of the database user
Throws:
JMSException - is the agent/user mapping falied. Check linked SQL exception for details

bindAgent

public void bindAgent(oracle.jms.AQjmsAgent agent,
                      java.lang.String certificate)
               throws JMSException
Add an agent into LDAP server (bind)
Parameters:
agent - the agent to be binded
certificate - the digital certificate of the agent
Throws:
JMSException - if the bind call failed

unbindAgent

public void unbindAgent(oracle.jms.AQjmsAgent agent)
                 throws JMSException
remove an agent from LDAP server (unbind)
Parameters:
agent - -- the agent to be unbinded
Throws:
JMSException - if the bind call failed

getOCIHandles

protected long[] getOCIHandles()
                        throws JMSException
JMSException

getAcknowledgeMode

public int getAcknowledgeMode()
                       throws JMSException
Returns the acknowledgement mode of the session. The acknowledgement mode is set at the time that the session is created. If the session is transacted, the acknowledgement mode is ignored.
Specified by:
getAcknowledgeMode in interface Session
Returns:
If the session is not transacted, returns the current acknowledgement mode for the session. If the session is transacted, returns SESSION_TRANSACTED.
Throws:
JMSException - if the JMS provider fails to return the acknowledgment mode due to some internal error.
Since:
1.1
See Also:
AQjmsConnection.createSession(boolean, int)

createProducer

public javax.jms.MessageProducer createProducer(javax.jms.Destination destination)
                                         throws JMSException
Creates a 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.

Specified by:
createProducer in interface Session
Parameters:
destination - the Destination to send to, or null if this is a producer which does not have a specified destination.
Throws:
JMSException - if the session fails to create a MessageProducer due to some internal error.
InvalidDestinationException - if an invalid destination is specified.
Since:
1.1

createConsumer

public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination)
                                         throws JMSException
Description copied from interface: Session
Creates a 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.
Specified by:
createConsumer in interface Session
Parameters:
destination - the Destination to access.
Throws:
JMSException - if the session fails to create a consumer due to some internal error.

createConsumer

public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination,
                                                java.lang.String messageSelector)
                                         throws JMSException
Description copied from interface: Session
Creates a 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.

Specified by:
createConsumer in interface Session
Parameters:
destination - the Destination to access
messageSelector - 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.
Throws:
JMSException - if the session fails to create a MessageConsumer due to some internal error.

createConsumer

public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination,
                                                java.lang.String messageSelector,
                                                boolean NoLocal)
                                         throws JMSException
Description copied from interface: Session
Creates 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.

Specified by:
createConsumer in interface Session
Parameters:
destination - the Destination to access
messageSelector - 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.
Throws:
JMSException - if the session fails to create a MessageConsumer due to some internal error.

createConsumer

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
A generic routine to create a MessageConsumer used to receive messages from the specified destination. This method is used to create consumers for destinations that contain standard JMS as well as Oracle ADT payloads.
Parameters:
destination - the destination to access
messageSelector - only messages with properties matching the message selector expression are delivered
payload_factory - CustomDatumFactory/ORADataFactory for the java class that maps to the Oracle ADT
Important: CustomDatum support will be deprecated in a future release
transformation - transformation if any involved
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.
Throws:
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.
Since:
1.1

Oracle® Streams Advanced Queuing Java API Reference
Release 1 (10.1)

B12023-01

Copyright © 2003, Oracle. All Rights Reserved.