Oracle8i Supplied Java Packages Reference Release 3 (8.1.7) Part Number A85456-01 |
| Library | Service | Contents

# 2
Package oracle.jms

## Package oracle.jms Description

Class Summary |
--- | ---
Interfaces |
``AdtMessage``

This interface extends the Message interface and represents messages containing Oracle object type payloads - this is an AQ extension to JMS.

``AQjmsQueueReceiver``

This interface extends javax.jms.QueueReceiver and defines AQ extensions to JMS. A client uses a QueueReceiver for receiving messages that have been delivered to a Queue

``AQjmsQueueSender``

This interface extends QueueSender and defines AQ extensions to JMS. A client uses a QueueSender to send messages to a Queue

``AQjmsTopicPublisher``

This interface extends TopicPublisher and defines AQ extensions to JMS. A client uses a TopicPublisher for publishing messages to a Topic

``AQjmsTopicReceiver``

This interface extends the TopicReceiver interface that defines AQ extensions for remote subscribers and explicitly specified recipients (in point-to-mulitpoint communication). A TopicReceiver is used to receive messages from a Topic

``AQjmsTopicSubscriber``

This interface extends TopicSubscriber and defines AQ extensions to JMS. A client uses a TopicSubscriber to receive messages published on a Topic

``TopicReceiver``

This interface extends MessageConsumer to allow remote subscribers and explicitly specified recipients (in point-to-multipoint communication) to receive messages

Classes

``AQjmsAdtMessage``

This class implements the AdtMessage interface. An AdtMessage is used to send a message containing Oracle object type payloads

``AQjmsAgent``

This class implements the Destination interface. It is used to define remote subscribers and ReplyTo Destinations

``AQjmsBytesMessage``

This class implements the BytesMessage interface. A BytesMessage is used to send a message containing a stream of uninterpreted bytes

``AQjmsConnection``

This class implements the Connection interface. This is an active connection to the JMS provider

``AQjmsConnectionMetaData``

class AQjmsConnectionMetaData represents the Meta Data information available for a JMS Connection.

``AQjmsConstants``

This class defines the constants used in the oracle.jms package

``AQjmsConsumer``

This class implements the MessageConsumer interface

``AQjmsDestination``

This class implements administered objects, Queue and Topic

``AQjmsDestinationProperty``

This class defines Destination properties

``AQjmsFactory``

This class is used for accessing administered ConnectionFactory objects in Oracle's implementation of JMS.

``AQjmsMapMessage``

This class implements the MapMessage interface. A MapMessage is used to send a set of name-value pairs where names are Strings and values are java primitive types

``AQjmsMessage``

This class implements the Message interface. This is the superclass of all JMS messages

``AQjmsObjectMessage``

This class implements the ObjectMessage interface. An ObjectMessage is used to send a message that contains a serializable java object

``AQjmsOracleDebug``

AQ Oracle Debug class - not to be used unless instructed by Oracle Support

``AQjmsProducer``

This class implements the MessageProducer interface. A MessageProducer is used to send messages to a Destination

``AQjmsQueueBrowser``

This class implements the QueueBrowser interface. A QueueBrowser is used to look at messages in a Queue without removing them.

``AQjmsQueueConnectionFactory``

This class implements the QueueConnectionFactory interface. A QueueConnectionFactory is used to create QueueConnections

``AQjmsSession``

This class implements the javax.jms.Session interface. A Session is a single threaded context for producing a consuming messages

``AQjmsStreamMessage``

This class implements the StreamMessage interface. A StreamMessage is used to send a stream of java primitives

``AQjmsTextMessage``

This class implements the TextMessage interface. A TextMessage is used to send a message containing a java.lang.StringBuffer

``AQjmsTopicConnectionFactory``

This class implements the TopicConnectionFactory interface. A TopicConnectionFactory is used to create TopicConnections

Exceptions

``AQjmsException``

This exception extends JMSException - adds Oracle error codes. This is the root of all JMS exceptions

``AQjmsInvalidDestinationException``

This exception extends InvalidDestinationException. It is thrown when a Destination is not valid

``AQjmsInvalidSelectorException``

This exception extends InvalidSelectorException. It is thrown when the specified MessageSelector is not valid

``AQjmsMessageEOFException``

This exception extends MessageEOFException. It is thrown when an unexpected end of stream has been reached when a StreamMessage or BytesMessage is being read

``AQjmsMessageFormatException``

This exception extends MessageFormatException. It is thrown when a client attempts to use a datatype not supported by a message or attempts to read data in the message as the wrong type

``AQjmsMessageNotReadableException``

This exception extends MessageNotReadableException. It is thrown when a client attempts to read a write-only message

``AQjmsMessageNotWriteableException``

This exception extends MessageNotWriteableException. It is thrown when a client attempts to write a read-only message

## AdtMessage

#### Syntax

    public interface AdtMessage extends javax.jms.Message

#### All Superinterfaces

    javax.jms.Message

#### All Known Implementing Classes:

    AQjmsAdtMessage

#### Description

This interface extends the Message interface and represents messages containing Oracle object type payloads - this is an AQ extension to JMS.

Member Summary |
--- | ---
Methods |
``getAdtPayload()``

Get the CustomDatum object containing this Adt message's data.

``setAdtPayload(CustomDatum)``

Set the CustomDatum object containing this Adt message's data

Inherited Member Summary
Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`
Methods inherited from interface javax.jms.Message
`clearBody, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty`

### Methods

### getAdtPayload()

    public oracle.sql.CustomDatum getAdtPayload()

Get the CustomDatum object containing this Adt message's data.

#### Returns

the object containing this message's data

#### Throws

`JMSException` - if JMS fails to get object due to some internal JMS error.

### setAdtPayload(CustomDatum)

    public void setAdtPayload(oracle.sql.CustomDatum payload)

set the CustomDatum object containing this Adt message's data

#### Parameters

`payload` - the message's data (the object must implement the CustomDatum interface). This payload must be a java object that represents the ADT that is defined as the queue/topic payload type

#### Throws

`JMSException` - if JMS fails to set the adt payload

`MessageNotWriteableException` - if message in read-only mode.

## AQjmsAdtMessage

#### Syntax

    public class AQjmsAdtMessage extends AQjmsMessage implements AdtMessage

    java.lang.Object
      |
      +--AQjmsMessage
            |
            +--oracle.jms.AQjmsAdtMessage

#### All Implemented Interfaces

    AdtMessage, javax.jms.Message

#### Description

This class implements the AdtMessage interface. An AdtMessage is used to send a message containing Oracle object type payloads

Member Summary |
--- | ---
Methods |
``clearBody()``

Clear out the message body.

``getAdtPayload()``

Get the CustomDatum object containing this Adt message's data.

``getBooleanProperty(String)``

Return the boolean property value with the given name.

``getByteProperty(String)``

Return the byte property value with the given name.

``getDoubleProperty(String)``

Return the double property value with the given name.

``getFloatProperty(String)``

Return the float property value with the given name.

``getIntProperty(String)``

Return the integer property value with the given name.

``getJMSReplyTo()``

Get where a reply to this message should be sent.

``getJMSType()``

Get the message type.

``getLongProperty(String)``

Return the long property value with the given name.

``getObjectProperty(String)``

Return the Java object property value with the given name.

``getPropertyNames()``

Return an Enumeration of all the property names.

``getShortProperty(String)``

Return the short property value with the given name.

``getStringProperty(String)``

Return the String property value with the given name.

``propertyExists(String)``

Check if a property value exists.

``setAdtPayload(CustomDatum)``

set the CustomDatum object containing this Adt message's data

``setBooleanProperty(String, boolean)``

Set a boolean property value with the given name, into the Message.

``setByteProperty(String, byte)``

Set a byte property value with the given name, into the Message.

``setDoubleProperty(String, double)``

Set a double property value with the given name, into the Message.

``setFloatProperty(String, float)``

Set a float property value with the given name, into the Message.

``setIntProperty(String, int)``

Set an integer property value with the given name, into the Message.

``setJMSReplyTo(Destination)``

Set where a reply to this message should be sent.

``setJMSType(String)``

Set the message type.

``setLongProperty(String, long)``

Set a long property value with the given name, into the Message.

``setObjectProperty(String, Object)``

Set a Java object property value with the given name, into the Message.

``setShortProperty(String, short)``

Set a short property value with the given name, into the Message.

``setStringProperty(String, String)``

Set a String property value with the given name, into the Message.

Inherited Member Summary
Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`
Methods inherited from class AQjmsMessage
``clearProperties()``

, getJMSCorrelationID()``, getJMSCorrelationIDAsBytes()``, getJMSDeliveryMode()``, getJMSDestination()``, getJMSExpiration()``, getJMSMessageID()``, getJMSMessageIDAsBytes()``, getJMSPriority()``, getJMSRedelivered()``, getJMSTimestamp()``, getSenderID()``, setJMSCorrelationID(String)``, setJMSCorrelationIDAsBytes(byte[])``, setJMSDestination(Destination)``, setJMSExpiration(long)``, setJMSMessageID(String)``, setJMSPriority(int)``, setJMSRedelivered(boolean)``, setJMSTimestamp(long)``, setSenderID(AQjmsAgent)``

Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.jms.Message

`clearProperties, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSTimestamp, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSTimestamp`

### Methods

### clearBody()

    public void clearBody()

Clear out the message body. All other parts of the message are left untouched.

#### Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

#### Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

#### Overrides

clearBody() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to due to some internal JMS error.

### getAdtPayload()

    public oracle.sql.CustomDatum getAdtPayload()

Get the CustomDatum object containing this Adt message's data.

#### Specified By

getAdtPayload() in interface AdtMessage

#### Returns

the object containing this message's data

#### Throws

`JMSException` - if JMS fails to get object due to some internal JMS error.

### getBooleanProperty(String)

    public boolean getBooleanProperty(java.lang.String name)

Return the boolean property value with the given name.

#### Specified By

javax.jms.Message.getBooleanProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getBooleanProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the boolean property

#### Returns

the boolean property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getByteProperty(String)

    public byte getByteProperty(java.lang.String name)

Return the byte property value with the given name.

#### Specified By

javax.jms.Message.getByteProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getByteProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the byte property

#### Returns

the byte property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getDoubleProperty(String)

    public double getDoubleProperty(java.lang.String name)

Return the double property value with the given name.

#### Specified By

javax.jms.Message.getDoubleProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getDoubleProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the double property

#### Returns

the double property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getFloatProperty(String)

    public float getFloatProperty(java.lang.String name)

Return the float property value with the given name.

#### Specified By

javax.jms.Message.getFloatProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getFloatProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the float property

#### Returns

the float property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getIntProperty(String)

    public int getIntProperty(java.lang.String name)

Return the integer property value with the given name.

#### Specified By

javax.jms.Message.getIntProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getIntProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the integer property

#### Returns

the integer property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getJMSReplyTo()

    public javax.jms.Destination getJMSReplyTo()

Get where a reply to this message should be sent. This method is not supported for AdtMessages in this release

#### Specified By

javax.jms.Message.getJMSReplyTo() in interface javax.jms.Message

#### Overrides

getJMSReplyTo() in class AQjmsMessage

#### Throws

`JMSException` - NOT_SUPPORTED for AdtMessage

### getJMSType()

    public java.lang.String getJMSType()

Get the message type.This method is not supported for AdtMessages in this release

#### Specified By

javax.jms.Message.getJMSType() in interface javax.jms.Message

#### Overrides

getJMSType() in class AQjmsMessage

#### Returns

the message type

#### Throws

`JMSException` - NOT_SUPPORTED for AdtMessage

### getLongProperty(String)

    public long getLongProperty(java.lang.String name)

Return the long property value with the given name.

#### Specified By

javax.jms.Message.getLongProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getLongProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the long property

#### Returns

the long property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getObjectProperty(String)

    public java.lang.Object getObjectProperty(java.lang.String name)

Return the Java object property value with the given name.

Note that this method can be used to return in objectified format, an object that had been stored as a property in the Message with the equivalent `setObject` method call, or it's equivalent primitive set method.

#### Specified By

javax.jms.Message.getObjectProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getObjectProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the Java object property

#### Returns

the Java object property value with the given name, in objectified format (i.e. if it set as an int, then a Integer is returned). If there is no property by this name, a null value is returned.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

### getPropertyNames()

    public synchronized java.util.Enumeration getPropertyNames()

Return an Enumeration of all the property names.

#### Specified By

javax.jms.Message.getPropertyNames() in interface javax.jms.Message

#### Overrides

getPropertyNames() in class AQjmsMessage

#### Returns

an enumeration of all the names of property values.

#### Throws

`JMSException` - if JMS fails to get Property names due to some internal JMS error.

### getShortProperty(String)

    public short getShortProperty(java.lang.String name)

Return the short property value with the given name.

#### Specified By

javax.jms.Message.getShortProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getShortProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the short property

#### Returns

the short property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getStringProperty(String)

    public java.lang.String getStringProperty(java.lang.String name)

Return the String property value with the given name.

#### Specified By

javax.jms.Message.getStringProperty(java.lang.String) in interface javax.jms.Message

#### Overrides

getStringProperty(String) in class AQjmsMessage

#### Parameters

`name` - the name of the String property

#### Returns

the String property value with the given name. If there is no property by this name, a null value is returned.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### propertyExists(String)

    public boolean propertyExists(java.lang.String name)

Check if a property value exists.

#### Specified By

javax.jms.Message.propertyExists(java.lang.String) in interface javax.jms.Message

#### Overrides

propertyExists(String) in class AQjmsMessage

#### Parameters

`name` - the name of the property to test

#### Returns

true if the property does exist.

#### Throws

`JMSException` - if JMS fails to check if property exists due to some internal JMS error.

### setAdtPayload(CustomDatum)

    public void setAdtPayload(oracle.sql.CustomDatum payload)

set the CustomDatum object containing this Adt message's data

#### Specified By

setAdtPayload(CustomDatum) in interface AdtMessage

#### Parameters

`payload` - the message's data (the object must implement the CustomDatum interface). This payload must be a java object that represents the ADT that is defined as the queue/topic payload type

#### Throws

`JMSException` - if JMS fails to set the adt payload

`MessageNotWriteableException` - if message in read-only mode.

### setBooleanProperty(String, boolean)

    public void setBooleanProperty(java.lang.String name, boolean value)

Set a boolean property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setBooleanProperty(java.lang.String, boolean) in interface javax.jms.Message

#### Overrides

setBooleanProperty(String, boolean) in class AQjmsMessage

#### Parameters

`name` - the name of the boolean property

`value` - the boolean property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageNotWriteableException` - if properties are read-only

### setByteProperty(String, byte)

    public void setByteProperty(java.lang.String name, byte value)

Set a byte property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setByteProperty(java.lang.String, byte) in interface javax.jms.Message

#### Overrides

setByteProperty(String, byte) in class AQjmsMessage

#### Parameters

`name` - the name of the byte property

`value` - the byte property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageNotWriteableException` - if properties are read-only

### setDoubleProperty(String, double)

    public void setDoubleProperty(java.lang.String name, double value)

Set a double property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setDoubleProperty(java.lang.String, double) in interface javax.jms.Message

#### Overrides

setDoubleProperty(String, double) in class AQjmsMessage

#### Parameters

`name` - the name of the double property

`value` - the double property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageNotWriteableException` - if properties are read-only

### setFloatProperty(String, float)

    public void setFloatProperty(java.lang.String name, float value)

Set a float property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setFloatProperty(java.lang.String, float) in interface javax.jms.Message

#### Overrides

setFloatProperty(String, float) in class AQjmsMessage

#### Parameters

`name` - the name of the float property

`value` - the float property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageNotWriteableException` - if properties are read-only

### setIntProperty(String, int)

    public void setIntProperty(java.lang.String name, int value)

Set an integer property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setIntProperty(java.lang.String, int) in interface javax.jms.Message

#### Overrides

setIntProperty(String, int) in class AQjmsMessage

#### Parameters

`name` - the name of the integer property

`value` - the integer property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageNotWriteableException` - if properties are read-only

### setJMSReplyTo(Destination)

    public void setJMSReplyTo(javax.jms.Destination replyTo)

Set where a reply to this message should be sent. This method is not supported for AdtMessage in this release

#### Specified By

javax.jms.Message.setJMSReplyTo(javax.jms.Destination) in interface javax.jms.Message

#### Overrides

setJMSReplyTo(Destination) in class AQjmsMessage

#### Throws

`JMSException` - NOT_SUPPORTED for AdtMessage

### setJMSType(String)

    public void setJMSType(java.lang.String type)

Set the message type. This method is not supported for AdtMessages in this release

#### Specified By

javax.jms.Message.setJMSType(java.lang.String) in interface javax.jms.Message

#### Overrides

setJMSType(String) in class AQjmsMessage

#### Parameters

`type` - of the message

#### Throws

`JMSException` - NOT_SUPPORTED for AdtMessage

### setLongProperty(String, long)

    public void setLongProperty(java.lang.String name, long value)

Set a long property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setLongProperty(java.lang.String, long) in interface javax.jms.Message

#### Overrides

setLongProperty(String, long) in class AQjmsMessage

#### Parameters

`name` - the name of the long property

`value` - the long property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageNotWriteableException` - if properties are read-only

### setObjectProperty(String, Object)

    public void setObjectProperty(java.lang.String name,
    java.lang.Object value)

Set a Java object property value with the given name, into the Message.

Note that this method only works for the objectified primitive object types (Integer, Double, Long ...) and String's.

#### Specified By

javax.jms.Message.setObjectProperty(java.lang.String, java.lang.Object) in interface javax.jms.Message

#### Overrides

setObjectProperty(String, Object) in class AQjmsMessage

#### Parameters

`name` - the name of the Java object property.

`value` - the Java object property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageFormatException` - if object is invalid

`MessageNotWriteableException` - if properties are read-only

### setShortProperty(String, short)

    public void setShortProperty(java.lang.String name, short value)

Set a short property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setShortProperty(java.lang.String, short) in interface javax.jms.Message

#### Overrides

setShortProperty(String, short) in class AQjmsMessage

#### Parameters

`name` - the name of the short property

`value` - the short property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageNotWriteableException` - if properties are read-only

### setStringProperty(String, String)

    public void setStringProperty(java.lang.String name,
    java.lang.String value)

Set a String property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setStringProperty(java.lang.String, java.lang.String) in interface javax.jms.Message

#### Overrides

setStringProperty(String, String) in class AQjmsMessage

#### Parameters

`name` - the name of the String property

`value` - the String property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property due to some internal JMS error.

`MessageNotWriteableException` - if properties are read-only

## AQjmsAgent

#### Syntax

    public class AQjmsAgent implements javax.jms.Destination

    oracle.jms.AQjmsAgent

#### All Implemented Interfaces

    javax.jms.Destination

#### Description

This class implements the Destination interface. It is used to define remote subscribers and ReplyTo Destinations

Member Summary |
--- | ---
Fields |
Constructors |
``AQjmsAgent(String, String)``

Constructor

``AQjmsAgent(String, String, int)``

Constructor

Methods

``getAddress()``

Get the address of the agent

``getName()``

Get the name of the agent

``getProtocol()``

Get the protocol of the agent

``setAddress(String)``

Set the address of the agent

``setName(String)``

Set the name of the agent

``setProtocol(int)``

Set the protocol of the agent

``toString()``

Convert the agent to its string representation which is of the form: "[AQjmsAgent] \n name: NAME \n address: ADDRESS \n protocol: PROTOCOL"

### Fields

### Constructors

### AQjmsAgent(String, String)

    public  AQjmsAgent(java.lang.String name, java.lang.String address)

Constructor

#### Parameters

`name` - Name of the agent

`address` - Address of the agent

#### Throws

`SQLException` - if it fails to create an agent

### AQjmsAgent(String, String, int)

    public  AQjmsAgent(java.lang.String name, java.lang.String address,
    int protocol)

Constructor

#### Parameters

`name` - Name of the agent

`address` - Address of the agent

`protocol` - Protocol of the agent

#### Throws

`SQLException` - if it fails to create an agent

### Methods

### getAddress()

    public java.lang.String getAddress()

Get the address of the agent

#### Returns

the address of the agent

#### Throws

`SQLException` - if there was an error in getting the address

### getName()

    public java.lang.String getName()

Get the name of the agent

#### Returns

the name of the agent

#### Throws

`SQLException` - if there was an error in getting the name

### getProtocol()

    public int getProtocol()

Get the protocol of the agent

#### Returns

the protocol of the agent

#### Throws

`SQLException` - if there was an error in getting the protocol

### setAddress(String)

    public void setAddress(java.lang.String address)

Set the address of the agent

#### Parameters

`address` - the address of the agent

#### Throws

`SQLException` - if there was an error in setting the address

### setName(String)

    public void setName(java.lang.String name)

Set the name of the agent

#### Parameters

`name` - the name of the agent

#### Throws

`SQLException` - if there was an error in setting the name

### setProtocol(int)

    public void setProtocol(int protocol)

Set the protocol of the agent

#### Parameters

`protocol` - the protocol of the agent

#### Throws

`SQLException` - if there was an error in setting the address

### toString()

    public java.lang.String toString()

Convert the agent to its string representation which is of the form: "[AQjmsAgent] \n name: NAME \n address: ADDRESS \n protocol: PROTOCOL"

#### Returns

the string representation of the agent

#### Throws

`SQLException` - if there was an error in setting the address

## AQjmsBytesMessage

#### Syntax

    public class AQjmsBytesMessage extends AQjmsMessage
       implements javax.jms.BytesMessage

    java.lang.Object
      |
      +--AQjmsMessage
            |
            +--oracle.jms.AQjmsBytesMessage

#### All Implemented Interfaces

    javax.jms.BytesMessage, javax.jms.Message

#### Description

This class implements the BytesMessage interface. A BytesMessage is used to send a message containing a stream of uninterpreted bytes

Member Summary |
--- | ---
Methods |
``clearBody()``

Clear out the message body.

``clearProperties()``

Clear a message's properties.

``readBoolean()``

Read a `boolean` from the stream message.

``readByte()``

Read a signed 8-bit value from the stream message.

``readBytes(byte[])``

Read a byte array from the stream message.

``readBytes(byte[], int)``

Read a portion of the bytes message.

``readChar()``

Read a Unicode character value from the stream message.

``readDouble()``

Read a `double` from the stream message.

``readFloat()``

Read a float from the stream message.

``readInt()``

Read a signed 32-bit integer from the stream message.

``readLong()``

Read a signed 64-bit integer from the stream message.

``readShort()``

Put the message in read-only mode, and reposition the stream of bytes to the beginning.

``readUnsignedByte()``

Read an unsigned 8-bit number from the stream message.

``readUnsignedShort()``

Read an unsigned 16-bit number from the stream message.

``readUTF()``

Read in a string that has been encoded using a modified UTF-8 format from the stream message.

``reset()``

Put the message in read-only mode, and reposition the stream of bytes to the beginning.

``writeBoolean(boolean)``

Write a `boolean` to the stream message as a 1-byte value.

``writeByte(byte)``

Write out a `byte` to the stream message as a 1-byte value.

``writeBytes(byte[])``

Write a byte array to the stream message.

``writeBytes(byte, int, int)``

Write a portion of a byte array to the stream message.

``writeChar(char)``

Write a `char` to the stream message as a 2-byte value, high byte first.

``writeDouble(double)``

Convert the double argument to a `long` using the `doubleToLongBits` method in class `Double`, and then writes that `long` value to the stream message as an 8-byte quantity, high byte first.

``writeFloat(float)``

Convert the float argument to an `int` using the `floatToIntBits` method in class `Float`, and then writes that `int` value to the stream message as a 4-byte quantity, high byte first.

``writeInt(int)``

Write an `int` to the stream message as four bytes, high byte first.

``writeLong(long)``

Write a `long` to the stream message as eight bytes, high byte first.

``writeObject(Object)``

Write a Java object to the stream message.

``writeShort(short)``

Write a `short` to the stream message as two bytes, high byte first.

``writeUTF(String)``

Write a string to the stream message using UTF-8 encoding in a machine-independent manner.

Inherited Member Summary
Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`
Methods inherited from class AQjmsMessage
``getBooleanProperty(String)``

, getByteProperty(String)``, getDoubleProperty(String)``, getFloatProperty(String)``, getIntProperty(String)``, getJMSCorrelationID()``, getJMSCorrelationIDAsBytes()``, getJMSDeliveryMode()``, getJMSDestination()``, getJMSExpiration()``, getJMSMessageID()``, getJMSMessageIDAsBytes()``, getJMSPriority()``, getJMSRedelivered()``, getJMSReplyTo()``, getJMSTimestamp()``, getJMSType()``, getLongProperty(String)``, getObjectProperty(String)``, getPropertyNames()``, getSenderID()``, getShortProperty(String)``, getStringProperty(String)``, propertyExists(String)``, setBooleanProperty(String, boolean)``, setByteProperty(String, byte)``, setDoubleProperty(String, double)``, setFloatProperty(String, float)``, setIntProperty(String, int)``, setJMSCorrelationID(String)``, setJMSCorrelationIDAsBytes(byte[])``, setJMSDestination(Destination)``, setJMSExpiration(long)``, setJMSMessageID(String)``, setJMSPriority(int)``, setJMSRedelivered(boolean)``, setJMSReplyTo(Destination)``, setJMSTimestamp(long)``, setJMSType(String)``, setLongProperty(String, long)``, setObjectProperty(String, Object)``, setSenderID(AQjmsAgent)``, setShortProperty(String, short)``, setStringProperty(String, String)``

Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.jms.Message

`getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty`

### Methods

### clearBody()

    public void clearBody()

Clear out the message body. All other parts of the message are left untouched.

#### Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

#### Overrides

clearBody() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to due to some internal JMS error.

### clearProperties()

    public void clearProperties()

Clear a message's properties.

#### Specified By

javax.jms.Message.clearProperties() in interface javax.jms.Message

#### Overrides

clearProperties() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to clear JMS message properties due to some internal JMS error.

### readBoolean()

    public boolean readBoolean()

Read a `boolean` from the stream message.

#### Specified By

javax.jms.BytesMessage.readBoolean() in interface javax.jms.BytesMessage

#### Returns

the `boolean` value read.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readByte()

    public byte readByte()

Read a signed 8-bit value from the stream message.

#### Specified By

javax.jms.BytesMessage.readByte() in interface javax.jms.BytesMessage

#### Returns

the next byte from the stream message as a signed 8-bit `byte`.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readBytes(byte[])

    public int readBytes(byte[] value)

Read a byte array from the stream message.

#### Specified By

javax.jms.BytesMessage.readBytes(byte[]) in interface javax.jms.BytesMessage

#### Parameters

`value` - the buffer into which the data is read.

#### Returns

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readBytes(byte[], int)

    public int readBytes(byte[] value, int length)

Read a portion of the bytes message.

#### Specified By

javax.jms.BytesMessage.readBytes(byte[], int) in interface javax.jms.BytesMessage

#### Parameters

`value` - the buffer into which the data is read.

`length` - the number of bytes to read.

#### Returns

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readChar()

    public char readChar()

Read a Unicode character value from the stream message.

#### Specified By

javax.jms.BytesMessage.readChar() in interface javax.jms.BytesMessage

#### Returns

the next two bytes from the stream message as a Unicode character.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readDouble()

    public double readDouble()

Read a `double` from the stream message.

#### Specified By

javax.jms.BytesMessage.readDouble() in interface javax.jms.BytesMessage

#### Returns

the next eight bytes from the stream message, interpreted as a `double`.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readFloat()

    public float readFloat()

Read a float from the stream message.

#### Specified By

javax.jms.BytesMessage.readFloat() in interface javax.jms.BytesMessage

#### Returns

the next four bytes from the stream message, interpreted as a `float`.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readInt()

    public int readInt()

Read a signed 32-bit integer from the stream message.

#### Specified By

javax.jms.BytesMessage.readInt() in interface javax.jms.BytesMessage

#### Returns

the next four bytes from the stream message, interpreted as an `int`.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readLong()

    public long readLong()

Read a signed 64-bit integer from the stream message.

#### Specified By

javax.jms.BytesMessage.readLong() in interface javax.jms.BytesMessage

#### Returns

the next eight bytes from the stream message, interpreted as a `long`.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readShort()

    public short readShort()

Put the message in read-only mode, and reposition the stream of bytes to the beginning. Throws MessageNotWriteableException - if message in write-only mode. JMSException - if JMS fails to read message due to some internal JMS error.

#### Specified By

javax.jms.BytesMessage.readShort() in interface javax.jms.BytesMessage

### readUnsignedByte()

    public int readUnsignedByte()

Read an unsigned 8-bit number from the stream message.

#### Specified By

javax.jms.BytesMessage.readUnsignedByte() in interface javax.jms.BytesMessage

#### Returns

the next byte from the stream message, interpreted as an unsigned 8-bit number.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readUnsignedShort()

    public int readUnsignedShort()

Read an unsigned 16-bit number from the stream message.

#### Specified By

javax.jms.BytesMessage.readUnsignedShort() in interface javax.jms.BytesMessage

#### Returns

the next two bytes from the stream message, interpreted as an unsigned 16-bit integer.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### readUTF()

    public java.lang.String readUTF()

Read in a string that has been encoded using a modified UTF-8 format from the stream message.

#### Specified By

javax.jms.BytesMessage.readUTF() in interface javax.jms.BytesMessage

#### Returns

a Unicode string from the stream message.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`MessageEOFException` - if end of message stream

`JMSException` - if JMS fails to read message due to some internal JMS error.

### reset()

    public void reset()

Put the message in read-only mode, and reposition the stream of bytes to the beginning.

#### Specified By

javax.jms.BytesMessage.reset() in interface javax.jms.BytesMessage

#### Throws

`JMSException` - if JMS fails to reset the message due to some internal JMS error.

`MessageFormatException` - if message has an invalid format

### writeBoolean(boolean)

    public void writeBoolean(boolean value)

Write a `boolean` to the stream message as a 1-byte value. The value `true` is written out as the value `(byte)1`; the value `false` is written out as the value `(byte)0`.

#### Specified By

javax.jms.BytesMessage.writeBoolean(boolean) in interface javax.jms.BytesMessage

#### Parameters

`value` - the boolean value to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeByte(byte)

    public void writeByte(byte value)

Write out a `byte` to the stream message as a 1-byte value.

#### Specified By

javax.jms.BytesMessage.writeByte(byte) in interface javax.jms.BytesMessage

#### Parameters

`value` - the `byte` value to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeBytes(byte[])

    public void writeBytes(byte[] value)

Write a byte array to the stream message.

#### Specified By

javax.jms.BytesMessage.writeBytes(byte[]) in interface javax.jms.BytesMessage

#### Parameters

`value` - the byte array to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeBytes(byte, int, int)

    public void writeBytes(byte[] value, int offset, int length)

Write a portion of a byte array to the stream message.

#### Specified By

javax.jms.BytesMessage.writeBytes(byte[], int, int) in interface javax.jms.BytesMessage

#### Parameters

`value` - the byte array value to be written.

`offset` - the initial offset within the byte array.

`length` - the number of bytes to use.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeChar(char)

    public void writeChar(char value)

Write a `char` to the stream message as a 2-byte value, high byte first.

#### Specified By

javax.jms.BytesMessage.writeChar(char) in interface javax.jms.BytesMessage

#### Parameters

`value` - the `char` value to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeDouble(double)

    public void writeDouble(double value)

Convert the double argument to a `long` using the `doubleToLongBits` method in class `Double`, and then writes that `long` value to the stream message as an 8-byte quantity, high byte first.

#### Specified By

javax.jms.BytesMessage.writeDouble(double) in interface javax.jms.BytesMessage

#### Parameters

`value` - the `double` value to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeFloat(float)

    public void writeFloat(float value)

Convert the float argument to an `int` using the `floatToIntBits` method in class `Float`, and then writes that `int` value to the stream message as a 4-byte quantity, high byte first.

#### Specified By

javax.jms.BytesMessage.writeFloat(float) in interface javax.jms.BytesMessage

#### Parameters

`value` - the `float` value to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeInt(int)

    public void writeInt(int value)

Write an `int` to the stream message as four bytes, high byte first.

#### Specified By

javax.jms.BytesMessage.writeInt(int) in interface javax.jms.BytesMessage

#### Parameters

`value` - the `int` to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeLong(long)

    public void writeLong(long value)

Write a `long` to the stream message as eight bytes, high byte first.

#### Specified By

javax.jms.BytesMessage.writeLong(long) in interface javax.jms.BytesMessage

#### Parameters

`value` - the `long` to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeObject(Object)

    public void writeObject(java.lang.Object value)

Write a Java object to the stream message.

Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and byte arrays.

#### Specified By

javax.jms.BytesMessage.writeObject(java.lang.Object) in interface javax.jms.BytesMessage

#### Parameters

`value` - the Java object to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`MessageFormatException` - if object is invalid type.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeShort(short)

    public void writeShort(short value)

Write a `short` to the stream message as two bytes, high byte first.

#### Specified By

javax.jms.BytesMessage.writeShort(short) in interface javax.jms.BytesMessage

#### Parameters

`value` - the `short` to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

### writeUTF(String)

    public void writeUTF(java.lang.String value)

Write a string to the stream message using UTF-8 encoding in a machine-independent manner.

#### Specified By

javax.jms.BytesMessage.writeUTF(java.lang.String) in interface javax.jms.BytesMessage

#### Parameters

`value` - the `String` value to be written.

#### Throws

`MessageNotWriteableException` - if message in read-only mode.

`JMSException` - if JMS fails to write message due to some internal JMS error.

## AQjmsConnection

#### Syntax

    public class AQjmsConnection extends java.lang.Object
       implements javax.jms.QueueConnection, javax.jms.TopicConnection

    java.lang.Object
      |
      +--oracle.jms.AQjmsConnection

#### All Implemented Interfaces

    javax.jms.Connection, javax.jms.QueueConnection,
    javax.jms.TopicConnection

#### Description

This class implements the Connection interface. This is an active connection to the JMS provider

Member Summary |
--- | ---
Methods |
``close()``

Since a provider typically allocates significant resources outside the JVM on behalf of a Connection, clients should close them when they are not needed.

``createQueueSession(boolean, int)``

create a queue session

``createTopicSession(boolean, int)``

Create a TopicSession

``getClientID()``

Get the client identifier for this connection.

``getCurrentJmsSession()``

gets the current session

``getMetaData()``

Get the meta data for this connection.

``setClientID(String)``

Set the client identifier for this connection.

``start()``

Start (or restart) a Connection's delivery of incoming messages.

``stop()``

Used to temporarily stop a Connection's delivery of incoming messages.

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### close()

    public void close()

Since a provider typically allocates significant resources outside the JVM on behalf of a Connection, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

#### Specified By

javax.jms.Connection.close() in interface javax.jms.Connection

#### Specified By

javax.jms.Connection.close() in interface javax.jms.Connection

#### Throws

`JMSException` - if JMS implementation fails to close the connection due to internal error. For example, a failure to release resources or to close socket connection can lead to throwing of this exception.

### createQueueSession(boolean, int)

    public javax.jms.QueueSession createQueueSession(boolean transacted,
    int ack_mode)

create a queue session

#### Specified By

javax.jms.QueueConnection.createQueueSession(boolean, int) in interface javax.jms.QueueConnection

#### Parameters

`transacted` - is session transacted?

`ack_mode` - acknowledgement mode

#### Returns

QueueSession. A A QueueSession provides methods for creating QueueReceiver's, QueueSender's, QueueBrowser's.

#### Throws

`JMSException` - if JMS fails to create queue session

### createTopicSession(boolean, int)

    public javax.jms.TopicSession createTopicSession(boolean transacted,
    int ack_mode)

Create a TopicSession

#### Specified By

javax.jms.TopicConnection.createTopicSession(boolean, int) in interface javax.jms.TopicConnection

#### Parameters

`transacted` - if true, the session is transacted.

`acknowledgeMode` - indicates whether the consumer or the client will acknowledge any messages it receives. This parameter will be ignored if the session is transacted.

#### Returns

a newly created topic session.

#### Throws

`JMSException` - if JMS Connection fails to create a session due to some internal error or lack of support for specific transaction and acknowledgement mode.

### getClientID()

    public java.lang.String getClientID()

Get the client identifier for this connection.

#### Specified By

javax.jms.Connection.getClientID() in interface javax.jms.Connection

#### Returns

the unique client identifier.

#### Throws

`JMSException` - if JMS implementation fails to return the client ID for this Connection due to some internal error.

### getCurrentJmsSession()

    public javax.jms.Session getCurrentJmsSession()

gets the current session

#### Returns

Session The current JMS session

### getMetaData()

    public javax.jms.ConnectionMetaData getMetaData()

Get the meta data for this connection.

#### Specified By

javax.jms.Connection.getMetaData() in interface javax.jms.Connection

#### Returns

the connection meta data.

#### Throws

`JMSException` - general exception if JMS implementation fails to get the Connection meta-data for this Connection.

#### See Also

`javax.jms.ConnectionMetaData`

### setClientID(String)

    public void setClientID(java.lang.String clientID)

Set the client identifier for this connection.

The preferred way to assign a Client's client identifier is for it to be configured in a client-specific ConnectionFactory and transparently assigned to the Connection it creates. Alternatively, a client can set a Connections's client identifier using a provider-specific value.

The purpose of client identifier is to associate a session and its objects with a state maintained on behalf of the client by a provider. The only such state identified by JMS is that required to support durable subscriptions

#### Specified By

javax.jms.Connection.setClientID(java.lang.String) in interface javax.jms.Connection

#### Parameters

`clientID` - the unique client identifier

#### Throws

`JMSException` - general exception if JMS implementation fails to set the client ID for this Connection due to some internal error.

`InvalidClientIDException` - if JMS client specifies an invalid or duplicate client id.

### start()

    public void start()

Start (or restart) a Connection's delivery of incoming messages. Restart begins with the oldest unacknowledged message. Starting a started session is ignored.

#### Specified By

javax.jms.Connection.start() in interface javax.jms.Connection

#### Throws

`JMSException` - if JMS implementation fails to start the message delivery due to some internal error.

#### See Also

`javax.jms.Connection.stop()`

### stop()

    public void stop()

Used to temporarily stop a Connection's delivery of incoming messages. It can be restarted using its `start` method. When stopped, delivery to all the Connection's message consumers is inhibited: synchronous receive's block and messages are not delivered to message listeners.

After stop is called there may still be some messages delivered.

Stopping a Session has no affect on its ability to send messages. Stopping a stopped session is ignored.

#### Specified By

javax.jms.Connection.stop() in interface javax.jms.Connection

#### Throws

`JMSException` - if JMS implementation fails to stop the message delivery due to some internal error.

#### See Also

`javax.jms.Connection.start()`

## AQjmsConnectionMetaData

#### Syntax

    public class AQjmsConnectionMetaData extends java.lang.Object
       implements javax.jms.ConnectionMetaData

    java.lang.Object
      |
      +--oracle.jms.AQjmsConnectionMetaData

#### All Implemented Interfaces

    javax.jms.ConnectionMetaData

#### Description

This class represents the Meta Data information available for a JMS Connection.

Member Summary |
--- | ---
Constructors |
``AQjmsConnectionMetaData()``

Methods

``getJMSMajorVersion()``

Get the JMS major version number.

``getJMSMinorVersion()``

Get the JMS minor version number.

``getJMSProviderName()``

Get the JMS provider name.

``getJMSVersion()``

Get the JMS version.

``getProviderMajorVersion()``

Get the JMS provider major version number.

``getProviderMinorVersion()``

Get the JMS provider minor version number.

``getProviderVersion()``

Get the JMS provider version.

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructors

### AQjmsConnectionMetaData()

    public  AQjmsConnectionMetaData()

### Methods

### getJMSMajorVersion()

    public int getJMSMajorVersion()

Get the JMS major version number.

#### Specified By

javax.jms.ConnectionMetaData.getJMSMajorVersion() in interface javax.jms.ConnectionMetaData

#### Returns

the JMS major version number.

#### Throws

`JMSException` - if some internal error occurs in JMS implementation during the meta-data retrieval.

### getJMSMinorVersion()

    public int getJMSMinorVersion()

Get the JMS minor version number.

#### Specified By

javax.jms.ConnectionMetaData.getJMSMinorVersion() in interface javax.jms.ConnectionMetaData

#### Returns

the JMS minor version number.

#### Throws

`JMSException` - if some internal error occurs in JMS implementation during the meta-data retrieval.

### getJMSProviderName()

    public java.lang.String getJMSProviderName()

Get the JMS provider name.

#### Specified By

javax.jms.ConnectionMetaData.getJMSProviderName() in interface javax.jms.ConnectionMetaData

#### Returns

the JMS provider name.

#### Throws

`JMSException` - if some internal error occurs in JMS implementation during the meta-data retrieval.

### getJMSVersion()

    public java.lang.String getJMSVersion()

Get the JMS version.

#### Specified By

javax.jms.ConnectionMetaData.getJMSVersion() in interface javax.jms.ConnectionMetaData

#### Returns

the JMS version.

#### Throws

`JMSException` - if some internal error occurs in JMS implementation during the meta-data retrieval.

### getProviderMajorVersion()

    public int getProviderMajorVersion()

Get the JMS provider major version number.

#### Specified By

javax.jms.ConnectionMetaData.getProviderMajorVersion() in interface javax.jms.ConnectionMetaData

#### Returns

the JMS provider major version number.

#### Throws

`JMSException` - if some internal error occurs in JMS implementation during the meta-data retrieval.

### getProviderMinorVersion()

    public int getProviderMinorVersion()

Get the JMS provider minor version number.

#### Specified By

javax.jms.ConnectionMetaData.getProviderMinorVersion() in interface javax.jms.ConnectionMetaData

#### Returns

the JMS provider minor version number.

#### Throws

`JMSException` - if some internal error occurs in JMS implementation during the meta-data retrieval.

### getProviderVersion()

    public java.lang.String getProviderVersion()

Get the JMS provider version.

#### Specified By

javax.jms.ConnectionMetaData.getProviderVersion() in interface javax.jms.ConnectionMetaData

#### Returns

the JMS provider version.

#### Throws

`JMSException` - if some internal error occurs in JMS implementation during the meta-data retrieval.

## AQjmsConstants

#### Syntax

    public class AQjmsConstants

    oracle.jms.AQjmsConstants

#### Description

This class defines the constants used in the oracle.jms package

Member Summary
Fields
``EXCEPTION``

``NONE``

``NORMAL``

``STATE_EXPIRED``

``STATE_PROCESSED``

``STATE_READY``

``STATE_WAITING``

``TRANSACTIONAL``

``WAIT_FOREVER``

``WAIT_NONE``

Constructors

``AQjmsConstants()``

### Fields

### EXCEPTION

    public static final int EXCEPTION

### NONE

    public static final int NONE

### NORMAL

    public static final int NORMAL

### STATE_EXPIRED

    public static final int STATE_EXPIRED

### STATE_PROCESSED

    public static final int STATE_PROCESSED

### STATE_READY

    public static final int STATE_READY

### STATE_WAITING

    public static final int STATE_WAITING

### TRANSACTIONAL

    public static final int TRANSACTIONAL

### WAIT_FOREVER

    public static final int WAIT_FOREVER

### WAIT_NONE

    public static final int WAIT_NONE

### Constructors

### AQjmsConstants()

    public  AQjmsConstants()

## AQjmsConsumer

#### Syntax

    public class AQjmsConsumer extends java.lang.Object
       implements AQjmsQueueReceiver, AQjmsTopicSubscriber, AQjmsTopicReceiver

    java.lang.Object
      |
      +--oracle.jms.AQjmsConsumer

#### All Implemented Interfaces

    AQjmsQueueReceiver, AQjmsTopicReceiver, AQjmsTopicSubscriber,
    javax.jms.MessageConsumer, javax.jms.QueueReceiver, TopicReceiver,
    javax.jms.TopicSubscriber

#### Description

This class implements the MessageConsumer interface

Member Summary |
--- | ---
Methods |
``close()``

Since a provider may allocate some resources on behalf of a MessageConsumer outside the JVM, clients should close them when they are not needed.

``getMessageListener()``

Get the message consumer's MessageListener.

``getMessageSelector()``

Get the message consumer's message selector expression.

``getNavigationMode()``

Get the navigation mode for the consumer

``getNoLocal()``

Get the NoLocal attribute for this TopicSubscriber.

``getQueue()``

Get the queue associated with this queue receiver.

``getTopic()``

Get the topic associated with this subscriber.

``receive()``

Receive the next message produced for this message consumer.

``receive(long)``

Receive the next message that arrives within the specified timeout interval.

``receiveNoData()``

Consume the message without returning it to the user.

``receiveNoData()``

Consume the message without returning it to the user.

``receiveNoWait()``

Receive the next message if one is immediately available.

``setMessageListener(MessageListener)``

Set the message consumer's MessageListener.

``setNavigationMode(int)``

Set the navigation mode for the consumer

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### close()

    public void close()

Since a provider may allocate some resources on behalf of a MessageConsumer outside the JVM, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

#### Specified By

javax.jms.MessageConsumer.close() in interface javax.jms.MessageConsumer

#### Specified By

javax.jms.MessageConsumer.close() in interface javax.jms.MessageConsumer

#### Throws

`JMSException` - if JMS fails to close the consumer due to some error.

### getMessageListener()

    public synchronized javax.jms.MessageListener getMessageListener()

Get the message consumer's MessageListener.

#### Specified By

javax.jms.MessageConsumer.getMessageListener() in interface javax.jms.MessageConsumer

#### Specified By

javax.jms.MessageConsumer.getMessageListener() in interface javax.jms.MessageConsumer

#### Returns

the listener for the message consumer, or null if this isn't one set.

#### Throws

`JMSException` - if JMS fails to get message listener due to some JMS error

### getMessageSelector()

    public synchronized java.lang.String getMessageSelector()

Get the message consumer's message selector expression.

#### Specified By

javax.jms.MessageConsumer.getMessageSelector() in interface javax.jms.MessageConsumer

#### Specified By

javax.jms.MessageConsumer.getMessageSelector() in interface javax.jms.MessageConsumer

#### Returns

this message consumer's message selector

#### Throws

`JMSException` - if JMS fails to get message selector due to some JMS error

### getNavigationMode()

    public synchronized int getNavigationMode()

Get the navigation mode for the consumer

#### Specified By

getNavigationMode() in interface AQjmsTopicSubscriber

#### Specified By

getNavigationMode() in interface AQjmsTopicReceiver

#### Returns

the navigation mode of the consumer

#### Throws

`if` - the navigation mode could not be got

### getNoLocal()

    public synchronized boolean getNoLocal()

Get the NoLocal attribute for this TopicSubscriber. The default value for this attribute is false.

#### Specified By

javax.jms.TopicSubscriber.getNoLocal() in interface javax.jms.TopicSubscriber

#### Returns

set to true if locally published messages are being inhibited.

#### Throws

`JMSException` - if JMS fails to get noLocal attribute for this topic subscriber due to some internal error.

### getQueue()

    public synchronized javax.jms.Queue getQueue()

Get the queue associated with this queue receiver.

#### Specified By

javax.jms.QueueReceiver.getQueue() in interface javax.jms.QueueReceiver

#### Returns

the queue associated with the receiver

#### Throws

`JMSException` - if JMS fails to get queue for this queue receiver due to some internal error.

### getTopic()

    public synchronized javax.jms.Topic getTopic()

Get the topic associated with this subscriber.

#### Specified By

javax.jms.TopicSubscriber.getTopic() in interface javax.jms.TopicSubscriber

getTopic() in interface TopicReceiver

#### Returns

this subscriber's topic

#### Throws

`JMSException` - if JMS fails to get topic for this topic subscriber due to some internal error.

### receive()

    public synchronized javax.jms.Message receive()

Receive the next message produced for this message consumer.

This call blocks indefinitely until a message is produced.

#### Specified By

javax.jms.MessageConsumer.receive() in interface javax.jms.MessageConsumer

#### Returns

the next message produced for this message consumer.

#### Throws

`JMSException` - if JMS fails to receive the next message due to some error.

### receive(long)

    public synchronized javax.jms.Message receive(long timeout)

Receive the next message that arrives within the specified timeout interval.

This call blocks until either a message arrives or the timeout expires.

#### Specified By

javax.jms.MessageConsumer.receive(long) in interface javax.jms.MessageConsumer

#### Parameters

`timeout` - the timeout value (in milliseconds)

#### Returns

the next message produced for this message consumer, or null if one is not available.

#### Throws

`JMSException` - if JMS fails to receive the next message due to some error.

### receiveNoData()

    public synchronized void receiveNoData()

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database. It can be used as an optimization by jms clients who have already read the message, for example using a queue browser.

#### Specified By

receiveNoData() in interface AQjmsQueueReceiver

#### Throws

`JMSException` - if the message could not be received due to an error

### receiveNoData(long)

    public synchronized void receiveNoData(long timeout)

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database. It can be used as an optimization by jms clients who have already read the message, for example using a queue browser. This call will block until a message arrives or the timeout expires

#### Specified By

receiveNoData(long) in interface AQjmsQueueReceiver

#### Parameters

`timeout` - the timeout value in milliseconds

#### Throws

`JMSException` - if the message could not be received due to an error

### receiveNoWait()

    public synchronized javax.jms.Message receiveNoWait()

Receive the next message if one is immediately available.

#### Specified By

javax.jms.MessageConsumer.receiveNoWait() in interface javax.jms.MessageConsumer

#### Returns

the next message produced for this message consumer, or null if one is not available.

#### Throws

`JMSException` - if JMS fails to receive the next message due to some error.

### setMessageListener(MessageListener)

    public synchronized void
    setMessageListener(javax.jms.MessageListener myListener)

Set the message consumer's MessageListener. The onMessage method of this object is called when there are messages for this consumer.

#### Specified By

javax.jms.MessageConsumer.setMessageListener(javax.jms.MessageListener) in interface javax.jms.MessageConsumer

#### Parameters

`myListener` - set the consumer's message listener

#### Throws

`JMSException` - if JMS fails to get message listener due to some JMS error

### setNavigationMode(int)

    public synchronized void setNavigationMode(int mode)

Set the navigation mode for the consumer

#### Specified By

setNavigationMode(int) in interface AQjmsQueueReceiver

#### Parameters

`mode` - the navigation mode of the consumer

#### Throws

`if` - the navigation mode could not be set

## AQjmsDestination

#### Syntax

    public class AQjmsDestination extends java.lang.Object
       implements javax.jms.Queue, javax.jms.Topic

    java.lang.Object
      |
      +--oracle.jms.AQjmsDestination

#### All Implemented Interfaces

    javax.jms.Destination, javax.jms.Queue, javax.jms.Topic

#### Description

This class implements administered objects, Queue and Topic

Member Summary |
--- | ---
Methods |
``alter(Session, AQjmsDestinationProperty)``

alter the properties of the queue/topic

``alterPropagationSchedule(Session, String, Double, String, Double)``

alter propagation schedule between the topic and the destination database

``disablePropagationSchedule(Session, String)``

disable propagation schedule

``drop(Session)``

drop the queue/topic

``enablePropagationSchedule(Session, String)``

enable propagation schedule

``getCompleteName()``

Get the complete name of the queue/topic, of the form, [schema].name

``getCompleteTableName()``

Get the complete name of the queue table of the queue/topic of the form, [schema].name

``getQueueName()``

Get the name of the queue

``getQueueOwner()``

Get the owner of the queue

``getTopicName()``

Get the name of the Topic

``getTopicOwner()``

Get the schema of the topic

``grantQueuePrivilege(Session, String, String, boolean)``

Grant enqueue or dequeue privilege on the queue to a database user

``grantTopicPrivilege(Session, String, String, boolean)``

Grant a topic privilege

``revokeQueuePrivilege(Session, String, String)``

Revoke a queue privilege

``revokeTopicPrivilege(Session, String, String)``

Revoke a topic privilege

``schedulePropagation(Session, String, Date, Double, String, Double)``

Schedule propagation from the topic for the given destination database

``start(Session, boolean, boolean)``

start the queue/topic for enqueue or dequeue or both

``stop(Session, boolean, boolean, boolean)``

stop the queue/topic for enqueue or dequeue or both

``toString()``

Get the queue/topic as a string, of the form [schema].name

``unschedulePropagation(Session, String)``

Unschedule propagation between the topic and the specified destination

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods

### alter(Session, AQjmsDestinationProperty)

    public void alter(javax.jms.Session session,
    AQjmsDestinationProperty dest_property)

alter the properties of the queue/topic

#### Parameters

`session` - the jms session

`dest_property` - the new properties of the queue/topic

### alterPropagationSchedule(Session, String, Double, String, Double)

    public void alterPropagationSchedule(javax.jms.Session session,
    java.lang.String destination, java.lang.Double duration,
    java.lang.String next_time, java.lang.Double latency)

alter propagation schedule between the topic and the destination database

#### Parameters

`session` - the jms session

`destination` - the dblink of the destination database

`duration` - the new duration

`next_time` - the new next_time for propagation

`latency` - the new latency

### disablePropagationSchedule(Session, String)

    public void disablePropagationSchedule(javax.jms.Session session,
    java.lang.String destination)

disable propagation schedule

#### Parameters

`session` - the jms session

`destination` - the dblink to the destination database

#### Throws

`JMSException` - if the propagation schedule could not be disabled

### drop(Session)

    public void drop(javax.jms.Session session)

drop the queue/topic

#### Parameters

`session` - the jms session

#### Throws

`JMSException` - if the queue/topic could not be dropped

### enablePropagationSchedule(Session, String)

    public void enablePropagationSchedule(javax.jms.Session session,
    java.lang.String destination)

enable propagation schedule

#### Parameters

`session` - the JMS session

`destination` - the dblink of the destination database

#### Throws

`JMSException` - if the propagation could not be enabled

### getCompleteName()

    public java.lang.String getCompleteName()

Get the complete name of the queue/topic, of the form, [schema].name

#### Returns

the complete name of the queue/topic

### getCompleteTableName()

    public java.lang.String getCompleteTableName()

Get the complete name of the queue table of the queue/topic of the form, [schema].name

#### Returns

the complete name of the queue/topic's queue table

### getQueueName()

    public java.lang.String getQueueName()

Get the name of the queue

#### Specified By

javax.jms.Queue.getQueueName() in interface javax.jms.Queue

#### Returns

the name of the queue

#### Throws

`JMSException` - if the queue is not a single consumer queue

### getQueueOwner()

    public java.lang.String getQueueOwner()

Get the owner of the queue

#### Returns

the schema of the queue

#### Throws

`JMSException` - if the schema could not be retrieved

### getTopicName()

    public java.lang.String getTopicName()

Get the name of the Topic

#### Specified By

javax.jms.Topic.getTopicName() in interface javax.jms.Topic

#### Returns

the name of the topic

#### Throws

`JMSException` - if the queue is not a multi consumer queue (topic)

### getTopicOwner()

    public java.lang.String getTopicOwner()

Get the schema of the topic

#### Returns

the schema of the topic

#### Throws

`JMSException` - if the schema could not be retrieved

### grantQueuePrivilege(Session, String, String, boolean)

    public void grantQueuePrivilege(javax.jms.Session session,
    java.lang.String privilege, java.lang.String grantee, boolean grant_
    option)

Grant enqueue or dequeue privilege on the queue to a database user

#### Parameters

`session` - the jms session

`privilege` - the privilege (ENQUEUE or DEQUEUE)

`grantee` - the user being granted the privilege

`grant_option` - whether the grantee can grant the privilege to others

#### Throws

`JMSException` - if the privilege could not be granted

### grantTopicPrivilege(Session, String, String, boolean)

    public void grantTopicPrivilege(javax.jms.Session session,
    java.lang.String privilege, java.lang.String grantee, boolean grant_
    option)

Grant a topic privilege

#### Parameters

`session` - the jms session

`privilege` - the privilege (ENQUEUE or DEQUEUE) being granted

`grantee` - the database user being granted the privilege

`grant_option` - whether the grantee can grant the privilege to other users

#### Throws

`JMSException` - if the privilege could not be granted

### revokeQueuePrivilege(Session, String, String)

    public void revokeQueuePrivilege(javax.jms.Session session,
    java.lang.String privilege, java.lang.String grantee)

Revoke a queue privilege

#### Parameters

`session` - the jms session

`privilege` - the privilege (ENQUEUE or DEQUEUE) being revoked

`grantee` - the database user from whom the privilege is being revoked

#### Throws

`JMSException` - if the privilege could not be revoked

### revokeTopicPrivilege(Session, String, String)

    public void revokeTopicPrivilege(javax.jms.Session session,
    java.lang.String privilege, java.lang.String grantee)

Revoke a topic privilege

#### Parameters

`session` - the jms session

`privilege` - the privilege (ENQUEUE or DEQUEUE) being revoked

`grantee` - the database user from whom the privilege is being revoked

#### Throws

`JMSException` - if the privilege could not be revoked

### schedulePropagation(Session, String, Date, Double, String, Double)

    public void schedulePropagation(javax.jms.Session session,
    java.lang.String destination, java.util.Date start_time,
    java.lang.Double duration, java.lang.String next_time,
    java.lang.Double latency)

Schedule propagation from the topic for the given destination database

#### Parameters

`session` - the JMS session

`destination` - the dblink of the remote database for which propagation is being scheduled. A null string means that propagation will be scheduled for all subscribers in the database of the topic

`start_time` - the time propagation must be started

`duration` - the duration of propagation

`next_time` - the next time propagation must be done

`latency` - the latency in seconds that can be tolerated latency is the difference between the time a message was enqueued and the time it was propagated

#### Throws

`JMSException` - if propagation could not be scheduled

### start(Session, boolean, boolean)

    public void start(javax.jms.Session session, boolean enqueue,
    boolean dequeue)

start the queue/topic for enqueue or dequeue or both

#### Parameters

`session` - the jms session

`enqueue` - whether enqueue should be enabled

`dequeue` - whether dequeue should be enabled

#### Throws

`JMSException` - if failed to start the queue/topic

### stop(Session, boolean, boolean, boolean)

    public void stop(javax.jms.Session session, boolean enqueue, boolean
    dequeue, boolean wait)

stop the queue/topic for enqueue or dequeue or both

#### Parameters

`session` - the jms session

`enqueue` - whether enqueue should be disabled

`dequeue` - whether dequeue should be disabled

`wait` - whether to wait for pending transactions on the queue/topic to complete

#### Throws

`JMSException` - if failed to stop the queue/topic

### toString()

    public java.lang.String toString()

Get the queue/topic as a string, of the form [schema].name

#### Specified By

javax.jms.Queue.toString() in interface javax.jms.Queue

#### Overrides

java.lang.Object.toString() in class java.lang.Object

#### Returns

the queue/topic as a string

### unschedulePropagation(Session, String)

    public void unschedulePropagation(javax.jms.Session session,
    java.lang.String destination)

Unschedule propagation between the topic and the specified destination

#### Parameters

`session` - the jms session

`destination` - the dblink of the destination database for which propagation must be unscheduled

#### Throws

`JMSException` - if propagation could not be unscheduled

## AQjmsDestinationProperty

    public class AQjmsDestinationProperty
    oracle.jms.AQjmsDestinationProperty

This class defines Destination properties

Member Summary |
--- | ---
Fields |
`NORMAL_QUEUE` |
`EXCEPTION_QUEUE` |
`INFINITE` | infinite retention
Constructors |
``AQjmsDestinationProperty()``

Constructor - initializes object with default destination properties

Methods

``getQueueType``

This method gets the queue type.

``setQueueType``

This method is used to set the queue type.

``getMaxRetries``

This method gets the maximum retries for dequeue with `REMOVE` mode.

``setMaxRetries``

This method sets the maximum retries for dequeue with `REMOVE` mode.

``setRetryInterval``

This method sets the retry interval, that is the time before this message is scheduled for processing after an application rollback. Default is 0.

``getRetryInterval``

This method gets the retry interval.

``getRetentionTime``

This method gets the retention time.

``setRetentionTime``

This method gets the retention time.

``getComment``

This method gets the queue comment.

``setComment``

This method sets the queue comment.

### Constants

    public static final int NORMAL_QUEUE
    public static final int EXCEPTION_QUEUE
    public static final int INFINITE   /* infinite retention */

### Constructors

### AQjmsDestinationProperty()

    public  AQjmsDestinationProperty()

Constructor - initializes object with default destination properties

### Methods

### getQueueType

    public int getQueueType() throws AQException

This method gets the queue type.

#### Returns

`NORMAL_QUEUE` or `EXCEPTION_QUEUE`

### setQueueType

    public void setQueueType(int q_type) throws AQException

This method is used to set the queue type.

Parameter | Meaning
--- | ---
`q_type` | `NORMAL_QUEUE` or `EXCEPTION_QUEUE`

### getMaxRetries

    public int getMaxRetries() throws AQException

This method gets the maximum retries for dequeue with `REMOVE` mode.

### setMaxRetries

    public void setMaxRetries(int retries) throws AQException
    public void setMaxRetries(Integer retries) throws AQException

This method sets the maximum retries for dequeue with `REMOVE` mode.

Parameter | Meaning
--- | ---
`retries` | maximum retries for dequeue with REMOVE mode; specifying `NULL` will use the default. The default applies to single consumer queues and 8.1. compatible multiconsumer queues. `Max_retries` is not supported for 8.0 compatible multiconsumer queues.

### setRetryInterval

    public void setRetryInterval(double interval) throws AQException
    public void setRetryInterval(Double interval) throws AQException

This method sets the retry interval, that is the time before this message is scheduled for processing after an application rollback. Default is 0.

Parameter | Meaning
--- | ---
`interval` | retry interval; specifying `NULL` will use the default

### getRetryInterval

    public double getRetryInterval() throws AQException

This method gets the retry interval.

### getRetentionTime

    public double getRetentionTime() throws AQException

This method gets the retention time.

### setRetentionTime

    public void setRetentionTime(double r_time) throws AQException
    public void setRetentionTime(Double r_time) throws AQException

This method gets the retention time.

Parameter | Meaning
--- | ---
`r_time` | retention time; specifying `NULL` will use the default

### getComment

    public java.lang.String getComment() throws AQException

This method gets the queue comment.

### setComment

    public void setComment(java.lang.String qt_comment) throws
    AQException

This method sets the queue comment.

Parameter | Meaning
--- | ---
qt_comment | queue comment

## AQjmsException

#### Syntax

    public class AQjmsException extends javax.jms.JMSException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--javax.jms.JMSException
                        |
                        +--oracle.jms.AQjmsException

#### All Implemented Interfaces

    java.io.Serializable

#### Description

This exception extends JMSException - adds Oracle error codes. This is the root of all JMS exceptions

Member Summary |
--- | ---
Methods |
``getErrorNumber()``

Get the Oracle Error code for the exception

Inherited Member Summary
Methods inherited from interface javax.jms.JMSException
`getErrorCode, getLinkedException, setLinkedException`
Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods

### getErrorNumber()

    public int getErrorNumber()

Get the Oracle Error code for the exception

## AQjmsFactory

#### Syntax

    public class AQjmsFactory extends java.lang.Object

    java.lang.Object
      |
      +--oracle.jms.AQjmsFactory

#### Description

This class is used for accessing administered ConnectionFactory objects in Oracle's implementation of JMS

Member Summary |
--- | ---
Methods |
``getQueueConnectionFactory(String, Properties)``

get a Queue Connection Factory

``getQueueConnectionFactory(String, String, int, String)``

get a Queue Connection Factory

``getTopicConnectionFactory(String, Properties)``

get a Topic Connection Factory

``getTopicConnectionFactory(String, String, int, String)``

get a Topic Connection Factory

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### getQueueConnectionFactory(String, Properties)

    public static javax.jms.QueueConnectionFactory
    getQueueConnectionFactory(java.lang.String jdbc_url,
    java.util.Properties info)

get a Queue Connection Factory

#### Parameters

`jdbc_url` - url to connect to info properties information

#### Returns

a Queue Connection Factory

#### Throws

`JMSException` - if JMS fails to get a queue connection factory due to some JMS error

### getQueueConnectionFactory(String, String, int, String)

    public static javax.jms.QueueConnectionFactory
    getQueueConnectionFactory(java.lang.String hostname,
    java.lang.String oracle_sid, int portno, java.lang.String driver)

get a Queue Connection Factory

#### Parameters

`hostname` - the name of the host running oracle oracle_sid the oracle system identifier portno the port number driver the type of jdbc driver

#### Returns

a Queue Connection Factory

#### Throws

`JMSException` - if JMS fails to get a queue connection factory due to some JMS error

### getTopicConnectionFactory(String, Properties)

    public static javax.jms.TopicConnectionFactory
    getTopicConnectionFactory(java.lang.String jdbc_url,
    java.util.Properties info)

get a Topic Connection Factory

#### Parameters

`jdbc_url` - url to connect to info properties information

#### Returns

a Topic Connection Factory

#### Throws

`JMSException` - if JMS fails to get a queue connection factory due to some JMS error

### getTopicConnectionFactory(String, String, int, String)

    public static javax.jms.TopicConnectionFactory
    getTopicConnectionFactory(java.lang.String hostname,
    java.lang.String oracle_sid, int portno, java.lang.String driver)

get a Topic Connection Factory

#### Parameters

`hostname` - the name of the host running oracle oracle_sid the oracle system identifier portno the port number driver the type of jdbc driver

#### Returns

a Topic Connection Factory

#### Throws

`JMSException` - if JMS fails to get a queue connection factory due to some JMS error

## AQjmsInvalidDestinationException

#### Syntax

    public class AQjmsInvalidDestinationException
       extends javax.jms.InvalidDestinationException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--javax.jms.JMSException
                        |
                        +--javax.jms.InvalidDestinationException
                            |
                          +--oracle.jms.AQjmsInvalidDestinationException

#### All Implemented Interfaces

    java.io.Serializable

#### Description

This exception extends InvalidDestinationException. It is thrown when a Destination is not valid

Inherited Member Summary
Methods inherited from interface javax.jms.JMSException
`getErrorCode, getLinkedException, setLinkedException`
Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## AQjmsInvalidSelectorException

#### Syntax

    public class AQjmsInvalidSelectorException
       extends javax.jms.InvalidSelectorException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--javax.jms.JMSException
                        |
                        +--javax.jms.InvalidSelectorException
                             |
                             +--oracle.jms.AQjmsInvalidSelectorException

#### All Implemented Interfaces

    java.io.Serializable

#### Description

This exception extends InvalidSelectorException. It is thrown when the specified MessageSelector is not valid

Inherited Member Summary
Methods inherited from interface javax.jms.JMSException
`getErrorCode, getLinkedException, setLinkedException`
Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## AQjmsMapMessage

#### Syntax

    public class AQjmsMapMessage extends AQjmsMessage
       implements javax.jms.MapMessage

    java.lang.Object
      |
      +--AQjmsMessage
            |
            +--oracle.jms.AQjmsMapMessage

#### All Implemented Interfaces

    javax.jms.MapMessage, javax.jms.Message

#### Description

This class implements the MapMessage interface. A MapMessage is used to send a set of name-value pairs where names are Strings and values are java primitive types

Member Summary |
--- | ---
Methods |
``clearBody()``

Clear out the message body.

``clearProperties()``

Clear a message's properties.

``getBoolean(String)``

Return the boolean value with the given name.

``getByte(String)``

Return the byte value with the given name.

``getBytes(String)``

Return the byte array value with the given name.

``getChar(String)``

Return the Unicode character value with the given name.

``getDouble(String)``

Return the double value with the given name.

``getFloat(String)``

Return the float value with the given name.

``getInt(String)``

Return the integer value with the given name.

``getLong(String)``

Return the long value with the given name.

``getMapNames()``

Return an Enumeration of all the Map message's names.

``getObject(String)``

Return the Java object value with the given name.

``getShort(String)``

Return the short value with the given name.

``getString(String)``

Set a String value with the given name, into the Map.

``itemExists(String)``

Check if an item exists in this MapMessage.

``setBoolean(String, boolean)``

Set a boolean value with the given name, into the Map.

``setByte(String, byte)``

Set a byte value with the given name, into the Map.

``setBytes(String, byte[])``

Set a byte array value with the given name, into the Map.

``setBytes(String, byte[], int, int)``

Set a portion of the byte array value with the given name, into the Map.

``setChar(String, char)``

Set a Unicode character value with the given name, into the Map.

``setDouble(String, double)``

Set a double value with the given name, into the Map.

``setFloat(String, float)``

Set a float value with the given name, into the Map.

``setInt(String, int)``

Set an integer value with the given name, into the Map.

``setLong(String, long)``

Set a long value with the given name, into the Map.

``setObject(String, Object)``

Set a Java object value with the given name, into the Map.

``setShort(String, short)``

Set a short value with the given name, into the Map.

``setString(String, String)``

Set a String value with the given name, into the Map.

Inherited Member Summary
Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`
Methods inherited from class AQjmsMessage
``getBooleanProperty(String)``

, getByteProperty(String)``, getDoubleProperty(String)``, getFloatProperty(String)``, getIntProperty(String)``, getJMSCorrelationID()``, getJMSCorrelationIDAsBytes()``, getJMSDeliveryMode()``, getJMSDestination()``, getJMSExpiration()``, getJMSMessageID()``, getJMSMessageIDAsBytes()``, getJMSPriority()``, getJMSRedelivered()``, getJMSReplyTo()``, getJMSTimestamp()``, getJMSType()``, getLongProperty(String)``, getObjectProperty(String)``, getPropertyNames()``, getSenderID()``, getShortProperty(String)``, getStringProperty(String)``, propertyExists(String)``, setBooleanProperty(String, boolean)``, setByteProperty(String, byte)``, setDoubleProperty(String, double)``, setFloatProperty(String, float)``, setIntProperty(String, int)``, setJMSCorrelationID(String)``, setJMSCorrelationIDAsBytes(byte[])``, setJMSDestination(Destination)``, setJMSExpiration(long)``, setJMSMessageID(String)``, setJMSPriority(int)``, setJMSRedelivered(boolean)``, setJMSReplyTo(Destination)``, setJMSTimestamp(long)``, setJMSType(String)``, setLongProperty(String, long)``, setObjectProperty(String, Object)``, setSenderID(AQjmsAgent)``, setShortProperty(String, short)``, setStringProperty(String, String)``

Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.jms.Message

`getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty`

### Methods

### clearBody()

    public void clearBody()

Clear out the message body. All other parts of the message are left untouched. The message can now be both read and written to.

#### Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

#### Overrides

clearBody() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to due to some internal JMS error.

### clearProperties()

    public void clearProperties()

Clear a message's properties.

#### Specified By

javax.jms.Message.clearProperties() in interface javax.jms.Message

#### Overrides

clearProperties() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to clear JMS message properties due to some internal JMS error.

### getBoolean(String)

    public boolean getBoolean(java.lang.String name)

Return the boolean value with the given name.

#### Specified By

javax.jms.MapMessage.getBoolean(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the boolean

#### Returns

the boolean value with the given name.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getByte(String)

    public byte getByte(java.lang.String name)

Return the byte value with the given name.

#### Specified By

javax.jms.MapMessage.getByte(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the byte

#### Returns

the byte value with the given name.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getBytes(String)

    public byte[] getBytes(java.lang.String name)

Return the byte array value with the given name.

#### Specified By

javax.jms.MapMessage.getBytes(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the byte array

#### Returns

the byte array value with the given name. If there is no item by this name, a null value is returned.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getChar(String)

    public char getChar(java.lang.String name)

Return the Unicode character value with the given name.

#### Specified By

javax.jms.MapMessage.getChar(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the Unicode character

#### Returns

the Unicode character value with the given name.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getDouble(String)

    public double getDouble(java.lang.String name)

Return the double value with the given name.

#### Specified By

javax.jms.MapMessage.getDouble(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the double

#### Returns

the double value with the given name.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getFloat(String)

    public float getFloat(java.lang.String name)

Return the float value with the given name.

#### Specified By

javax.jms.MapMessage.getFloat(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the float

#### Returns

the float value with the given name.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getInt(String)

    public int getInt(java.lang.String name)

Return the integer value with the given name.

#### Specified By

javax.jms.MapMessage.getInt(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the integer

#### Returns

the integer value with the given name.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getLong(String)

    public long getLong(java.lang.String name)

Return the long value with the given name.

#### Specified By

javax.jms.MapMessage.getLong(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the long

#### Returns

the long value with the given name.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getMapNames()

    public java.util.Enumeration getMapNames()

Return an Enumeration of all the Map message's names.

#### Specified By

javax.jms.MapMessage.getMapNames() in interface javax.jms.MapMessage

#### Returns

an enumeration of all the names in this Map message.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

### getObject(String)

    public java.lang.Object getObject(java.lang.String name)

Return the Java object value with the given name.

Note that this method can be used to return in objectified format, an object that had been stored in the Map with the equivalent `setObject` method call, or it's equivalent primitive set method.

#### Specified By

javax.jms.MapMessage.getObject(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the Java object

#### Returns

the Java object value with the given name, in objectified format (i.e. if it set as an int, then a Integer is returned). If there is no item by this name, a null value is returned.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

### getShort(String)

    public short getShort(java.lang.String name)

Return the short value with the given name.

#### Specified By

javax.jms.MapMessage.getShort(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the short

#### Returns

the short value with the given name.

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageFormatException` - if this type conversion is invalid.

### getString(String)

    public java.lang.String getString(java.lang.String name)

Set a String value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.getString(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the String

`value` - the String value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### itemExists(String)

    public boolean itemExists(java.lang.String name)

Check if an item exists in this MapMessage.

#### Specified By

javax.jms.MapMessage.itemExists(java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the item to test

#### Returns

true if the item does exist.

#### Throws

`JMSException` - if a JMS error occurs.

### setBoolean(String, boolean)

    public void setBoolean(java.lang.String name, boolean value)

Set a boolean value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setBoolean(java.lang.String, boolean) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the boolean

`value` - the boolean value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setByte(String, byte)

    public void setByte(java.lang.String name, byte value)

Set a byte value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setByte(java.lang.String, byte) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the byte

`value` - the byte value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setBytes(String, byte[])

    public void setBytes(java.lang.String name, byte[] value)

Set a byte array value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setBytes(java.lang.String, byte[]) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the byte array

`value` - the byte array value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setBytes(String, byte[], int, int)

    public void setBytes(java.lang.String name, byte[] value, int
    offset, int length)

Set a portion of the byte array value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setBytes(java.lang.String, byte[], int, int) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the byte array

`value` - the byte array value to set in the Map.

`offset` - the initial offset within the byte array.

`length` - the number of bytes to use.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setChar(String, char)

    public void setChar(java.lang.String name, char value)

Set a Unicode character value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setChar(java.lang.String, char) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the Unicode character

`value` - the Unicode character value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setDouble(String, double)

    public void setDouble(java.lang.String name, double value)

Set a double value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setDouble(java.lang.String, double) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the double

`value` - the double value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setFloat(String, float)

    public void setFloat(java.lang.String name, float value)

Set a float value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setFloat(java.lang.String, float) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the float

`value` - the float value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setInt(String, int)

    public void setInt(java.lang.String name, int value)

Set an integer value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setInt(java.lang.String, int) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the integer

`value` - the integer value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setLong(String, long)

    public void setLong(java.lang.String name, long value)

Set a long value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setLong(java.lang.String, long) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the long

`value` - the long value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setObject(String, Object)

    public void setObject(java.lang.String name, java.lang.Object value)

Set a Java object value with the given name, into the Map.

Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and byte arrays.

#### Specified By

javax.jms.MapMessage.setObject(java.lang.String, java.lang.Object) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the Java object

`value` - the Java object value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageFormatException` - if object is invalid

`MessageNotWriteableException` - if message in read-only mode.

### setShort(String, short)

    public void setShort(java.lang.String name, short value)

Set a short value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setShort(java.lang.String, short) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the short

`value` - the short value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

### setString(String, String)

    public void setString(java.lang.String name, java.lang.String value)

Set a String value with the given name, into the Map.

#### Specified By

javax.jms.MapMessage.setString(java.lang.String, java.lang.String) in interface javax.jms.MapMessage

#### Parameters

`name` - the name of the String

`value` - the String value to set in the Map.

#### Throws

`JMSException` - if JMS fails to write message due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

## AQjmsMessage

#### Syntax

    public class AQjmsMessage extends java.lang.Object
       implements javax.jms.Message

    java.lang.Object
      |
      +--oracle.jms.AQjmsMessage

#### Direct Known Subclasses

    AQjmsAdtMessage, AQjmsBytesMessage, AQjmsMapMessage,
    AQjmsObjectMessage, AQjmsStreamMessage, AQjmsTextMessage

#### All Implemented Interfaces

    javax.jms.Message

#### Description

This class implements the Message interface. This is the superclass of all JMS messages

Member Summary |
--- | ---
Methods |
``clearBody()``

Clear out the message body.

``clearProperties()``

Clear a message's properties.

``getBooleanProperty(String)``

Return the boolean property value with the given name.

``getByteProperty(String)``

Return the byte property value with the given name.

``getDoubleProperty(String)``

Return the double property value with the given name.

``getFloatProperty(String)``

Return the float property value with the given name.

``getIntProperty(String)``

Return the integer property value with the given name.

``getJMSCorrelationID()``

Get the correlation ID for the message.

``getJMSCorrelationIDAsBytes()``

Get the correlation ID as an array of bytes for the message.

``getJMSDeliveryMode()``

Get the delivery mode for this message.

``getJMSDestination()``

Get the destination for this message.

``getJMSExpiration()``

Get the message's expiration value.

``getJMSMessageID()``

Get the message ID.

``getJMSMessageIDAsBytes()``

Get the message ID.

``getJMSPriority()``

Get the message priority.

``getJMSRedelivered()``

Get an indication of whether this message is being redelivered.

``getJMSReplyTo()``

Get the replyTo field for this message

``getJMSTimestamp()``

Get the message timestamp.

``getJMSType()``

Get the message type.

``getLongProperty(String)``

Return the long property value with the given name.

``getObjectProperty(String)``

Return the Java object property value with the given name.

``getPropertyNames()``

Return an Enumeration of all the property names.

``getSenderID()``

Get the message's senderID.

``getShortProperty(String)``

Return the short property value with the given name.

``getStringProperty(String)``

Return the String property value with the given name.

``propertyExists(String)``

Check if a property value exists.

``setBooleanProperty(String, boolean)``

Set a boolean property value with the given name, into the Message.

``setByteProperty(String, byte)``

Set a byte property value with the given name, into the Message.

``setDoubleProperty(String, double)``

Set a double property value with the given name, into the Message.

``setFloatProperty(String, float)``

Set a float property value with the given name, into the Message.

``setIntProperty(String, int)``

Set an integer property value with the given name, into the Message.

``setJMSCorrelationID(String)``

Set the correlation ID for the message.

``setJMSCorrelationIDAsBytes(byte[])``

Set the correlation ID as an array of bytes for the message.

``setJMSDestination(Destination)``

Set the destination for this message.

``setJMSExpiration(long)``

Set the message's expiration value Providers set this field when a message is sent.

``setJMSMessageID(String)``

Set the message ID.

``setJMSPriority(int)``

Set the priority for this message.

``setJMSRedelivered(boolean)``

Set to indicate whether this message is being redelivered.

``setJMSReplyTo(Destination)``

Set where a reply to this message should be sent.

``setJMSTimestamp(long)``

Set the message timestamp.

``setJMSType(String)``

Set the message type.

``setLongProperty(String, long)``

Set a long property value with the given name, into the Message.

``setObjectProperty(String, Object)``

Set a Java object property value with the given name, into the Message.

``setSenderID(AQjmsAgent)``

Set the message's senderID.

``setShortProperty(String, short)``

Set a short property value with the given name, into the Message.

``setStringProperty(String, String)``

Set a String property value with the given name, into the Message.

Inherited Member Summary
Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### clearBody()

    public void clearBody()

Clear out the message body. All other parts of the message are left untouched.

#### Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

#### Throws

`JMSException` - if JMS fails to clear message

### clearProperties()

    public void clearProperties()

Clear a message's properties.

#### Specified By

javax.jms.Message.clearProperties() in interface javax.jms.Message

#### Throws

`JMSException` - if JMS fails to clear JMS message properties due to some internal JMS error.

### getBooleanProperty(String)

    public boolean getBooleanProperty(java.lang.String name)

Return the boolean property value with the given name.

#### Specified By

javax.jms.Message.getBooleanProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the boolean property

#### Returns

the boolean property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property

`MessageFormatException` - if this type conversion is invalid.

### getByteProperty(String)

    public byte getByteProperty(java.lang.String name)

Return the byte property value with the given name.

#### Specified By

javax.jms.Message.getByteProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the byte property

#### Returns

the byte property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property

`MessageFormatException` - if this type conversion is invalid.

### getDoubleProperty(String)

    public double getDoubleProperty(java.lang.String name)

Return the double property value with the given name.

#### Specified By

javax.jms.Message.getDoubleProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the double property

#### Returns

the double property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property

`MessageFormatException` - if this type conversion is invalid.

### getFloatProperty(String)

    public float getFloatProperty(java.lang.String name)

Return the float property value with the given name.

#### Specified By

javax.jms.Message.getFloatProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the float property

#### Returns

the float property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property

`MessageFormatException` - if this type conversion is invalid.

### getIntProperty(String)

    public int getIntProperty(java.lang.String name)

Return the integer property value with the given name.

#### Specified By

javax.jms.Message.getIntProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the integer property

#### Returns

the integer property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property

`MessageFormatException` - if this type conversion is invalid.

### getJMSCorrelationID()

    public java.lang.String getJMSCorrelationID()

Get the correlation ID for the message.

#### Specified By

javax.jms.Message.getJMSCorrelationID() in interface javax.jms.Message

#### Returns

the correlation ID of a message as a String.

#### Throws

`JMSException` - if JMS fails to get correlationId due to some internal JMS error.

### getJMSCorrelationIDAsBytes()

    public byte[] getJMSCorrelationIDAsBytes()

Get the correlation ID as an array of bytes for the message.

#### Specified By

javax.jms.Message.getJMSCorrelationIDAsBytes() in interface javax.jms.Message

#### Returns

the correlation ID of a message as an array of bytes.

#### Throws

`JMSException` - if JMS fails to get correlationId due to some internal JMS error.

### getJMSDeliveryMode()

    public int getJMSDeliveryMode()

Get the delivery mode for this message.

#### Specified By

javax.jms.Message.getJMSDeliveryMode() in interface javax.jms.Message

#### Returns

the delivery mode of this message. In the current version this will always return DeliveryMode.PERSISTENT

#### Throws

`JMSException` - if JMS fails to get JMS DeliveryMode due to some internal JMS error.

### getJMSDestination()

    public javax.jms.Destination getJMSDestination()

Get the destination for this message. The destination field contains the destination to which the message is being sent. When a message is sent this value is ignored. After completion of the send method it holds the destination specified by the send. When a message is received, its destination value must be equivalent to the value assigned when it was sent.

#### Specified By

javax.jms.Message.getJMSDestination() in interface javax.jms.Message

#### Returns

the destination of this message.

#### Throws

`JMSException` - if JMS fails to get JMS Destination due to some internal JMS error.

### getJMSExpiration()

    public long getJMSExpiration()

Get the message's expiration value. When a message is sent, expiration is left unassigned. After completion of the send method, it holds the expiration time of the message. This is the sum of the time-to-live value specified by the client and the GMT at the time of the send. If the time-to-live is specified as zero, expiration is set to zero which indicates the message does not expire. When a message's expiration time is reached, the message is moved to the exception queue corresponding to the destination queue/topic

#### Specified By

javax.jms.Message.getJMSExpiration() in interface javax.jms.Message

#### Returns

the time the message expires. It is the sum of the time-to-live value specified by the client, and the GMT at the time of the send.

#### Throws

`JMSException` - if JMS fails to get JMS message expiration due to some internal JMS error.

#### See Also

`javax.jms.Message#setJMSExpiration()`

### getJMSMessageID()

    public java.lang.String getJMSMessageID()

Get the message ID. The messageID header field contains a value that uniquely identifies each message sent by a provider. When the send method returns it contains a provider-assigned value. All JMSMessageID string values start with the prefix `ID:'

#### Specified By

javax.jms.Message.getJMSMessageID() in interface javax.jms.Message

#### Returns

the message ID as a string (prefixed with 'ID:')

#### Throws

`JMSException` - if JMS fails to get the message Id due to internal JMS error.

### getJMSMessageIDAsBytes()

    public byte[] getJMSMessageIDAsBytes()

Get the message ID.

#### Returns

the message ID as a byte array

#### Throws

`JMSException` - if JMS fails to get the message Id due to internal JMS error.

### getJMSPriority()

    public int getJMSPriority()

Get the message priority. JMS defines a ten level priority value with 0 as the lowest priority and 9 as the highest.

#### Specified By

javax.jms.Message.getJMSPriority() in interface javax.jms.Message

#### Returns

the default message priority

### getJMSRedelivered()

    public boolean getJMSRedelivered()

Get an indication of whether this message is being redelivered.

If a client receives a message with the redelivered indicator set, it is likely, but not guaranteed, that this message was delivered to the client earlier but the client did not commit the transaction

#### Specified By

javax.jms.Message.getJMSRedelivered() in interface javax.jms.Message

#### Returns

set to true if this message is being redelivered.

#### Throws

`JMSException` - if JMS fails to get JMS Redelivered flag due to some internal JMS error.

### getJMSReplyTo()

    public javax.jms.Destination getJMSReplyTo()

Get the replyTo field for this message

#### Specified By

javax.jms.Message.getJMSReplyTo() in interface javax.jms.Message

#### Returns

replyTo destination (the format is a AQjmsAgent)

### getJMSTimestamp()

    public long getJMSTimestamp()

Get the message timestamp. The JMSTimestamp header field contains the time a message was handed off to a provider to be sent. When a message is sent, JMSTimestamp is ignored. When the send is complete - this method will contain the time the message was enqueued.

#### Specified By

javax.jms.Message.getJMSTimestamp() in interface javax.jms.Message

#### Throws

`JMSException` - if JMS fails to get the Timestamp

### getJMSType()

    public java.lang.String getJMSType()

Get the message type.

#### Specified By

javax.jms.Message.getJMSType() in interface javax.jms.Message

#### Returns

the message type

#### Throws

`JMSException` - if JMS fails to get JMS message type due to some internal JMS error.

### getLongProperty(String)

    public long getLongProperty(java.lang.String name)

Return the long property value with the given name.

#### Specified By

javax.jms.Message.getLongProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the long property

#### Returns

the long property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property

`MessageFormatException` - if this type conversion is invalid.

### getObjectProperty(String)

    public java.lang.Object getObjectProperty(java.lang.String name)

Return the Java object property value with the given name. Note that this method can be used to return in objectified format, an object that had been stored as a property in the Message with the equivalent `setObject` method call, or it's equivalent primitive set method.

#### Specified By

javax.jms.Message.getObjectProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the Java object property

#### Returns

the Java object property value with the given name, in objectified format (i.e. if it set as an int, then a Integer is returned). If there is no property by this name, a null value is returned.

#### Throws

`JMSException` - if JMS fails to get Property due to some internal JMS error.

### getPropertyNames()

    public synchronized java.util.Enumeration getPropertyNames()

Return an Enumeration of all the property names.

#### Specified By

javax.jms.Message.getPropertyNames() in interface javax.jms.Message

#### Returns

an enumeration of all the names of property values.

#### Throws

`JMSException` - if JMS fails to get Property names due to some internal JMS error.

### getSenderID()

    public AQjmsAgent getSenderID()

Get the message's senderID. This value is available only if it was set by the sender before sending the message

#### Throws

`JMSException` - if JMS fails to get SenderID

### getShortProperty(String)

    public short getShortProperty(java.lang.String name)

Return the short property value with the given name.

#### Specified By

javax.jms.Message.getShortProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the short property

#### Returns

the short property value with the given name.

#### Throws

`JMSException` - if JMS fails to get Property

`MessageFormatException` - if this type conversion is invalid.

### getStringProperty(String)

    public java.lang.String getStringProperty(java.lang.String name)

Return the String property value with the given name.

#### Specified By

javax.jms.Message.getStringProperty(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the String property

#### Returns

the String property value with the given name. If there is no property by this name, a null value is returned.

#### Throws

`JMSException` - if JMS fails to get Property

`MessageFormatException` - if this type conversion is invalid.

### propertyExists(String)

    public boolean propertyExists(java.lang.String name)

Check if a property value exists.

#### Specified By

javax.jms.Message.propertyExists(java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the property to test

#### Returns

true if the property does exist.

#### Throws

`JMSException` - if JMS fails to check if property exists due to some internal JMS error.

### setBooleanProperty(String, boolean)

    public void setBooleanProperty(java.lang.String name, boolean value)

Set a boolean property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setBooleanProperty(java.lang.String, boolean) in interface javax.jms.Message

#### Parameters

`name` - the name of the boolean property

`value` - the boolean property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageNotWriteableException` - if properties are read-only

### setByteProperty(String, byte)

    public void setByteProperty(java.lang.String name, byte value)

Set a byte property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setByteProperty(java.lang.String, byte) in interface javax.jms.Message

#### Parameters

`name` - the name of the byte property

`value` - the byte property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageNotWriteableException` - if properties are read-only

### setDoubleProperty(String, double)

    public void setDoubleProperty(java.lang.String name, double value)

Set a double property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setDoubleProperty(java.lang.String, double) in interface javax.jms.Message

#### Parameters

`name` - the name of the double property

`value` - the double property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageNotWriteableException` - if properties are read-only

### setFloatProperty(String, float)

    public void setFloatProperty(java.lang.String name, float value)

Set a float property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setFloatProperty(java.lang.String, float) in interface javax.jms.Message

#### Parameters

`name` - the name of the float property

`value` - the float property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageNotWriteableException` - if properties are read-only

### setIntProperty(String, int)

    public void setIntProperty(java.lang.String name, int value)

Set an integer property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setIntProperty(java.lang.String, int) in interface javax.jms.Message

#### Parameters

`name` - the name of the integer property

`value` - the integer property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageNotWriteableException` - if properties are read-only

### setJMSCorrelationID(String)

    public void setJMSCorrelationID(java.lang.String correlationID)

Set the correlation ID for the message. A client can use the JMSCorrelationID header field to link one message with another.

#### Specified By

javax.jms.Message.setJMSCorrelationID(java.lang.String) in interface javax.jms.Message

#### Parameters

`correlationID` - the message ID of a message being referred to.

#### Throws

`JMSException` - if JMS fails to set correlationId due to some internal JMS error.

### setJMSCorrelationIDAsBytes(byte[])

    public void setJMSCorrelationIDAsBytes(byte[] correlationID)

Set the correlation ID as an array of bytes for the message.

#### Specified By

javax.jms.Message.setJMSCorrelationIDAsBytes(byte[]) in interface javax.jms.Message

#### Parameters

`correlationID` - the correlation ID value as an array of bytes.

#### Throws

`JMSException` - if JMS fails to set correlationId due to some internal JMS error.

### setJMSDestination(Destination)

    public void setJMSDestination(javax.jms.Destination destination)

Set the destination for this message. Providers set this field when a message is sent.

#### Specified By

javax.jms.Message.setJMSDestination(javax.jms.Destination) in interface javax.jms.Message

#### Parameters

`destination` - the destination for this message.

#### Throws

`JMSException` - if JMS fails to set JMS Destination due to some internal JMS error.

### setJMSExpiration(long)

    public void setJMSExpiration(long expiration)

Set the message's expiration value Providers set this field when a message is sent.

#### Specified By

javax.jms.Message.setJMSExpiration(long) in interface javax.jms.Message

#### Parameters

`expiration` - the message's expiration time

#### Throws

`JMSException` - if JMS fails to set JMS message expiration due to some internal JMS error.

### setJMSMessageID(String)

    public void setJMSMessageID(java.lang.String id)

Set the message ID. Providers set this field when a message is sent.

#### Specified By

javax.jms.Message.setJMSMessageID(java.lang.String) in interface javax.jms.Message

#### Parameters

`id` - the ID of the message

#### Throws

`JMSException` - if JMS fails to set the message Id due to internal JMS error.

### setJMSPriority(int)

    public void setJMSPriority(int priority)

Set the priority for this message. Providers set this field when a message is sent.

#### Specified By

javax.jms.Message.setJMSPriority(int) in interface javax.jms.Message

#### Parameters

`priority` - the priority of this message

#### Throws

`JMSException` - if JMS fails to set JMS message priority due to some internal JMS error.

### setJMSRedelivered(boolean)

    public void setJMSRedelivered(boolean redelivered)

Set to indicate whether this message is being redelivered. This field is set at the time the message is delivered.

#### Specified By

javax.jms.Message.setJMSRedelivered(boolean) in interface javax.jms.Message

#### Parameters

`redelivered` - an indication of whether this message is being redelivered.

#### Throws

`JMSException` - if JMS fails to set JMS Redelivered flag due to some internal JMS error.

### setJMSReplyTo(Destination)

    public void setJMSReplyTo(javax.jms.Destination replyTo)

Set where a reply to this message should be sent.

#### Specified By

javax.jms.Message.setJMSReplyTo(javax.jms.Destination) in interface javax.jms.Message

#### Parameters

`replyTo` - where to send a response to this message. The destination must be specified as an AQjmsAgent (with consumer_name and queue/topic address)

#### Throws

`JMSException` - if JMS fails to set ReplyTo Destination due to some internal JMS error.

### setJMSTimestamp(long)

    public void setJMSTimestamp(long timestamp)

Set the message timestamp. Providers set this field when a message is sent.

#### Specified By

javax.jms.Message.setJMSTimestamp(long) in interface javax.jms.Message

#### Parameters

`timestamp` - the timestamp for this message

#### Throws

`JMSException` - if JMS fails to set the timestamp due to some internal JMS error.

### setJMSType(String)

    public void setJMSType(java.lang.String type)

Set the message type.

#### Specified By

javax.jms.Message.setJMSType(java.lang.String) in interface javax.jms.Message

#### Parameters

`type` - of the message

#### Throws

`JMSException` - if JMS fails to set JMS message type due to some internal JMS error.

### setLongProperty(String, long)

    public void setLongProperty(java.lang.String name, long value)

Set a long property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setLongProperty(java.lang.String, long) in interface javax.jms.Message

#### Parameters

`name` - the name of the long property

`value` - the long property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageNotWriteableException` - if properties are read-only

### setObjectProperty(String, Object)

    public void setObjectProperty(java.lang.String name,
    java.lang.Object value)

Set a Java object property value with the given name, into the Message. Note that this method only works for the objectified primitive object types (Integer, Double, Long ...) and String's.

#### Specified By

javax.jms.Message.setObjectProperty(java.lang.String, java.lang.Object) in interface javax.jms.Message

#### Parameters

`name` - the name of the Java object property.

`value` - the Java object property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageFormatException` - if object is invalid

`MessageNotWriteableException` - if properties are read-only

### setSenderID(AQjmsAgent)

    public void setSenderID(AQjmsAgent sender)

Set the message's senderID.

#### Throws

`JMSException` - if JMS fails to set SenderID

### setShortProperty(String, short)

    public void setShortProperty(java.lang.String name, short value)

Set a short property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setShortProperty(java.lang.String, short) in interface javax.jms.Message

#### Parameters

`name` - the name of the short property

`value` - the short property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageNotWriteableException` - if properties are read-only

### setStringProperty(String, String)

    public void setStringProperty(java.lang.String name,
    java.lang.String value)

Set a String property value with the given name, into the Message.

#### Specified By

javax.jms.Message.setStringProperty(java.lang.String, java.lang.String) in interface javax.jms.Message

#### Parameters

`name` - the name of the String property

`value` - the String property value to set in the Message.

#### Throws

`JMSException` - if JMS fails to set Property

`MessageNotWriteableException` - if properties are read-only

## AQjmsMessageEOFException

#### Syntax

    public class AQjmsMessageEOFException
       extends javax.jms.MessageEOFException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--javax.jms.JMSException
                        |
                        +--javax.jms.MessageEOFException
                              |
                              +--oracle.jms.AQjmsMessageEOFException

#### All Implemented Interfaces

    java.io.Serializable

#### Description

This exception extends MessageEOFException. It is thrown when an unexpected end of stream has been reached when a StreamMessage or BytesMessage is being read

Inherited Member Summary
Methods inherited from interface javax.jms.JMSException
`getErrorCode, getLinkedException, setLinkedException`
Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## AQjmsMessageFormatException

#### Syntax

    public class AQjmsMessageFormatException
       extends javax.jms.MessageFormatException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--javax.jms.JMSException
                        |
                        +--javax.jms.MessageFormatException
                              |
                              +--oracle.jms.AQjmsMessageFormatException

#### All Implemented Interfaces

    java.io.Serializable

#### Description

This exception extends MessageFormatException. It is thrown when a client attempts to use a datatype not supported by a message or attempts to read data in the message as the wrong type

Inherited Member Summary
Methods inherited from interface javax.jms.JMSException
`getErrorCode, getLinkedException, setLinkedException`
Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## AQjmsMessageNotReadableException

#### Syntax

    public class AQjmsMessageNotReadableException
       extends javax.jms.MessageNotReadableException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--javax.jms.JMSException
                        |
                        +--javax.jms.MessageNotReadableException
                           |
                          +--oracle.jms.AQjmsMessageNotReadableException

#### All Implemented Interfaces

    java.io.Serializable

#### Description

This exception extends MessageNotReadableException. It is thrown when a client attempts to read a write-only message

Inherited Member Summary
Methods inherited from interface javax.jms.JMSException
`getErrorCode, getLinkedException, setLinkedException`
Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## AQjmsMessageNotWriteableException

#### Syntax

    public class AQjmsMessageNotWriteableException
       extends javax.jms.MessageNotWriteableException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--javax.jms.JMSException
                        |
                        +--javax.jms.MessageNotWriteableException
                           |
                         +--oracle.jms.AQjmsMessageNotWriteableException

#### All Implemented Interfaces

    java.io.Serializable

#### Description

This exception extends MessageNotWriteableException. It is thrown when a client attempts to write a read-only message

Inherited Member Summary
Methods inherited from interface javax.jms.JMSException
`getErrorCode, getLinkedException, setLinkedException`
Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## AQjmsObjectMessage

#### Syntax

    public class AQjmsObjectMessage extends AQjmsMessage
       implements javax.jms.ObjectMessage

    java.lang.Object
      |
      +--AQjmsMessage
            |
            +--oracle.jms.AQjmsObjectMessage

#### All Implemented Interfaces

    javax.jms.Message, javax.jms.ObjectMessage

#### Description

This class implements the ObjectMessage interface. An ObjectMessage is used to send a message that contains a serializable java object

Member Summary |
--- | ---
Methods |
``clearBody()``

Clear out the message body.

``clearProperties()``

Clear a message's properties.

``getObject()``

Get the serializable object containing this message's data.

``setObject(Serializable)``

Set the serializable object containing this message's data.

Inherited Member Summary
Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`
Methods inherited from class AQjmsMessage
``getBooleanProperty(String)``

, getByteProperty(String)``, getDoubleProperty(String)``, getFloatProperty(String)``, getIntProperty(String)``, getJMSCorrelationID()``, getJMSCorrelationIDAsBytes()``, getJMSDeliveryMode()``, getJMSDestination()``, getJMSExpiration()``, getJMSMessageID()``, getJMSMessageIDAsBytes()``, getJMSPriority()``, getJMSRedelivered()``, getJMSReplyTo()``, getJMSTimestamp()``, getJMSType()``, getLongProperty(String)``, getObjectProperty(String)``, getPropertyNames()``, getSenderID()``, getShortProperty(String)``, getStringProperty(String)``, propertyExists(String)``, setBooleanProperty(String, boolean)``, setByteProperty(String, byte)``, setDoubleProperty(String, double)``, setFloatProperty(String, float)``, setIntProperty(String, int)``, setJMSCorrelationID(String)``, setJMSCorrelationIDAsBytes(byte[])``, setJMSDestination(Destination)``, setJMSExpiration(long)``, setJMSMessageID(String)``, setJMSPriority(int)``, setJMSRedelivered(boolean)``, setJMSReplyTo(Destination)``, setJMSTimestamp(long)``, setJMSType(String)``, setLongProperty(String, long)``, setObjectProperty(String, Object)``, setSenderID(AQjmsAgent)``, setShortProperty(String, short)``, setStringProperty(String, String)``

Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.jms.Message

`getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty`

### Methods

### clearBody()

    public void clearBody()

Clear out the message body. All other parts of the message are left untouched.

#### Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

#### Overrides

clearBody() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to due to some internal JMS error.

### clearProperties()

    public void clearProperties()

Clear a message's properties.

#### Specified By

javax.jms.Message.clearProperties() in interface javax.jms.Message

#### Overrides

clearProperties() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to clear JMS message properties due to some internal JMS error.

### getObject()

    public java.io.Serializable getObject()

Get the serializable object containing this message's data. The default value is null.

#### Specified By

javax.jms.ObjectMessage.getObject() in interface javax.jms.ObjectMessage

#### Returns

the serializable object containing this message's data

#### Throws

`JMSException` - if JMS fails to get object due to some internal JMS error.

`MessageFormatException` - if object deserialization fails

### setObject(Serializable)

    public void setObject(java.io.Serializable object)

Set the serializable object containing this message's data.

#### Specified By

javax.jms.ObjectMessage.setObject(java.io.Serializable) in interface javax.jms.ObjectMessage

#### Parameters

`object` - the message's data

#### Throws

`JMSException` - if JMS fails to set object due to some internal JMS error.

`MessageFormatException` - if object serialization fails

`MessageNotWriteableException` - if message in read-only mode.

## AQjmsOracleDebug

#### Syntax

    public class AQjmsOracleDebug extends java.lang.Object

    java.lang.Object
      |
      +--oracle.jms.AQjmsOracleDebug

#### Description

AQ Oracle Debug class - Do not use unless instructed by Oracle Support

Member Summary |
--- | ---
Methods |
``getLogStream()``

Get log stream

``setLogStream(OutputStream)``

Set log stream

``setTraceLevel(int)``

Set trace level 0 - no tracing (default) 1 - fatal errors 2 - other errors, imp messages 3 - exception trace, other trace info 4 - method entry/exit 5 - print stack traces, variables

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### getLogStream()

    public static java.io.OutputStream getLogStream()

Get log stream

### setLogStream(OutputStream)

    public static void setLogStream(java.io.OutputStream output_stream)

Set log stream

#### Parameters

`output` - log stream

### setTraceLevel(int)

    public static void setTraceLevel(int level)

Set trace level 0 - no tracing (default) 1 - fatal errors 2 - other errors, imp messages 3 - exception trace, other trace info 4 - method entry/exit 5 - print stack traces, variables

## AQjmsProducer

#### Syntax

    public class AQjmsProducer extends java.lang.Object
       implements AQjmsQueueSender, AQjmsTopicPublisher

    java.lang.Object
      |
      +--oracle.jms.AQjmsProducer

#### All Implemented Interfaces

    AQjmsQueueSender, AQjmsTopicPublisher, javax.jms.MessageProducer,
    javax.jms.QueueSender, javax.jms.TopicPublisher

#### Description

This class implements the MessageProducer interface. A MessageProducer is used to send messages to a Destination

Member Summary |
--- | ---
Methods |
``close()``

Since a provider may allocate some resources on behalf of a MessageProducer outside the JVM, clients should close them when they are not needed.

``getDeliveryMode()``

Get the producer's default delivery mode.

``getDisableMessageID()``

Get an indication of whether message IDs are disabled.

``getDisableMessageTimestamp()``

Get an indication of whether message timestamps are disabled.

``getPriority()``

Get the producer's default priority.

``getQueue()``

Get the queue associated with this queue sender.

``getTimeToLive()``

Get the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.

``getTopic()``

Get the topic associated with this publisher.

``publish(Message)``

Publish a Message to the topic

``publish(Message, AQjmsAgent[])``

Publish a Message to a specific list of recipients

``publish(Message, AQjmsAgent[], int, int, long)``

Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live

``publish(Message, int, int, long)``

Publish a Message to the topic specifying delivery mode, priority and time to live to the topic.

``publish(Topic, Message)``

Publish a Message to a topic for an unidentified message producer.

``publish(Topic, Message, AQjmsAgent[])``

Publish a Message to a topic by specifying a list of recipients

``publish(Topic, Message, AQjmsAgent[], int, int, long)``

Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live

``publish(Topic, Message, int, int, long)``

Publish a Message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live.

``send(Message)``

Send a message

``send(Message, int, int, long)``

Send a message.

``send(Queue, Message)``

Send a message.

``send(Queue, Message, int, int, long)``

Send a message.

``setDeliveryMode(int)``

Set the producer's default delivery mode.

``setDisableMessageID(boolean)``

Set whether message IDs are disabled.

``setDisableMessageTimestamp(boolean)``

Set whether message timestamps are disabled.

``setPriority(int)``

Set the producer's default priority.

``setTimeToLive(int)``

Set the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### close()

    public void close()

Since a provider may allocate some resources on behalf of a MessageProducer outside the JVM, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

#### Specified By

javax.jms.MessageProducer.close() in interface javax.jms.MessageProducer

#### Throws

`JMSException` - if JMS fails to close the producer due to some error.

### getDeliveryMode()

    public synchronized int getDeliveryMode()

Get the producer's default delivery mode.

#### Specified By

javax.jms.MessageProducer.getDeliveryMode() in interface javax.jms.MessageProducer

#### Returns

the message delivery mode for this message producer.

#### Throws

`JMSException` - if JMS fails to get delivery mode due to some internal error.

### getDisableMessageID()

    public synchronized boolean getDisableMessageID()

Get an indication of whether message IDs are disabled.

#### Specified By

javax.jms.MessageProducer.getDisableMessageID() in interface javax.jms.MessageProducer

#### Returns

an indication of whether message IDs are disabled.

#### Throws

`JMSException` - if JMS fails to get disabled message Id due to some internal error.

### getDisableMessageTimestamp()

    public synchronized boolean getDisableMessageTimestamp()

Get an indication of whether message timestamps are disabled.

#### Specified By

javax.jms.MessageProducer.getDisableMessageTimestamp() in interface javax.jms.MessageProducer

#### Returns

an indication of whether message IDs are disabled.

#### Throws

`JMSException` - if JMS fails to get disabled message timestamp due to some internal error.

### getPriority()

    public synchronized int getPriority()

Get the producer's default priority.

#### Specified By

javax.jms.MessageProducer.getPriority() in interface javax.jms.MessageProducer

#### Returns

the message priority for this message producer.

#### Throws

`JMSException` - if JMS fails to get priority due to some internal error.

### getQueue()

    public synchronized javax.jms.Queue getQueue()

Get the queue associated with this queue sender.

#### Specified By

javax.jms.QueueSender.getQueue() in interface javax.jms.QueueSender

#### Returns

the queue

#### Throws

`JMSException` - if JMS fails to get queue for this queue sender due to some internal error.

### getTimeToLive()

    public synchronized int getTimeToLive()

Get the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.

#### Specified By

javax.jms.MessageProducer.getTimeToLive() in interface javax.jms.MessageProducer

#### Returns

the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to get Time to Live due to some internal error.

### getTopic()

    public synchronized javax.jms.Topic getTopic()

Get the topic associated with this publisher.

#### Specified By

javax.jms.TopicPublisher.getTopic() in interface javax.jms.TopicPublisher

#### Returns

this publisher's topic

#### Throws

`JMSException` - if JMS fails to get topic for this topic publisher due to some internal error.

### publish(Message)

    public synchronized void publish(javax.jms.Message message)

Publish a Message to the topic

#### Specified By

javax.jms.TopicPublisher.publish(javax.jms.Message) in interface javax.jms.TopicPublisher

#### Parameters

`message` - The message to be published

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Message, AQjmsAgent[])

    public synchronized void publish(javax.jms.Message message,
    AQjmsAgent recipient_list)

Publish a Message to a specific list of recipients

#### Specified By

publish(Message, AQjmsAgent[]) in interface AQjmsTopicPublisher

#### Parameters

`message` - The message to be published

`recipient_list` - The list of recipients to which the message is published. The recipients are of type AQjmsAgent.

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Message, AQjmsAgent[], int, int, long)

    public synchronized void publish(javax.jms.Message message,
    AQjmsAgent recipient_list, int deliveryMode, int priority, long
    timeToLive)

Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live

#### Specified By

publish(Message, AQjmsAgent[], int, int, long) in interface AQjmsTopicPublisher

#### Parameters

`message` - The message to be published

`recipient_list` - The list of recipients to which the message is published. The recipients are of type AQjmsAgent.

`deliveryMode` - The delivery mode - persistent or non_persistent

`priority` - The priority of the message

`timeToLive` - the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Message, int, int, long)

    public synchronized void publish(javax.jms.Message message, int
    deliveryMode, int priority, long timeToLive)

Publish a Message to the topic specifying delivery mode, priority and time to live to the topic.

#### Specified By

javax.jms.TopicPublisher.publish(javax.jms.Message, int, int, long) in interface javax.jms.TopicPublisher

#### Parameters

`message` - The message to be published

`deliveryMode` - The message delivery mode - persistent or non_persistent

`priority` - The priority of the message

`timeToLive` - the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Topic, Message)

    public synchronized void publish(javax.jms.Topic topic,
    javax.jms.Message message)

Publish a Message to a topic for an unidentified message producer. Use the producer's default delivery mode, timeToLive and priority.

#### Specified By

javax.jms.TopicPublisher.publish(javax.jms.Topic, javax.jms.Message) in interface javax.jms.TopicPublisher

#### Parameters

`topic` - The topic to which to publish the message. This overrides the default topic of the Message Producer

`message` - The message to be published

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Topic, Message, AQjmsAgent[])

    public synchronized void publish(javax.jms.Topic topic,
    javax.jms.Message message, AQjmsAgent recipient_list)

Publish a Message to a topic by specifying a list of recipients

#### Specified By

publish(Topic, Message, AQjmsAgent[]) in interface AQjmsTopicPublisher

#### Parameters

`topic` - The topic to which to publish the message. This overrides the default topic of the Message Producer

`message` - The message to be published

`recipient_list` - The list of recipients to which the message is published. The recipients are of type AQjmsAgent.

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Topic, Message, AQjmsAgent[], int, int, long)

    public synchronized void publish(javax.jms.Topic topic,
    javax.jms.Message message, AQjmsAgent recipient_list, int
    deliveryMode, int priority, long timeToLive)

Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live

#### Specified By

publish(Topic, Message, AQjmsAgent[], int, int, long) in interface AQjmsTopicPublisher

#### Parameters

`topic` - The topic to which to publish the message. This overrides the default topic of the Message Producer

`message` - The message to be published

`recipient_list` - The list of recipients to which the message is published. The recipients are of type AQjmsAgent.

`deliveryMode` - The delivery mode - persistent or non_persistent

`priority` - The priority of the message

`timeToLive` - the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Topic, Message, int, int, long)

    public synchronized void publish(javax.jms.Topic topic,
    javax.jms.Message message, int deliveryMode, int priority, long
    timeToLive)

Publish a Message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live.

#### Specified By

javax.jms.TopicPublisher.publish(javax.jms.Topic, javax.jms.Message, int, int, long) in interface javax.jms.TopicPublisher

#### Parameters

`topic` - The topic to which to publish the message. This overrides the default topic of the Message Producer

`message` - The message to be published

`deliveryMode` - The message delivery mode - persistent or non_persistent

`priority` - The priority of the message

`timeToLive` - the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### send(Message)

    public synchronized void send(javax.jms.Message message)

Send a message

#### Specified By

javax.jms.QueueSender.send(javax.jms.Message) in interface javax.jms.QueueSender

#### Parameters

`message` - The message that has to be sent

#### Throws

`JMSException` - if JMS fails to send the message due to some internal error.

### send(Message, int, int, long)

    public synchronized void send(javax.jms.Message message, int
    deliveryMode, int priority, long timeToLive)

Send a message.

#### Specified By

javax.jms.QueueSender.send(javax.jms.Message, int, int, long) in interface javax.jms.QueueSender

#### Parameters

`message` - The message that has to be sent

`deliverMode` - The message delivery mode - persistent or non_persistent

#### Throws

`JMSException` - if JMS fails to send the message due to some internal error.

### send(Queue, Message)

    public synchronized void send(javax.jms.Queue queue,
    javax.jms.Message message)

Send a message.

#### Specified By

javax.jms.QueueSender.send(javax.jms.Queue, javax.jms.Message) in interface javax.jms.QueueSender

#### Parameters

`queue` - The destination queue where the message has to be sent. This overrides the default queue of the Message Producer.

`message` - The message that has to be sent

#### Throws

`JMSException` - if JMS fails to send the message due to some internal error.

### send(Queue, Message, int, int, long)

    public synchronized void send(javax.jms.Queue queue,
    javax.jms.Message message, int deliveryMode, int priority, long
    timeToLive)

Send a message.

#### Specified By

javax.jms.QueueSender.send(javax.jms.Queue, javax.jms.Message, int, int, long) in interface javax.jms.QueueSender

#### Parameters

`queue` - The destination queue where the message has to be sent. This overrides the default queue of the Message Producer.

`message` - The message that has to be sent

`deliveryMode` - The message delivery mode - persistent or non_persistent

`priority` - The priority of the message

`timeToLive` - the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to send the message due to some internal error.

### setDeliveryMode(int)

    public synchronized void setDeliveryMode(int deliveryMode)

Set the producer's default delivery mode.

Delivery mode is set to PERSISTENT by default.

#### Specified By

javax.jms.MessageProducer.setDeliveryMode(int) in interface javax.jms.MessageProducer

#### Parameters

`deliveryMode` - the message delivery mode for this message producer.

#### Throws

`JMSException` - if JMS fails to set delivery mode due to some internal error.

### setDisableMessageID(boolean)

    public synchronized void setDisableMessageID(boolean value)

Set whether message IDs are disabled.

Since message ID's take some effort to create and increase a message's size, some JMS providers may be able to optimize message overhead if they are given a hint that message ID is not used by an application. JMS message Producers provide a hint to disable message ID. When a client sets a Producer to disable message ID they are saying that they do not depend on the value of message ID for the messages it produces. These messages must either have message ID set to null or, if the hint is ignored, messageID must be set to its normal unique value.

Message IDs are enabled by default.

#### Specified By

javax.jms.MessageProducer.setDisableMessageID(boolean) in interface javax.jms.MessageProducer

#### Parameters

`value` - indicates if message IDs are disabled.

#### Throws

`JMSException` - if JMS fails to set disabled message Id due to some internal error.

### setDisableMessageTimestamp(boolean)

    public synchronized void setDisableMessageTimestamp(boolean value)

Set whether message timestamps are disabled.

#### Specified By

javax.jms.MessageProducer.setDisableMessageTimestamp(boolean) in interface javax.jms.MessageProducer

#### Parameters

`value` - indicates if message timestamps are disabled.

#### Throws

`JMSException` - if JMS fails to set disabled message timestamp due to some internal error.

### setPriority(int)

    public synchronized void setPriority(int priority)

Set the producer's default priority.

Priority is set to 4, by default.

#### Specified By

javax.jms.MessageProducer.setPriority(int) in interface javax.jms.MessageProducer

#### Parameters

`priority` - the message priority for this message producer.

#### Throws

`JMSException` - if JMS fails to set priority due to some internal error.

### setTimeToLive(int)

    public synchronized void setTimeToLive(int timeToLive)

Set the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.

Time to live is set to zero by default.

#### Specified By

javax.jms.MessageProducer.setTimeToLive(int) in interface javax.jms.MessageProducer

#### Parameters

`timeToLive` - the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to set Time to Live due to some internal error.

## AQjmsQueueBrowser

#### Syntax

    public class AQjmsQueueBrowser extends java.lang.Object
       implements javax.jms.QueueBrowser, java.util.Enumeration

    java.lang.Object
      |
      +--oracle.jms.AQjmsQueueBrowser

#### All Implemented Interfaces

    java.util.Enumeration, javax.jms.QueueBrowser

#### Description

This class implements the QueueBrowser interface. A QueueBrowser is used to look at messages in a Queue without removing them

Member Summary |
--- | ---
Methods |
``close()``

Since a provider may allocate some resources on behalf of a QueueBrowser outside the JVM, clients should close them when they are not needed.

``getEnumeration()``

Get an enumeration for browsing the current queue messages in the order they would be received.

``getMessageSelector()``

Get this queue browser's message selector expression.

``getQueue()``

Get the queue associated with this queue browser.

``hasMoreElements()``

Tests if this enumeration contains more elements.

``nextElement()``

Returns the next element of this enumeration.

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### close()

    public void close()

Since a provider may allocate some resources on behalf of a QueueBrowser outside the JVM, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

#### Specified By

javax.jms.QueueBrowser.close() in interface javax.jms.QueueBrowser

### getEnumeration()

    public java.util.Enumeration getEnumeration()

Get an enumeration for browsing the current queue messages in the order they would be received.

#### Specified By

javax.jms.QueueBrowser.getEnumeration() in interface javax.jms.QueueBrowser

#### Returns

an enumeration for browsing the messages

#### Throws

`JMSException` - if JMS fails to get the enumeration for this browser due to some JMS error.

### getMessageSelector()

    public java.lang.String getMessageSelector()

Get this queue browser's message selector expression.

#### Specified By

javax.jms.QueueBrowser.getMessageSelector() in interface javax.jms.QueueBrowser

#### Returns

this queue browser's message selector

#### Throws

`JMSException` - if JMS fails to get message selector due to some JMS error

### getQueue()

    public javax.jms.Queue getQueue()

Get the queue associated with this queue browser.

#### Specified By

javax.jms.QueueBrowser.getQueue() in interface javax.jms.QueueBrowser

#### Returns

the queue

#### Throws

`JMSException` - if JMS fails to get the queue associated with this Browser due to some JMS error.

### hasMoreElements()

    public boolean hasMoreElements()

Tests if this enumeration contains more elements.

#### Specified By

java.util.Enumeration.hasMoreElements() in interface java.util.Enumeration

#### Returns

true if more elements exist in the enumeration false otherwise.

### nextElement()

    public java.lang.Object nextElement()

Returns the next element of this enumeration.

#### Specified By

java.util.Enumeration.nextElement() in interface java.util.Enumeration

#### Returns

the next element of this enumeration

#### Throws

`NoSuchElementException` - if no more elements exist.

## AQjmsQueueConnectionFactory

#### Syntax

    public class AQjmsQueueConnectionFactory extends java.lang.Object
       implements javax.jms.QueueConnectionFactory

    java.lang.Object
      |
      +--oracle.jms.AQjmsQueueConnectionFactory

#### All Implemented Interfaces

    javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory

#### Description

This class implements the QueueConnectionFactory interface. A QueueConnectionFactory is used to create QueueConnections

Member Summary |
--- | ---
Methods |
``createQueueConnection()``

create a Queue Connection to the JMS Server hosting this Queue- ConnectionFactory.

``createQueueConnection(Connection)``

create a Queue Connection using the already open JDBC connection.

``createQueueConnection(String, String)``

create a Queue Connection using the given username and password for authentication during creation of the Connection.

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### createQueueConnection()

    public javax.jms.QueueConnection createQueueConnection()

create a Queue Connection to the JMS Server hosting this Queue- ConnectionFactory.

#### Specified By

javax.jms.QueueConnectionFactory.createQueueConnection() in interface javax.jms.QueueConnectionFactory

#### Returns

a Queue Connection

#### Throws

`JMSException` - if JMS fails to get a queue connection due to some JMS error

### createQueueConnection(Connection)

    public static javax.jms.QueueConnection
    createQueueConnection(java.sql.Connection jdbc_connection)

create a Queue Connection using the already open JDBC connection. This creation does NOT result in creation of another connection to the database. Instead JMS binds to the given connection to the database and provides an interface to the Queuing mechanism defined by JMS.

#### Parameters

`jdbc_connection` - a valid open connection to the database.

#### Returns

a Queue Connection

#### Throws

`JMSException` - if JMS fails to get a queue connection due to some JMS error

### createQueueConnection(String, String)

    public javax.jms.QueueConnection
    createQueueConnection(java.lang.String username, java.lang.String
    password)

create a Queue Connection using the given username and password for authentication during creation of the Connection.

#### Specified By

javax.jms.QueueConnectionFactory.createQueueConnection(java.lang.String, java.lang.String) in interface javax.jms.QueueConnectionFactory

#### Parameters

`username` - name of the user connecting to the DB for Queueing. password password for the creating the connection to server.

#### Returns

a Queue Connection

#### Throws

`JMSException` - if JMS fails to get a queue connection due to some JMS error

## AQjmsQueueReceiver

#### Syntax

    public interface AQjmsQueueReceiver extends javax.jms.QueueReceiver

#### All Superinterfaces

    javax.jms.MessageConsumer, javax.jms.QueueReceiver

#### All Known Implementing Classes

    AQjmsConsumer

#### Description

This interface extends javax.jms.QueueReceiver and defines AQ extensions to JMS. A client uses a QueueReceiver for receiving messages that have been delivered to a Queue

Member Summary |
--- | ---
Methods |
``getNavigationMode()``

get the navigation mode used for receiving messages

``receiveNoData()``

Consume the message without returning it to the user.

``receiveNoData(long)``

Consume the message without returning it to the user.

``setNavigationMode(int)``

set the navigation mode used for receiving messages

Inherited Member Summary
Methods inherited from interface javax.jms.QueueReceiver
`getQueue`
Methods inherited from interface javax.jms.MessageConsumer
`close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener`

### Methods

### getNavigationMode()

    public int getNavigationMode()

get the navigation mode used for receiving messages

#### Returns

the navigation mode

#### Throws

`JMSException` - if there was an error in getting the navigation mode

### receiveNoData()

    public void receiveNoData()

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser.

#### Throws

`JMSException` - if the message could not be received due to an error

### receiveNoData(long)

    public void receiveNoData(long timeout)

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser. This call will block until a message arrives or the timeout expires

#### Parameters

`timeout` - the timeout value in milliseconds

#### Throws

`JMSException` - if the message could not be received due to an error

### setNavigationMode(int)

    public void setNavigationMode(int mode)

set the navigation mode used for receiving messages

#### Parameters

`mode` - the new value of the navigation mode

#### Throws

`JMSException` - if there was an error in getting the navigation mode

## AQjmsQueueSender

#### Syntax

    public interface AQjmsQueueSender extends javax.jms.QueueSender

#### All Superinterfaces

    javax.jms.MessageProducer, javax.jms.QueueSender

#### All Known Implementing Classes

    AQjmsProducer

#### Description

This interface extends QueueSender and defines AQ extensions to JMS. A client uses a QueueSender to send messages to a Queue

Inherited Member Summary
Methods inherited from interface javax.jms.QueueSender
`getQueue, send, send, send, send`
Methods inherited from interface javax.jms.MessageProducer
`close, getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive`

## AQjmsSession

#### Syntax

    public class AQjmsSession extends java.lang.Object
       implements javax.jms.QueueSession, javax.jms.TopicSession

    java.lang.Object
      |
      +--oracle.jms.AQjmsSession

#### All Implemented Interfaces

    javax.jms.QueueSession, java.lang.Runnable, javax.jms.Session,
    javax.jms.TopicSession

#### Description

This class implements the javax.jms.Session interface. A JMS Session is a single threaded context for producing and consuming messages.

Member Summary |
--- | ---
Methods |
``close()``

Close a JMS session Since a provider may allocate some resources on behalf of a Session outside the JVM, clients should close them when they are not needed.

``commit()``

Commit all messages done in this transaction and releases any locks currently held.

``createAdtMessage()``

Create an AdtMessage.

``createAdtMessage(CustomDatum)``

Create an initialized AdtMessage.

``createBrowser(Queue)``

Create a QueueBrowser to peek at the messages on the specified queue.

``createBrowser(Queue, CustomDatumFactory)``

Create a QueueBrowser to peek at the messages on the specified queue containing ADT messages.

``createBrowser(Queue, String)``

Create a QueueBrowser to peek at the messages on the specified queue.

``createBrowser(Queue, String, boolean)``

Create a QueueBrowser to peek at the messages on the specified queue.

``createBrowser(Queue, String, CustomDatumFactory)``

Create a QueueBrowser to peek at the messages on the specified queue containing ADT messages.

``createBrowser(Queue, String, CustomDatumFactory, boolean)``

Create a QueueBrowser to peek at the messages on the specified queue containing ADT messages.

``createBytesMessage()``

Create a BytesMessage.

``createDurableSubscriber(Topic, String)``

Create a durable Subscriber to the specified topic.

``createDurableSubscriber(Topic, String, CustomDatumFactory)``

Create a durable Subscriber to the specified topic.

``createDurableSubscriber(Topic, String, String, boolean)``

Create a durable Subscriber to the specified topic.

``createDurableSubscriber(Topic, String, String, boolean, CustomDatumFactory)``

Create a durable Subscriber to the specified topic.

``createMapMessage()``

Create a MapMessage.

``createObjectMessage()``

Create an ObjectMessage.

``createObjectMessage(Serializable)``

Create an initialized ObjectMessage.

``createPublisher(Topic)``

Create a Publisher for the specified topic.

``createQueue(AQQueueTable, String, AQjmsDestinationProperty)``

Create a queue.

``createQueueTable(String, String, AQQueueTableProperty)``

Create a Queue Table.

``createReceiver(Queue)``

Create a QueueReceiver to receive messages from the specified queue.

``createReceiver(Queue, CustomDatumFactory)``

Create a QueueReceiver to receive messages from the specified queue containing ADT messages.

``createReceiver(Queue, String)``

Create a QueueReceiver to receive messages from the specified queue.

``createReceiver(Queue, String, CustomDatumFactory)``

Create a QueueReceiver to receive messages from the specified queue containing ADT messages.

``createRemoteSubscriber(Topic, AQjmsAgent, String)``

Create a remote subscriber for a topic.

``createRemoteSubscriber(Topic, AQjmsAgent, String, CustomDatumFactory)``

Create a remote subscriber for a topic.

``createSender(Queue)``

Create a QueueSender to send messages to the specified queue.

``createStreamMessage()``

Create a StreamMessage.

``createSubscriber(Topic)``

Create a non-durable Subscriber to the specified topic.

``createSubscriber(Topic, String, boolean)``

Create a non-durable Subscriber to the specified topic.

``createTextMessage()``

Create a TextMessage.

``createTextMessage(StringBuffer)``

Create an initialized TextMessage.

``createTopic(AQQueueTable, String, AQjmsDestinationProperty)``

Create a topic

``createTopicReceiver(Topic, String, String)``

Create a TopicReceiver to receive messages from the specified topic.

``createTopicReceiver(Topic, String, String, CustomDatumFactory)``

``getDBConnection()``

``getJmsConnection()``

``getMessageListener()``

Return the session's distinguished message listener.

``getQueue(String, String)``

Get an existing queue.

``getQueueTable(String, String)``

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 privileges on queues/topics in the queue table.

``getTopic(String, String)``

Get an existing topic.

``getTransacted()``

Checks if the session in transacted mode?

``grantSystemPrivilege(String, String, boolean)``

Grant AQ system privileges to users/roles.

``revokeSystemPrivilege(String, String)``

Revoke AQ system privilege from user/roles

``rollback()``

Rollback any messages done in this transaction and releases any locks currently held.

``run()``

``setMessageListener(MessageListener)``

Set the session's distinguished message listener.

``unsubscribe(Topic, AQjmsAgent)``

Unsubscribe a remote durable subscription that has been created by a client on the specified topic

``unsubscribe(Topic, String)``

Unsubscribe a durable subscription that has been created by a client on the specified topic

Inherited Member Summary
Fields inherited from interface javax.jms.Session
`AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE`
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### close()

    public void close()

Close a JMS session Since a provider may allocate some resources on behalf of a Session outside the JVM, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough. This call may take a couple of minutes if there are receivers blocked on a receive call with infinite timeout

#### Specified By

javax.jms.Session.close() in interface javax.jms.Session

#### Specified By

javax.jms.Session.close() in interface javax.jms.Session

#### Throws

`JMSException` - if JMS implementation fails to close a Session due to some internal error.

### commit()

    public synchronized void commit()

Commit all messages done in this transaction and releases any locks currently held.

#### Specified By

javax.jms.Session.commit() in interface javax.jms.Session

#### Throws

`JMSException` - if JMS implementation fails to commit the transaction due to some internal error. The linked SQL exception has more info about the error

### createAdtMessage()

    public synchronized AdtMessage createAdtMessage()

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(CustomDatum)

    public synchronized AQjmsAdtMessage
    createAdtMessage(oracle.sql.CustomDatum payload)

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 OracleCustomDatum interface.

#### Parameters

`payload` - the object to use to initialize this message.

#### Throws

`JMSException` - if some error occurs during message creation

### createBrowser(Queue)

    public synchronized javax.jms.QueueBrowser
    createBrowser(javax.jms.Queue queue)

Create a QueueBrowser to peek at the messages on the specified queue. This method can be used to create browsers for queues that contain payloads of type AQ$_JMS_TEXT_MESSAGE, AQ$_JMS_STREAM_MESSAGE, AQ$_JMS_BYTES_MESSAGE, AQ$_JMS_MAP_MESSAGE or AQ$_JMS_OBJECT_MESSAGE

#### Specified By

javax.jms.QueueSession.createBrowser(javax.jms.Queue) in interface javax.jms.QueueSession

#### Parameters

`queue` - the queue to access

#### Throws

`JMSException` - if a session fails to create a browser due to some JMS error.

`InvalidDestinationException` - if invalid Queue specified.

### createBrowser(Queue, CustomDatumFactory)

    public synchronized javax.jms.QueueBrowser
    createBrowser(javax.jms.Queue queue, oracle.sql.CustomDatumFactory
    payload_factory)

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 contain Oracle ADT payloads (instead of the standard JMS defined payloads)

#### Parameters

`queue` - the queue to access

`payload_factory` - CustomDatumFactory for the java class that maps to the Oracle ADT

#### Throws

`JMSException` - if a session fails to create a browser due to some JMS error.

`InvalidDestinationException` - if invalid Queue specified.

### createBrowser(Queue, String)

    public synchronized javax.jms.QueueBrowser
    createBrowser(javax.jms.Queue queue, java.lang.String
    messageSelector)

Create a QueueBrowser to peek at the messages on the specified queue. This method can be used to create browsers for queues that contain payloads of type AQ$_JMS_TEXT_MESSAGE, AQ$_JMS_STREAM_MESSAGE, AQ$_JMS_BYTES_MESSAGE, AQ$_JMS_MAP_MESSAGE or AQ$_JMS_OBJECT_MESSAGE

#### Specified By

javax.jms.QueueSession.createBrowser(javax.jms.Queue, java.lang.String) in interface javax.jms.QueueSession

#### Parameters

`queue` - the queue to access

`messageSelector` - only messages with properties matching the message selector expression are delivered The selector for the QueueBrowser can be one of the following:

a. JMSMessageID = 'ID:2345234523452345' to retrieve 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 browser due to some JMS error.

`InvalidDestinationException` - if invalid Queue specified.

`InvalidSelectorException` - if the message selector is invalid.

### createBrowser(Queue, String, boolean)

    public synchronized 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. This method can be used to create browsers for queues that contain payloads of type AQ$_JMS_TEXT_MESSAGE, AQ$_JMS_STREAM_MESSAGE, AQ$_JMS_BYTES_MESSAGE, AQ$_JMS_MAP_MESSAGE or AQ$_JMS_OBJECT_MESSAGE

#### 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) The selector for the QueueBrowser can be one of the following:

a. JMSMessageID = 'ID:2345234523452345' to retrieve 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 browser due to some JMS error.

`InvalidDestinationException` - if invalid Queue specified.

`InvalidSelectorException` - if the message selector is invalid.

### createBrowser(Queue, String, CustomDatumFactory)

    public synchronized javax.jms.QueueBrowser
    createBrowser(javax.jms.Queue queue, java.lang.String
    messageSelector, oracle.sql.CustomDatumFactory payload_factory)

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 for the java class that maps to the Oracle ADT The selector for the QueueBrowser can be one of the following:

a. JMSMessageID = 'ID:2345234523452345' to retrieve 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 browser due to some JMS error.

`InvalidDestinationException` - if invalid Queue specified.

### createBrowser(Queue, String, CustomDatumFactory, boolean)

    public synchronized javax.jms.QueueBrowser
    createBrowser(javax.jms.Queue queue, java.lang.String
    messageSelector, oracle.sql.CustomDatumFactory payload_factory,
    boolean locked)

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 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) The selector for the QueueBrowser can be one of the following:

a. JMSMessageID = 'ID:2345234523452345' to retrieve 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 browser due to some JMS error.

`InvalidDestinationException` - if invalid Queue specified.

### createBytesMessage()

    public synchronized javax.jms.BytesMessage createBytesMessage()

Create a BytesMessage. A BytesMessage is used to send a message containing a stream of uninterpreted bytes.

#### Specified By

javax.jms.Session.createBytesMessage() in interface javax.jms.Session

#### Throws

`JMSException` - if some error occurs during message creation

### createDurableSubscriber(Topic, String)

    public synchronized javax.jms.TopicSubscriber
    createDurableSubscriber(javax.jms.Topic topic, java.lang.String
    subs_name)

Create a durable Subscriber to the specified topic. This method can be used to create subscribers for queues that contain payloads of type AQ$_JMS_TEXT_MESSAGE, AQ$_JMS_STREAM_MESSAGE, AQ$_JMS_BYTES_MESSAGE, AQ$_JMS_MAP_MESSAGE or AQ$_JMS_OBJECT_MESSAGE A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name and message selector.

#### Specified By

javax.jms.TopicSession.createDurableSubscriber(javax.jms.Topic, java.lang.String) in interface javax.jms.TopicSession

#### Parameters

`topic` - the topic to subscribe to

`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(Topic, String, CustomDatumFactory)

    public synchronized javax.jms.TopicSubscriber
    createDurableSubscriber(javax.jms.Topic topic, java.lang.String
    subs_name, oracle.sql.CustomDatumFactory payload_factory)

Create a durable Subscriber to the specified topic. This method is used to create browsers for queues 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

`name` - the name used to identify this subscription.

`payload_factory` - CustomDatumFactory for the java class that maps to the Oracle ADT

#### Throws

`JMSException` - if a session fails to create a subscriber due to some JMS error.

`InvalidDestinationException` - if invalid Topic specified.

### createDurableSubscriber(Topic, String, String, boolean)

    public synchronized 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. This method can be used to create subscribers for queues that contain payloads of type AQ$_JMS_TEXT_MESSAGE, AQ$_JMS_STREAM_MESSAGE, AQ$_JMS_BYTES_MESSAGE, AQ$_JMS_MAP_MESSAGE or AQ$_JMS_OBJECT_MESSAGE A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name and message selector.

#### Specified By

javax.jms.TopicSession.createDurableSubscriber(javax.jms.Topic, java.lang.String, java.lang.String, boolean) in interface javax.jms.TopicSession

#### Parameters

`topic` - the topic to subscribe to

`name` - the name used to identify this subscription.

`messageSelector` - only messages with properties matching the message selector expression are delivered. This value may be null.

`noLocal` - - must be set to false. nolocal=true not supported. The selector can contain any SQL92 expression which has a combination of one or more of the following:

a. JMS Message header fields or properties: JMSPriority (int), JMSCorrelationID (string), JMSType (string), JMSXUserID (string), JMSXAppID (string), JMSXGroupID (string) JMSXGroupSeq (int) eg: - JMSPriority < 3 AND JMSCorrelationID = 'Fiction'

b. User defined message properties eg: - color IN ('RED', BLUE', 'GREEN') AND price < 30000 Operators allowed are:

-- logical operators in precedence order NOT, AND, OR

-- comparison operators =, >, >=, <, <=, <>, ! (both <> and ! can be used for not equal)

-- arithmetic operators in precedence order +,- unary, *,/, +,-

-- identifier [NOT] IN (string-literal1, string-literal2, ..)

-- arithmetic-expr1 [NOT] BETWEEN arithmetic-expr2 and arithmetic-expr3

-- identifier [NOT] LIKE pattern-value [ESCAPE escape-character] pattern-value is a string literal where % refers to any sequence of characters and and _ refers to any single character. The optional escape-character is used to escape the special meaning of the '-' and '%' in pattern-value

-- identifier IS [NOT] NULL

#### Throws

`JMSException` - if a session fails to create a subscriber due to some JMS error.

`InvalidDestinationException` - if invalid Topic specified.

`InvalidSelectorException` - if the message selector is invalid.

### createDurableSubscriber(Topic, String, String, boolean, CustomDatumFactory)

    public synchronized javax.jms.TopicSubscriber
    createDurableSubscriber(javax.jms.Topic topic, java.lang.String
    subs_name, java.lang.String messageSelector, boolean noLocal,
    oracle.sql.CustomDatumFactory payload_factory)

Create a durable Subscriber to the specified topic. This method is used to create browsers for queues 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

`name` - the name used to identify this subscription.

`messageSelector` - only messages with attributes matching the message selector expression are delivered. This value may be null.

`noLocal` - - must be set to false. nolocal=true not supported

`payload_factory` - CustomDatumFactory for the java class that maps to the Oracle 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.

### createMapMessage()

    public synchronized javax.jms.MapMessage createMapMessage()

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

javax.jms.Session.createMapMessage() in interface javax.jms.Session

#### Throws

`JMSException` - if some error occurs during message creation

### createObjectMessage()

    public synchronized javax.jms.ObjectMessage createObjectMessage()

Create an ObjectMessage. An ObjectMessage is used to send a message that containing a serializable Java object.

#### Specified By

javax.jms.Session.createObjectMessage() in interface javax.jms.Session

#### Throws

`JMSException` - if some error occurs during message creation

### createObjectMessage(Serializable)

    public synchronized javax.jms.ObjectMessage
    createObjectMessage(java.io.Serializable object)

Create an initialized ObjectMessage. An ObjectMessage is used to send a message that containing a serializable Java object.

#### Specified By

javax.jms.Session.createObjectMessage(java.io.Serializable) in interface javax.jms.Session

#### Parameters

`object` - the object to use to initialize this message.

#### Throws

`JMSException` - if some error occurs during message creation

### createPublisher(Topic)

    public synchronized javax.jms.TopicPublisher
    createPublisher(javax.jms.Topic topic)

Create a Publisher for the specified topic. A client uses a TopicPublisher for publishing messages on a topic.

#### Specified By

javax.jms.TopicSession.createPublisher(javax.jms.Topic) in interface javax.jms.TopicSession

#### Parameters

`topic` - the topic to publish to, or null if this is an unidentified producer.

#### Throws

`JMSException` - if a session fails to create a publisher due to some JMS error.

`InvalidDestinationException` - if invalid Topic specified.

### createQueue(AQQueueTable, String, AQjmsDestinationProperty)

    public synchronized javax.jms.Queue
    createQueue(oracle.jms.AQQueueTable q_table, java.lang.String queue_
    name, AQjmsDestinationProperty dest_property)

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

### createQueueTable(String, String, AQQueueTableProperty)

    public synchronized oracle.jms.AQQueueTable
    createQueueTable(java.lang.String owner, java.lang.String name,
    oracle.jms.AQQueueTableProperty property)

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

`oracle.AQ.AQQueueTableProperty`

### createReceiver(Queue)

    public synchronized javax.jms.QueueReceiver
    createReceiver(javax.jms.Queue queue)

Create a QueueReceiver to receive messages from the specified queue. This method can be used to create receivers for queues that contain payloads of type AQ$_JMS_TEXT_MESSAGE, AQ$_JMS_STREAM_MESSAGE, AQ$_JMS_BYTES_MESSAGE, AQ$_JMS_MAP_MESSAGE or AQ$_JMS_OBJECT_MESSAGE

#### Specified By

javax.jms.QueueSession.createReceiver(javax.jms.Queue) in interface javax.jms.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(Queue, CustomDatumFactory)

    public synchronized javax.jms.QueueReceiver
    createReceiver(javax.jms.Queue queue, oracle.sql.CustomDatumFactory
    payload_factory)

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

`payload_factory` - CustomDatumFactory 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(Queue, String)

    public synchronized javax.jms.QueueReceiver
    createReceiver(javax.jms.Queue queue, java.lang.String
    messageSelector)

Create a QueueReceiver to receive messages from the specified queue. This method can be used to create receivers for queues that contain payloads of type AQ$_JMS_TEXT_MESSAGE, AQ$_JMS_STREAM_MESSAGE, AQ$_JMS_BYTES_MESSAGE, AQ$_JMS_MAP_MESSAGE or AQ$_JMS_OBJECT_MESSAGE

#### Specified By

javax.jms.QueueSession.createReceiver(javax.jms.Queue, java.lang.String) in interface javax.jms.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 retrieve 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(Queue, String, CustomDatumFactory)

    public synchronized javax.jms.QueueReceiver
    createReceiver(javax.jms.Queue queue, java.lang.String
    messageSelector, oracle.sql.CustomDatumFactory payload_factory)

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 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 retrieve 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.

### createRemoteSubscriber(Topic, AQjmsAgent, String)

    public synchronized void createRemoteSubscriber(javax.jms.Topic
    topic, AQjmsAgent remote_subscriber, java.lang.String
    messageSelector)

Create a remote subscriber for a topic. This method can be used to remote subscribers for queues that contain payloads of type AQ$_JMS_TEXT_MESSAGE, AQ$_JMS_STREAM_MESSAGE, AQ$_JMS_BYTES_MESSAGE, AQ$_JMS_MAP_MESSAGE or AQ$_JMS_OBJECT_MESSAGE.

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.

### createRemoteSubscriber(Topic, AQjmsAgent, String, CustomDatumFactory)

    public synchronized void createRemoteSubscriber(javax.jms.Topic
    topic, AQjmsAgent remote_subscriber, java.lang.String
    messageSelector, oracle.sql.CustomDatumFactory payload_factory)

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 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

### createSender(Queue)

    public synchronized javax.jms.QueueSender
    createSender(javax.jms.Queue queue)

Create a QueueSender to send messages to the specified queue.

#### Specified By

javax.jms.QueueSession.createSender(javax.jms.Queue) in interface javax.jms.QueueSession

#### Parameters

`queue` - the queue to access, or null if this is an unidentified producer.

#### Throws

`JMSException` - if a session fails to create a sender due to some JMS error.

`InvalidDestinationException` - if invalid Queue specified.

### createStreamMessage()

    public synchronized javax.jms.StreamMessage createStreamMessage()

Create a StreamMessage. A StreamMessage is used to send a self-defining stream of Java primitives.

#### Specified By

javax.jms.Session.createStreamMessage() in interface javax.jms.Session

#### Throws

`JMSException` - if some error occurs during message creation

### createSubscriber(Topic)

    public synchronized javax.jms.TopicSubscriber
    createSubscriber(javax.jms.Topic topic)

Create a non-durable Subscriber to the specified topic. This method is not supported in the current release

#### Specified By

javax.jms.TopicSession.createSubscriber(javax.jms.Topic) in interface javax.jms.TopicSession

#### Throws

`JMSException` - NOT_SUPPORTED

### createSubscriber(Topic, String, boolean)

    public synchronized javax.jms.TopicSubscriber
    createSubscriber(javax.jms.Topic topic, java.lang.String
    messageSelector, boolean noLocal)

Create a non-durable Subscriber to the specified topic. This method is not supported in the current release

#### Specified By

javax.jms.TopicSession.createSubscriber(javax.jms.Topic, java.lang.String, boolean) in interface javax.jms.TopicSession

#### Throws

`JMSException` - NOT_SUPPORTED

### createTextMessage()

    public synchronized javax.jms.TextMessage createTextMessage()

Create a TextMessage. A TextMessage is used to send a message containing a StringBuffer.

#### Specified By

javax.jms.Session.createTextMessage() in interface javax.jms.Session

#### Throws

`JMSException` - if some error occurs during message creation

### createTextMessage(StringBuffer)

    public synchronized javax.jms.TextMessage
    createTextMessage(java.lang.StringBuffer stringBuffer)

Create an initialized TextMessage. A TextMessage is used to send a message containing a StringBuffer.

#### Specified By

javax.jms.Session.createTextMessage(java.lang.StringBuffer) in interface javax.jms.Session

#### Parameters

`stringBuffer` - the string buffer used to initialize this message.

#### Throws

`JMSException` - if some error occurs during message creation

### createTopic(AQQueueTable, String, AQjmsDestinationProperty)

    public synchronized javax.jms.Topic
    createTopic(oracle.jms.AQQueueTable q_table, java.lang.String topic_
    name, AQjmsDestinationProperty dest_property)

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``

### createTopicReceiver(Topic, String, String)

    public synchronized TopicReceiver
    createTopicReceiver(javax.jms.Topic topic, java.lang.String
    receiver_name, java.lang.String messageSelector)

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 receiver is not a subscriber to the topic, it will receive only those messages that are explicitly This method must be used order to create a TopicReceiver object for consumers that are not durable subscribers of the topic

#### Parameters

`topic` - the topic to access

#### 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(Topic, String, String, CustomDatumFactory)

    public synchronized TopicReceiver
    createTopicReceiver(javax.jms.Topic topic, java.lang.String
    receiver_name, java.lang.String messageSelector,
    oracle.sql.CustomDatumFactory payload_factory)

### getDBConnection()

    public synchronized java.sql.Connection getDBConnection()

### getJmsConnection()

    public AQjmsConnection getJmsConnection()

### getMessageListener()

    public synchronized javax.jms.MessageListener getMessageListener()

Return the session's distinguished message listener.

#### Specified By

javax.jms.Session.getMessageListener() in interface javax.jms.Session

#### Returns

the message listener associated with this session.

#### Throws

`JMSException` - if JMS fails to get the message listener due to an internal error in JMS Provider.

### getQueue(String, String)

    public synchronized javax.jms.Queue getQueue(java.lang.String owner,
    java.lang.String name)

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

### getQueueTable(String, String)

    public synchronized oracle.jms.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 privileges 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

### getTopic(String, String)

    public synchronized javax.jms.Topic getTopic(java.lang.String owner,
    java.lang.String name)

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

### getTransacted()

    public synchronized boolean getTransacted()

Checks if the session in transacted mode?

#### Specified By

javax.jms.Session.getTransacted() in interface javax.jms.Session

#### Returns

true if in transacted mode

#### Throws

`JMSException` - if session is closed

### grantSystemPrivilege(String, String, boolean)

    public void grantSystemPrivilege(java.lang.String privilege,
    java.lang.String grantee, boolean admin_option)

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(String, String)

    public void revokeSystemPrivilege(java.lang.String privilege,
    java.lang.String grantee)

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

### rollback()

    public synchronized void rollback()

Rollback any messages done in this transaction and releases any locks currently held.

#### Specified By

javax.jms.Session.rollback() in interface javax.jms.Session

#### Throws

`JMSException` - if JMS implementation fails to rollback the the transaction due to some internal error.

### run()

    public void run()

#### Specified By

java.lang.Runnable.run() in interface java.lang.Runnable

### setMessageListener(MessageListener)

    public synchronized void
    setMessageListener(javax.jms.MessageListener listener)

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

javax.jms.Session.setMessageListener(javax.jms.MessageListener) in interface javax.jms.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.

### unsubscribe(Topic, AQjmsAgent)

    public synchronized void unsubscribe(javax.jms.Topic topic,
    AQjmsAgent remote_subscriber)

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 subscriber. 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.

### unsubscribe(Topic, String)

    public synchronized 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

#### 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.

## AQjmsStreamMessage

#### Syntax

    public class AQjmsStreamMessage extends AQjmsMessage
       implements javax.jms.StreamMessage

    java.lang.Object
      |
      +--AQjmsMessage
            |
            +--oracle.jms.AQjmsStreamMessage

#### All Implemented Interfaces

    javax.jms.Message, javax.jms.StreamMessage

#### Description

This class implements the StreamMessage interface. A StreamMessage is used to send a stream of java primitives

Member Summary |
--- | ---
Methods |
``clearBody()``

Clear out the message body.

``clearProperties()``

``readBoolean()``

Reads a boolean from the stream message

``readByte()``

Reads a signed 8-bit value from the stream message

``readBytes(byte[])``

Read a byte array from the stream message

``readChar()``

Read a Unicode character value from the stream message

``readDouble()``

Read a double from the stream message

``readFloat()``

Read a float from the stream message

``readInt()``

Read a signed 32 bit integer from the stream message

``readLong()``

Read a signed 64 bit integer from the stream message

``readObject()``

Read a Java object from the stream message.

``readShort()``

Reads a signed 16-bit value from the stream message

``readString()``

Read a string from the stream message

``reset()``

Put the message in read-only mode, and reposition the stream of bytes to the beginning.

``writeBoolean(boolean)``

Write a boolean to the stream message as a 1-byte value.

``writeByte(byte)``

Write out a byte to the stream message as a 1-byte value.

``writeBytes(byte[])``

Write a byte array to the stream message

``writeBytes(byte[], int, int)``

Write a portion of byte array to the stream message

``writeChar(char)``

Write a char to the stream as a 2-byte, high byte first

``writeDouble(double)``

Write a double to the stream as a 8-byte, high byte first

``writeFloat(float)``

Write a float to the stream as a 4-byte, high byte first

``writeInt(int)``

Write a int to the stream as a 4-byte, high byte first

``writeLong(long)``

Write a int to the stream as a 4-byte, high byte first

``writeObject(Object)``

Write a java object to the stream message

``writeShort(short)``

Write a short to the stream as a 2-byte, high byte first

``writeString(String)``

Writes a string to the underlying output stream

Inherited Member Summary
Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`
Methods inherited from class AQjmsMessage
``getBooleanProperty(String)``

, getByteProperty(String)``, getDoubleProperty(String)``, getFloatProperty(String)``, getIntProperty(String)``, getJMSCorrelationID()``, getJMSCorrelationIDAsBytes()``, getJMSDeliveryMode()``, getJMSDestination()``, getJMSExpiration()``, getJMSMessageID()``, getJMSMessageIDAsBytes()``, getJMSPriority()``, getJMSRedelivered()``, getJMSReplyTo()``, getJMSTimestamp()``, getJMSType()``, getLongProperty(String)``, getObjectProperty(String)``, getPropertyNames()``, getSenderID()``, getShortProperty(String)``, getStringProperty(String)``, propertyExists(String)``, setBooleanProperty(String, boolean)``, setByteProperty(String, byte)``, setDoubleProperty(String, double)``, setFloatProperty(String, float)``, setIntProperty(String, int)``, setJMSCorrelationID(String)``, setJMSCorrelationIDAsBytes(byte[])``, setJMSDestination(Destination)``, setJMSExpiration(long)``, setJMSMessageID(String)``, setJMSPriority(int)``, setJMSRedelivered(boolean)``, setJMSReplyTo(Destination)``, setJMSTimestamp(long)``, setJMSType(String)``, setLongProperty(String, long)``, setObjectProperty(String, Object)``, setSenderID(AQjmsAgent)``, setShortProperty(String, short)``, setStringProperty(String, String)``

Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.jms.Message

`getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty`

### Methods

### clearBody()

    public void clearBody()

Clear out the message body. All other parts of the message are left untouched.

#### Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

#### Overrides

clearBody() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to due to some internal JMS error.

### clearProperties()

    public void clearProperties()

#### Specified By

javax.jms.Message.clearProperties() in interface javax.jms.Message

#### Overrides

clearProperties() in class AQjmsMessage

### readBoolean()

    public boolean readBoolean()

Reads a boolean from the stream message

#### Specified By

javax.jms.StreamMessage.readBoolean() in interface javax.jms.StreamMessage

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readByte()

    public byte readByte()

Reads a signed 8-bit value from the stream message

#### Specified By

javax.jms.StreamMessage.readByte() in interface javax.jms.StreamMessage

#### Returns

the next byte from the stream message as a signed 8-bit byte

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readBytes(byte[])

    public int readBytes(byte[] value)

Read a byte array from the stream message

#### Specified By

javax.jms.StreamMessage.readBytes(byte[]) in interface javax.jms.StreamMessage

#### Parameters

`value` - the buffer into which the data is read

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readChar()

    public char readChar()

Read a Unicode character value from the stream message

#### Specified By

javax.jms.StreamMessage.readChar() in interface javax.jms.StreamMessage

#### Returns

the next two bytes from the stream message as a Unicode character.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readDouble()

    public double readDouble()

Read a double from the stream message

#### Specified By

javax.jms.StreamMessage.readDouble() in interface javax.jms.StreamMessage

#### Returns

the next eight bytes from the stream message, interpreted as a double.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readFloat()

    public float readFloat()

Read a float from the stream message

#### Specified By

javax.jms.StreamMessage.readFloat() in interface javax.jms.StreamMessage

#### Returns

the next four bytes from the stream message, interpreted as a float.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readInt()

    public int readInt()

Read a signed 32 bit integer from the stream message

#### Specified By

javax.jms.StreamMessage.readInt() in interface javax.jms.StreamMessage

#### Returns

the next four bytes from the stream message, interpreted as a int.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readLong()

    public long readLong()

Read a signed 64 bit integer from the stream message

#### Specified By

javax.jms.StreamMessage.readLong() in interface javax.jms.StreamMessage

#### Returns

the next eight bytes from the stream message, interpreted as a long.

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readObject()

    public java.lang.Object readObject()

Read a Java object from the stream message.

Note that this method can be used to return in objectified format, an object that had been written to the Stream with the equivalent `writeObject` method call, or it's equivalent primitive write method.

#### Specified By

javax.jms.StreamMessage.readObject() in interface javax.jms.StreamMessage

#### Returns

a Java object from the stream message, in objectified format (ie. if it set as an int, then a Integer is returned).

#### Throws

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if an end of message stream

`MessageNotReadableException` - if message in write-only mode.

### readShort()

    public short readShort()

Reads a signed 16-bit value from the stream message

#### Specified By

javax.jms.StreamMessage.readShort() in interface javax.jms.StreamMessage

#### Returns

the next two bytes from the stream message, interpreted as a 16-bit number

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### readString()

    public java.lang.String readString()

Read a string from the stream message

#### Specified By

javax.jms.StreamMessage.readString() in interface javax.jms.StreamMessage

#### Returns

string from the stream message

#### Throws

`MessageNotReadableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

`MessageEOFException` - if end of message stream

### reset()

    public void reset()

Put the message in read-only mode, and reposition the stream of bytes to the beginning.

#### Specified By

javax.jms.StreamMessage.reset() in interface javax.jms.StreamMessage

#### Throws

`MessageNotWriteableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeBoolean(boolean)

    public void writeBoolean(boolean value)

Write a boolean to the stream message as a 1-byte value. The value true is written out as the value (byte)1; the value false is written out as the value (byte)0.

#### Specified By

javax.jms.StreamMessage.writeBoolean(boolean) in interface javax.jms.StreamMessage

#### Parameters

`value` - the boolean value to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeByte(byte)

    public void writeByte(byte value)

Write out a byte to the stream message as a 1-byte value.

#### Specified By

javax.jms.StreamMessage.writeByte(byte) in interface javax.jms.StreamMessage

#### Parameters

`value` - the byte value to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeBytes(byte[])

    public void writeBytes(byte[] value)

Write a byte array to the stream message

#### Specified By

javax.jms.StreamMessage.writeBytes(byte[]) in interface javax.jms.StreamMessage

#### Parameters

`value` - The byte array to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeBytes(byte[], int, int)

    public void writeBytes(byte[] value, int offset, int length)

Write a portion of byte array to the stream message

#### Specified By

javax.jms.StreamMessage.writeBytes(byte[], int, int) in interface javax.jms.StreamMessage

#### Parameters

`value` - the byte array to be written

`offset` - the initial offset within the byte array

`length` - the number of bytes to use

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeChar(char)

    public void writeChar(char value)

Write a char to the stream as a 2-byte, high byte first

#### Specified By

javax.jms.StreamMessage.writeChar(char) in interface javax.jms.StreamMessage

#### Parameters

`value` - the char to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeDouble(double)

    public void writeDouble(double value)

Write a double to the stream as a 8-byte, high byte first

#### Specified By

javax.jms.StreamMessage.writeDouble(double) in interface javax.jms.StreamMessage

#### Parameters

`value` - The double to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeFloat(float)

    public void writeFloat(float value)

Write a float to the stream as a 4-byte, high byte first

#### Specified By

javax.jms.StreamMessage.writeFloat(float) in interface javax.jms.StreamMessage

#### Parameters

`value` - the float to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeInt(int)

    public void writeInt(int value)

Write a int to the stream as a 4-byte, high byte first

#### Specified By

javax.jms.StreamMessage.writeInt(int) in interface javax.jms.StreamMessage

#### Parameters

`value` - the int to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeLong(long)

    public void writeLong(long value)

Write a int to the stream as a 4-byte, high byte first

#### Specified By

javax.jms.StreamMessage.writeLong(long) in interface javax.jms.StreamMessage

#### Parameters

`value` - the int to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeObject(Object)

    public void writeObject(java.lang.Object value)

Write a java object to the stream message

#### Specified By

javax.jms.StreamMessage.writeObject(java.lang.Object) in interface javax.jms.StreamMessage

#### Parameters

`value` - the java object to be written.

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`MessageFormatException` - if object is invalid type

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeShort(short)

    public void writeShort(short value)

Write a short to the stream as a 2-byte, high byte first

#### Specified By

javax.jms.StreamMessage.writeShort(short) in interface javax.jms.StreamMessage

#### Parameters

`value` - the short to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

### writeString(String)

    public void writeString(java.lang.String value)

Writes a string to the underlying output stream

#### Specified By

javax.jms.StreamMessage.writeString(java.lang.String) in interface javax.jms.StreamMessage

#### Parameters

`value` - The string to be written

#### Throws

`MessageNotWritableException` - if message in write-only mode.

`JMSException` - if JMS fails to read message due to some internal JMS error.

## AQjmsTextMessage

#### Syntax

    public class AQjmsTextMessage extends AQjmsMessage
       implements javax.jms.TextMessage

    java.lang.Object
      |
      +--AQjmsMessage
            |
            +--oracle.jms.AQjmsTextMessage

#### All Implemented Interfaces

    javax.jms.Message, javax.jms.TextMessage

#### Description

This class implements the TextMessage interface. A TextMessage is used to send a message containing a java.lang.StringBuffer

Member Summary |
--- | ---
Methods |
``clearBody()``

``clearProperties()``

Clear a message's properties.

``getText()``

Get the string containing this message's data.

``setText(String)``

Set the string containing this message's data.

Inherited Member Summary
Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`
Methods inherited from class AQjmsMessage
``getBooleanProperty(String)``

, getByteProperty(String)``, getDoubleProperty(String)``, getFloatProperty(String)``, getIntProperty(String)``, getJMSCorrelationID()``, getJMSCorrelationIDAsBytes()``, getJMSDeliveryMode()``, getJMSDestination()``, getJMSExpiration()``, getJMSMessageID()``, getJMSMessageIDAsBytes()``, getJMSPriority()``, getJMSRedelivered()``, getJMSReplyTo()``, getJMSTimestamp()``, getJMSType()``, getLongProperty(String)``, getObjectProperty(String)``, getPropertyNames()``, getSenderID()``, getShortProperty(String)``, getStringProperty(String)``, propertyExists(String)``, setBooleanProperty(String, boolean)``, setByteProperty(String, byte)``, setDoubleProperty(String, double)``, setFloatProperty(String, float)``, setIntProperty(String, int)``, setJMSCorrelationID(String)``, setJMSCorrelationIDAsBytes(byte[])``, setJMSDestination(Destination)``, setJMSExpiration(long)``, setJMSMessageID(String)``, setJMSPriority(int)``, setJMSRedelivered(boolean)``, setJMSReplyTo(Destination)``, setJMSTimestamp(long)``, setJMSType(String)``, setLongProperty(String, long)``, setObjectProperty(String, Object)``, setSenderID(AQjmsAgent)``, setShortProperty(String, short)``, setStringProperty(String, String)``

Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.jms.Message

`getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty`

### Methods

### clearBody()

    public void clearBody()

#### Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

#### Overrides

clearBody() in class AQjmsMessage

### clearProperties()

    public void clearProperties()

Clear a message's properties.

#### Specified By

javax.jms.Message.clearProperties() in interface javax.jms.Message

#### Overrides

clearProperties() in class AQjmsMessage

#### Throws

`JMSException` - if JMS fails to clear JMS message properties due to some internal JMS error.

### getText()

    public java.lang.String getText()

Get the string containing this message's data. The default value is null.

#### Specified By

javax.jms.TextMessage.getText() in interface javax.jms.TextMessage

#### Returns

the String containing the message's data

#### Throws

`JMSException` - if JMS fails to get text due to some internal JMS error.

### setText(String)

    public void setText(java.lang.String string)

Set the string containing this message's data.

#### Specified By

javax.jms.TextMessage.setText(java.lang.String) in interface javax.jms.TextMessage

#### Parameters

`string` - the String containing the message's data

#### Throws

`JMSException` - if JMS fails to set text due to some internal JMS error.

`MessageNotWriteableException` - if message in read-only mode.

## AQjmsTopicConnectionFactory

#### Syntax

    public class AQjmsTopicConnectionFactory extends java.lang.Object
       implements javax.jms.TopicConnectionFactory

    java.lang.Object
      |
      +--oracle.jms.AQjmsTopicConnectionFactory

#### All Implemented Interfaces

    javax.jms.ConnectionFactory, javax.jms.TopicConnectionFactory

#### Description

This class implements the TopicConnectionFactory interface. A TopicConnectionFactory is used to create TopicConnections

Member Summary |
--- | ---
Methods |
``createTopicConnection()``

create a Topic Connection to the JMS Server hosting this Topic- connection factory.

``createTopicConnection(Connection)``

create a TopicConnection using the already open JDBC connection.

``createTopicConnection(String, String)``

create a Topic Connection using the given username and password for authentication during creation of the Connection.

Inherited Member Summary
Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods

### createTopicConnection()

    public javax.jms.TopicConnection createTopicConnection()

create a Topic Connection to the JMS Server hosting this Topic- connection factory.

#### Specified By

javax.jms.TopicConnectionFactory.createTopicConnection() in interface javax.jms.TopicConnectionFactory

#### Returns

a Topic Connection

#### Throws

`JMSException` - if JMS fails to get a topic connection due to some JMS error

### createTopicConnection(Connection)

    public static javax.jms.TopicConnection
    createTopicConnection(java.sql.Connection jdbc_connection)

create a TopicConnection using the already open JDBC connection. This creation does NOT result in creation of another connection to the database. Instead JMS binds to the given connection to the database and provides an interface to the Pub/Sub mechanism defined by JMS.

#### Parameters

`jdbc_connection` - a valid open connection to the database.

#### Returns

a TopicConnection

#### Throws

`JMSException` - if JMS fails to get a topic connection due to some JMS error

### createTopicConnection(String, String)

    public javax.jms.TopicConnection
    createTopicConnection(java.lang.String username, java.lang.String
    password)

create a Topic Connection using the given username and password for authentication during creation of the Connection.

#### Specified By

javax.jms.TopicConnectionFactory.createTopicConnection(java.lang.String, java.lang.String) in interface javax.jms.TopicConnectionFactory

#### Parameters

`username` - name of the user connecting to the DB for Queueing. password password for the user creating the connection.

#### Returns

a Topic Connection

#### Throws

`JMSException` - if JMS fails to get a topic connection due to some JMS error

## AQjmsTopicPublisher

#### Syntax

    public interface AQjmsTopicPublisher extends javax.jms.TopicPublisher

#### All Superinterface

    javax.jms.MessageProducer, javax.jms.TopicPublisher

#### All Known Implementing Classes

    AQjmsProducer

#### Description

This interface extends TopicPublisher and defines AQ extensions to JMS. A client uses a TopicPublisher for publishing messages to a Topic

Member Summary |
--- | ---
Methods |
``publish(Message, AQjmsAgent[])``

Publish a Message to a specific list of recipients

``publish(Message, AQjmsAgent[], int, int, long)``

Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live

``publish(Topic, Message, AQjmsAgent[])``

Publish a Message to a topic by specifying a list of recipients

``publish(Topic, Message, AQjmsAgent[], int, int, long)``

Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live

Inherited Member Summary
Methods inherited from interface javax.jms.TopicPublisher
`getTopic, publish, publish, publish, publish`
Methods inherited from interface javax.jms.MessageProducer
`close, getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive`

### Methods

### publish(Message, AQjmsAgent[])

    public void publish(javax.jms.Message message, AQjmsAgent recipient_
    list)

Publish a Message to a specific list of recipients

#### Parameters

`message` - The message to be published

`recipient_list` - The list of recipients to which the message is published. The recipients are of type AQjmsAgent.

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Message, AQjmsAgent[], int, int, long)

    public void publish(javax.jms.Message message, AQjmsAgent recipient_
    list, int deliveryMode, int priority, long timeToLive)

Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live

#### Parameters

`message` - The message to be published

`recipient_list` - The list of recipients to which the message is published. The recipients are of type AQjmsAgent.

`deliveryMode` - The delivery mode - persistent or non_persistent

`priority` - The priority of the message

`timeToLive` - the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Topic, Message, AQjmsAgent[])

    public void publish(javax.jms.Topic topic, javax.jms.Message
    message, AQjmsAgent recipient_list)

Publish a Message to a topic by specifying a list of recipients

#### Parameters

`topic` - The topic to which to publish the message. This overrides the default topic of the Message Producer

`message` - The message to be published

`recipient_list` - The list of recipients to which the message is published. The recipients are of type AQjmsAgent.

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

### publish(Topic, Message, AQjmsAgent[], int, int, long)

    public void publish(javax.jms.Topic topic, javax.jms.Message
    message, AQjmsAgent recipient_list, int deliveryMode, int priority,
    long timeToLive)

Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live

#### Parameters

`topic` - The topic to which to publish the message. This overrides the default topic of the Message Producer

`message` - The message to be published

`recipient_list` - The list of recipients to which the message is published. The recipients are of type AQjmsAgent.

`deliveryMode` - The delivery mode - persistent or non_persistent

`priority` - The priority of the message

`timeToLive` - the message time to live in milliseconds; zero is unlimited

#### Throws

`JMSException` - if JMS fails to publish the message due to some internal error.

## AQjmsTopicReceiver

#### Syntax

    public interface AQjmsTopicReceiver extends TopicReceiver

#### All Superinterfaces

    javax.jms.MessageConsumer, TopicReceiver

#### All Known Implementing Classes

    AQjmsConsumer

#### Description

This interface extends the TopicReceiver interface that defines AQ extensions for remote subscribers and explicitly specified recipients (in point-to-mulitpoint communication). A TopicReceiver is used to receive messages from a Topic

Member Summary |
--- | ---
Methods |
``getNavigationMode()``

get the navigation mode used for receiving messages

``receiveNoData()``

Consume the message without returning it to the user.

``receiveNoData(long)``

Consume the message without returning it to the user.

``setNavigationMode(int)``

set the navigation mode used for receiving messages

Inherited Member Summary
Methods inherited from interface TopicReceiver
``getTopic()``

Methods inherited from interface javax.jms.MessageConsumer

`close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener`

### Methods

### getNavigationMode()

    public int getNavigationMode()

get the navigation mode used for receiving messages

#### Returns

the navigation mode

#### Throws

`JMSException` - if there was an error in getting the navigation mode

### receiveNoData()

    public void receiveNoData()

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser.

#### Throws

`JMSException` - if the message could not be received due to an error

### receiveNoData(long)

    public void receiveNoData(long tomeOut)

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser. This call will block until a message arrives or the timeout expires

#### Parameters

`timeout` - the timeout value in milliseconds

#### Throws

`JMSException` - if the message could not be received due to an error

### setNavigationMode(int)

    public void setNavigationMode(int mode)

set the navigation mode used for receiving messages

#### Parameters

`mode` - the new value of the navigation mode

#### Throws

`JMSException` - if there was an error in getting the navigation mode

## AQjmsTopicSubscriber

#### Syntax

    public interface AQjmsTopicSubscriber extends javax.jms.TopicSubscriber

#### All Superinterfaces

    javax.jms.MessageConsumer, javax.jms.TopicSubscriber

#### All Known Implementing Classes

    AQjmsConsumer

#### Description

This interface extends TopicSubscriber and defines AQ extensions to JMS. A client uses a TopicSubscriber to receive messages published on a Topic

Member Summary |
--- | ---
Methods |
``getNavigationMode()``

Consume the message without returning it to the user.

``receiveNoData()``

Consume the message without returning it to the user.

``receiveNoData(long)``

Consume the message without returning it to the user.

``setNavigationMode(int)``

set the navigation mode used for receiving messages

Inherited Member Summary
Methods inherited from interface javax.jms.TopicSubscriber
`getNoLocal, getTopic`
Methods inherited from interface javax.jms.MessageConsumer
`close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener`

### Methods

### getNavigationMode()

    public int getNavigationMode()

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser. This call will block until a message arrives or the timeout expires

#### Parameters

`timeout` - the timeout value in milliseconds

#### Throws

`JMSException` - if the message could not be received due to an error

### receiveNoData()

    public void receiveNoData()

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser.

#### Throws

`JMSException` - if the message could not be received due to an error

### receiveNoData(long)

    public void receiveNoData(long tomeOut)

Consume the message without returning it to the user. This call will avoid the overhead of fetching the message from the database and hence can be used as an optimization by jms clients who have already got the message for example using a queue browser. This call will block until a message arrives or the timeout expires

#### Parameters

`timeout` - the timeout value in milliseconds

#### Throws

`JMSException` - if the message could not be received due to an error

### setNavigationMode(int)

    public void setNavigationMode(int mode)

set the navigation mode used for receiving messages

#### Parameters

`mode` - the new value of the navigation mode

#### Throws

`JMSException` - if there was an error in getting the navigation mode

## TopicReceiver

#### Syntax

    public interface TopicReceiver extends javax.jms.MessageConsumer

#### All Known Subinterfaces

    AQjmsTopicReceiver

#### All Superinterfaces

    javax.jms.MessageConsumer

#### Description

This interface extends MessageConsumer to allow remote subscribers and explicitly specified recipients (in point-to-multipoint communication) to receive messages

Member Summary |
--- | ---
Methods |
``getTopic()``

Get the topic associated with this receiver.

Inherited Member Summary
Methods inherited from interface javax.jms.MessageConsumer
`close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener`

### Methods

### getTopic()

    public javax.jms.Topic getTopic()

Get the topic associated with this receiver.

#### Returns

this subscriber's topic

#### Throws

`JMSException` - if JMS fails to get topic for this topic receiver due to some internal error.

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
| Library | Service | Contents