org.exolab.jmscts.test.asf.ConnectionConsumerTest

This class tests the behaviour of ConnectionConsumer s

test

Verifies that a ConnectionConsumer can be created

Requirements
asf.connectionconsumer For application servers, connections provide a special facility for creating a ConnectionConsumer. The messages it is to consume are specified by a destination and a message selector. In addition, a ConnectionConsumer must be given a ServerSessionPool to use for processing its messages. A maxMessages value is specified to limit the number of messages a ConnectionConsumer may load at one time into a ServerSession's session.

org.exolab.jmscts.test.connection.AuthTest

This class tests connection authorisation

testInvalidQueueAuth

Verifies that a QueueConnection cannot be created, when using an invalid username and password

Requirements
connection.authentication When creating a connection, a client may specify its credentials as a name/password. JMSSecurityException must be thrown when a provider rejects a user name/password submitted by a client

testInvalidTopicAuth

Verifies that a TopicConnection cannot be created, when using an invalid username and password

Requirements
connection.authentication When creating a connection, a client may specify its credentials as a name/password. JMSSecurityException must be thrown when a provider rejects a user name/password submitted by a client

testQueueAuth

Verifies that a QueueConnection can be created, using a valid username and password

Requirements
connection.authentication When creating a connection, a client may specify its credentials as a name/password. JMSSecurityException must be thrown when a provider rejects a user name/password submitted by a client

testTopicAuth

Verifies that a TopicConnection can be created, using a valid username and password

Requirements
connection.authentication When creating a connection, a client may specify its credentials as a name/password. JMSSecurityException must be thrown when a provider rejects a user name/password submitted by a client

org.exolab.jmscts.test.connection.ClientIdentifierTest

This class verifies that the client identifier can be set, but only on creation of a connection.

testDuplicateClientID

Verifies that two connections may not have the same client identifier

Requirements
connection.clientID.duplicate The client state identified by a client identifier can be in use by only one client at a time. A JMS provider must prevent concurrently executing clients from using it. This prevention may take the form of JMSExceptions thrown when such use is attempted; it may result in the offending client being blocked; or some other solution. A JMS provider must insure that such attempted 'sharing' of an individual client state does not result in messages being lost or doubly processed. TODO - don't handle the blocked scenario

testSetAfterClose

Verifies that the client identifier cannot be set on a closed connection

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetAfterCreateSession

Verifies that the client identifier cannot be set after a session has been created

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetAfterListenerRegistration

Verifies that the client identifier cannot be set after an exception listener has been registered

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetAfterStart

Verifies that the client identifier cannot be set after the connection has been started

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetAfterStop

Verifies that the client identifier cannot be set after the connection has stopped

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetOnCreation

Verifies that the client identifier can be set on a connection, just after it is created, but not subsequently.

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.
connection.clientID.administered The facility to explicitly set a connection's client identifier is not a mechanism for overriding the identifier that has been administratively configured. It is provided for the case where no administratively specified identifier exists. If one does exist, an attempt to change it by setting it must throw an IllegalStateException.

org.exolab.jmscts.test.connection.ConnectionCloseTest

This class tests the behaviour of Connection.close

testCloseForClosedConnection

Verifies that closing a closed connection does not produce an exception.

Requirements
connection.close.closed Closing a closed connection must NOT throw an exception.

testExceptionOnClose

Verifies that a IllegalStateException is thrown for any Connection method (except Connection.close()), if the connection has been closed

Requirements
connection.close Once a connection has been closed, an attempt to use it or its sessions or their message consumers and producers must throw an IllegalStateException (calls to the close method of these objects must be ignored).

org.exolab.jmscts.test.connection.ListenerTest

This class tests the behaviour of stopping and closing a connection while a listener is active. NOTE: Temporary destinations cannot be used as a separate connection is required to verify that the test is successful.

testConnectionClose

Verifies that running MessageListeners have full access to connection if the connection is closed - the close invocation must wait until they complete.

Requirements
connection.close.listeners If one or more of the connection's session's message listeners is processing a message at the point when connection close is invoked, all the facilities of the connection and its sessions must remain available to those listeners until they return control to the JMS provider.

testConnectionStop

Verifies th at running MessageListeners have full access to the connection, if the connection is stopped.

Requirements
connection.stop.listeners A stop method call must not return until delivery of messages has paused. This means a client can rely on the fact that none of its message listeners will be called and all threads of control waiting for receive to return will not return with a message until the connection is restarted. If MessageListeners are running when stop is invoked, stop must wait until all of them have returned before it may return. While these MessageListeners are completing, they must have the full services of the connection available to them. TODO - test behaviour of sending messages while a listener is active, using a different session (i.e, not from the listener - undefined?) TODO - add test where a thread stops a connection and another starts it as the stop is in progress.

org.exolab.jmscts.test.connection.MetaDataTest

This class tests that connections support JMSXGroupID and JMSXGroupSeq properties.

testMetaData

Verifies that the connection supports JMSXGroupID and JMSXGroupSeq properties.

Requirements
connection.metadata.properties ConnectionMetaData provides a list of the JMS defined property names supported by the connection. This must include JMSXGroupID and JMSXGroupSeq

org.exolab.jmscts.test.connection.ReceiverTest

This class tests the behaviour of stopping and closing a connection while a receiver is active.

testConnectionClose

Verifies that the receive timers for a closed connection continue to advan ce, so receives may time out and return a null message as the connection is closed.

Requirements
connection.close.receivers A close terminates all pending message receives on the connection's session's consumers. The receives may return with a message or null depending on whether or not there was a message available at the time of the close.

testConnectionRestart

Verifies that the receive timers for a stopped connection continue to advance, so that when the connection is stopped, a waiting receiver can subsequently receive a message when the connection is started again

Requirements
connection.stop.receivers The receive timers for a stopped connection continue to advance, so receives may time out and return a null message while the connection is stopped.

testConnectionStop

Verifies that the receive timers for a stopped connection continue to advance, so receives may time out and return a null message while the connection is stopped.

Requirements
connection.stop.receivers The receive timers for a stopped connection continue to advance, so receives may time out and return a null message while the connection is stopped.

org.exolab.jmscts.test.connection.SendReceiveStopTest

This class tests the behaviour of Connection.stop and Connection.start

testStop

Verifies that a connection doesn't receive any messages after starting a connection, sending messages, and then stopping it.

Requirements
connection.stopped No mes sages are delivered by a connection to its client until it has been started.

testStoppedOnCreation

Verifies that a connection does not receive any messages on creation.

Requirements
connection.creation When a Connection is created, it is in stopped mode. That means that no messages are being delivered to it.
connection.stopped No messages are delivered by a connection to its client until it has been started.
connection.stopped.send Stopping a connection has no effect on its ability to send messages.

org.exolab.jmscts.test.connection.StopStartTest

This class tests the behaviour of Connection.stop and Connection.start

testStartForStartedConnection

Verifies that invoking Connection.start() for a started connection has no effect.

Requirements
connection.start.started Starting a started connection is ignored.

testStopForStoppedConnection

Verifies that invoking Connection.stop() for a stopped connection has no effect.

Requirements
connection.stop.stopped Stopping a stopped connection is ignored.

org.exolab.jmscts.test.message.bytes.BytesMessageTest

This class tests the BytesMessage message type.

testInvalidObject

Verifies that attempting to write an invalid object using the BytesMessage.writeObject() method throws MessageFormatException

Requirements
message.bytes.method.writeObject Refer to javadoc

testPartialReadBytes1

Verifies that the BytesMessage.readBytes(byte[ ] , int) method can be called multiple times passing a byte array less than the length of the byte stream, and that the result matches that expected.

Requirements
message.bytes.method.readBytes(2) Refer to javadoc

testPartialReadBytes2

Verifies that the BytesMessage.readBytes(byte[ ] , int) method can be called multiple times passing a length parameter less than the length of the array, and that the result matches that expected.

Requirements
message.bytes.method.readBytes(2) Refer to javadoc

testReadBytes

Verifies the behaviour of the BytesMessage.readBytes(byte[ ] ) method.

Requirements
message.bytes.method.readBytes(1) Refer to javadoc

testReadBytesForEmptyStream1

Verifies that the BytesMessage.readBytes(byte[ ] ) method returns -1 to indicate end-of-stream, for an empty message body.

Requirements
message.bytes.method.readBytes(1) Refer to javadoc

testReadBytesForEmptyStream2

Verifies that the BytesMessage.readBytes(byte[ ] , int) method returns -1 to indicate end-of-stream, for an empty message body.

Requirements
message.bytes.method.readBytes(2) Refer to javadoc

testReadBytesIndexException

Verifies that the BytesMessage.readBytes(byte[ ] , int) method throws IndexOutOfBoundsException for invalid length parameters

Requirements
message.bytes.method.readBytes(2) Refer to javadoc

testReadFailure

Verifies that if a read method throws MessageFormatException or NumberFormatException, the current position of the read pointer is not be incremented, and that a subsequent read is capable of recovering from the exception by re-reading the data as a different type.

NOTE: With the exception of the readUTF() method, it is difficult to conceive test cases for read methods.

  • A provider that implements BytesMessage using a DataInputStream or equivalent, is likely to only throw MessageFormatException for the readUTF() method.

    The other likely exceptions are MessageEOFException for stream overruns, and JMSException for any other error.
  • As BytesMessage does not support conversion, NumberFormatException is unlikely to be thrown.

Requirements
message.bytes.read If a read method of a BytesMessage throws a MessageFormatException or NumberFormatException, the current position of the read pointer must not be incremented. A subsequent read must be capable of recovering from the exception by re-reading the data as a different type.

NOTE: With the exception of the readUTF() method, it is difficult to conceive test cases for read methods.
  • A provider that implements BytesMessage using a DataInputStream or equivalent, is likely to only throw MessageFormatException for the readUTF() method.

    The other likely exceptions are MessageEOFException for stream overruns, and JMSException for any other error.
  • As BytesMessage does not support conversion, NumberFormatException is unlikely to be thrown.

testWriteObject

Verfies that all objectified primitives can be written using the BytesMessage.writeObject() method

Requirements
message.bytes.method.writeObject Refer to javadoc

org.exolab.jmscts.test.message.clear.ClearTest

This class tests the behaviour of Message.clearBody() and Message.clearProperties()

testBytesClearBody

Verifies that BytesMessage.clearBody() leaves the message body empty, and doesn't clear the message properties.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.bytes.method.clearBody When clearBody is called on a BytesMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

testBytesClearBodyOnCreation

Verifies that BytesMessage.clearBody() can be invoked for a new message

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's cre ate method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.bytes.method.clearBody When clearBody is called on a BytesMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

testClearBody

Verifies that Message.clearBody() leaves the message body empty, and doesn't clear the message properties.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testClearBodyOnCreation

Verifies that Message.clearBody() can be invoked for a new message.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testClearProperties

Verifies that Message.clearProperties() leaves the message properties empty, and doesn't clear the message body.

Requirements
message.method. clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.

testClearPropertiesOnCreation

Verifies that Message.clearProperties() can be invoked for a new message.

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.

testStreamClearBody

Verifies that StreamMessage.clearBody() leaves the message body empty, and doesn't clear the message properties.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.stream.method.clearBody When clearBody is called on a StreamMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

testStreamClearBodyOnCreation

Verifies that StreamMessage.clearBody() can be invoked for a new message

Requirements
message.method.clear Body The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.stream.method.clearBody When clearBody is called on a StreamMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

org.exolab.jmscts.test.message.clear.RecoverClearTest

This class tests the behaviour of Message.clearBody() and Message.clearProperties() for CLIENT_ACKNOWLEDGE sessions where the session is recovered.

testRecover

Verifies that clearing the properties and bodies of received messages doesn't affect the messages received after recovering the session

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

org.exolab.jmscts.test.message.clear.RollbackClearTest

This class tests the behaviour of Message.clearBody() and Message.clearProperties() for transacted sessions where the session is rolled back.

testRollback

Verifies that clearing the properties and bodies of received messages doesn't affect the messages received after rolling back the session

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

org.exolab.jmscts.test.message.clear.SendReceiveClearTest

This class tests the behaviour of Message.clearBody() and Message.clearProperties() on send and receipt, against all message, delivery, and transaction types

testBytesClearBodyOnReceipt

Verifies that BytesMessage.clearBody() leaves the message body empty, and doesn't clear the message properties, on receipt of a message.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.bytes.method.clearBody When clearBody is called on a BytesMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

testClearBodyOnReceipt

Verifies that Message.clearBody() leaves the message body empty, and doesn't clear the message properties, on receipt of a message.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testClearOnSend

Verifies that Message.clearProperties() and Message.clearBody() on send doesn't affect the sent message

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testClearPropertiesOnReceipt

Verifies that Message.clearProperties() leaves the message properties empty, and doesn't clear the message body, on receipt of a message.

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.

testStreamClearBodyOnReceipt

Verifies that StreamMessage.clearBody() leaves the message body empty, and doesn't clear the message properties, on receipt of a message.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.stream.method.clearBody When clearBody is called on a StreamMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

org.exolab.jmscts.test.message.close.CloseTest

This class tests the behaviour of messages when the associated connection or session is closed.

testCloseConnection

Verifies that all the methods for a message may be invoked for a closed connection, with the exception of Message.acknowledge() , which should throw Illeg alStateException .

Requirements
connection.close.message It is valid to continue to use message objects created or received after a connection has been closed with the exception of a received message's acknowledge method. Invoking the acknowledge method of a received message must throw an IllegalStateException.

testCloseSession

Verifies that all the methods for a message may be invoked for a closed session, with the exception of Message.acknowledge() , which should throw IllegalStateException .

Requirements
session.close.message It is valid to continue to use message objects created or received via the session, with the exception of a received message'acknowledge method. Invoking the acknowledge method of a received message must throw an IllegalStateException.

org.exolab.jmscts.test.message.copy.BytesMessageTest

This class tests that BytesMessage copies content

testPartialWriteBytesCopy

Verifies that BytesMessage.writeBytes(byte[ ] , int, int) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testWriteBytesCopy

Verifies that BytesMessage.writeBytes(byte[ ] ) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

org.exolab.jmscts.test.message.copy.MapMessageTest

This class tests that MapMessage copies byte array content

testByteArrayCopy

Verifies that MapMessage.setObject() copies byte arrays

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testPartialSetBytesCopy

Verifies that MapMessage.setBytes(byte[ ] , int, int) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testSetBytesCopy

Verifies that MapMessage.setBytes(byte[ ] ) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

org.exolab.jmscts.test.message.copy.MessageCopyTest

This class tests that message properties and message bodies are copied on send and receive.

testCopyOnSend

Verifies that messages are copied by the provider on send.

Requirements
message.send After sending a message, a client may retain and modify it without affecting the message that has been sent. The same message object may be sent multiple times.

org.exolab.jmscts.test.message.copy.ObjectMessageTest

This class tests that ObjectMessage copies content

testByteArrayCopy

Verifies that ObjectMessage.setObject() copies byte arrays

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testCopyAtConstruction

Verifies that ObjectMessage.getObject() returns a different reference to that set, when the object is supplied at construction

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testCustomObjectCopy

Verifies that ObjectMessage.setObject() copies user objects

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

org.exolab.jmscts.test.message.copy.StreamMessageTest

This class verifies that StreamMessage copie s content

testByteArrayCopy

Verifies that StreamMessage.setObject() copies byte arrays

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testPartialWriteBytesCopy

Verifies that StreamMessage.writeBytes(byte[ ] , int, int) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testWriteBytesCopy

Verifies that StreamMessage.writeBytes(byte[ ] ) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

org.exolab.jmscts.test.message.foreign.ForeignMessageTest

This class tests the behaviour of sending 'foreign' messages. A 'foreign' message is one whose implementation is not one of those of the target provider.

test

Verifies that 'foreign' messages are supported by the JMS provider

Requirements
message.foreign A provider must be prepared to accept, from a client, a message whose implementation is not one of its own. A message with a 'foreign' implementation may not be handled as efficiently as a provider's own implementation; however, it must be handled.

Note that if the foreign message implementation contains a JMSReplyTo header field that is set to a foreign destination implementation, the provider is not required to handle or preserve the value of this field.

org.exolab.jmscts.test.message.header.JMSCorrelationIDTest

This class tests the JMSCorrelationID message property

testCorrelationID

Verifies that the JMSCorrelationID header property can be set, and that the received message has the same JMSCorrelationID value as that sent

Requirements
message.correlation The JMSCorrelationID header field may be used to link one message with another. It can contain a provider-specific message ID, an application-specific string, or a provider-native byte[ ] value. The application-specific string must not start with the 'ID:' prefix: this is reserved for provider generated messages Ids.

testCorrelationIDAsBytes

Verifies the behaviour of the JMSCorrelationIDAsBytes methods.

Requirements
message.correlation.bytes If a provider supports the native concept of correlation ID, a JMS client may need to assign specific JMSCorrelationID values to match those expected by non-JMS clients. A byte[ ] value is used for this purpose. JMS providers without native correlation ID values are not required to support byte[ ] values - in this case setJMSCorrelationIDAsBytes() and getJMSCorrelationIDAsBytes() may throw java.lang.UnsupportedOperationException.

testNullCorrelationID

Verifies that a null can be assigned to JMSCorrelationID when:

  • a message is intially constructed
  • a message is received with a non-null JMSCorrelationID

Requirements
message.correlation The JMSCorrelationID header field may be used to link one message with another. It can contain a provider-specific message ID, an application-specific string, or a provider-native byte[ ] value. The application-specific string must not start with the 'ID:' prefix: this is reserved for provider generated messages Ids.

org.exolab.jmscts.test.message.header.JMSDestinationTest

This class tests the JMSDestination message property

testJMSDestination

Verifies that the JMSDestination is assigned when a message is sent, and that the received message has the same JMSDestination value as that sent

Requirements
message.destination When a message is sent, JMSDestination is ignored. After completion of the send it holds the destination object specified by the sending method. When a message is received, its destination value must be equivalent to the value assigned when it was sent.

testJMSDestinationOnResend

Verifies that the JMSDestination is assigned when a message is resent to a different destination

Requirements
message.destination When a message is sent, JMSDestination is ignored. After completion of the send it holds the destination object specified by the sending method. When a message is received, its destination value must be equivalent to the value assigned when it was sent.

org.exolab.jmscts.test.message.header.JMSMessageIDTest

This class tests the JMSMessageID message property

testJMSMessageID

Verifies that the JMSMessageID is assigned when a message is sent, that the received message has the same JMSMessageID value, as that sent, and that a new JMSMessageID is assigned when the message is resent

Requirements
message.identifier When a message is sent, JMSMessageID is ignored. When the send method returns it contains a provider-assigned value.

testJMSMessageIDAssignment

Verifies that the JMSMessageID is assigned each time a message is sent

Requirements
message.identifier When a message is sent, JMSMessageID is ignored. When the send method returns it contains a provider-assigned value.

testJMSMessageIDPrefix

Verifies that JMSMessageID is prefixed with 'ID:'

Requirements
message.identifier.prefix All JMSMessageID values must start with the prefix 'ID:'

org.exolab.jmscts.test.message.header.JMSReplyToTest

This class tests the JMSReplyTo message property.

testReplyTo

Verifies that the reply-to address on a received message can be used to send and subsequently receive a message.

Requirements
message.replyTo The JMSReplyTo header field contains a Destination supplied by a client when a message is sent. It is the destination where a reply to the message should be sent.

Messages sent with a null JMSReplyTo value may be a notification of some event or they may just be some data the sender thinks is of interest.

org.exolab.jmscts.test.message.map.MapMessageTest

This class tests the MapMessage message type.

testCase

Verifies that field names are case sensitive NOTE: this is not explicitly mentioned in the specification, but is in keeping with property name requirements

Requirements
message.map.case MapMessage field names are case sensitive.

NOTE: the specification does not explicitly mention this requirement, but it is in keeping with property name requirements.

testConversion

Verifies valid conversions for all types except String (this is handled by testStringConversion()).

Requirements
message.map.conversion MapMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. MapMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testGetMapNames

Verifies that getMapNames() returns a name for each element in the set

Requirements
message.map.method.getMapNames Refer to javadoc

testInvalidConversion

Verifies that attempting to perform invalid invalid conversions throws MessageFormatException.

Requirements
message.map.conversion MapMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. MapMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testInvalidNumericConversion

Verifies that attempting to perform invalid invalid string to numeric conversions throws NumberFormatException

Requirements
message.map.conversion MapMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. MapMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testInvalidObject

Verifies that attempting to set an invalid object using the setObject() method throws MessageFormatException

Requirements
message.map.method.setObject Refer to javadoc

testItemExists

Verifies the behaviour of the itemExists() method

Requirements
message.map.method.itemExists Refer to javadoc

testMap

Verifies that elements populated in a map are identical to those retrieved

Requirements
message.map A MapMessage is a message whose body contains a set of name-value pairs where names are Strings and values are Java primitive types. The entries can be accessed sequentially by enumerator or randomly by name. The order of the entries is undefined.

testNullConversion

Verifies behaviour of conversions from null

Requirements
message.map.null For MapMessage, attempting to read a null value as a Java primitive type must be treated as calling the primitive's corresponding valueOf(String) conversion method with a null value. Since char does not support a String conversion, attempting to read a null value as a char must throw NullPointerException.

testSetObject

Verifi es that setObject() can handle all supported types

Requirements
message.map.method.setObject Refer to javadoc

testStringConversion

Verifies valid string conversions

Requirements
message.map.conversion MapMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. MapMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testUnset

Verifies that getting a MapMessage field for a field name that has not be en set is handled as if the field exists with a null value.

Requirements
message.map.unset Getting a MapMessage field for a field name that has not been set is handled as if the field exists with a null value.

org.exolab.jmscts.test.message.object.ObjectMessageTest

This class tests the ObjectMessage message type

testNull

Verifies that ObjectMessage supports nulls

Requirements
message.object.method.setObject The setObject method places a copy of the input in the message.

org.exolab.jmscts.test.message.properties.IdentifierTest

This class tests message property identifiers.

testIdentifierCase

Verifies that property names are case sensitive

Requirements
properties.identifier.case Identifiers are case sensitive.

testInvalidIdentifiers

Verifies that invalid identifiers can't be used as property names

Requirements
properties.identifier An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true.

testJMSXProviderIdentifiers

Tests that JMSX prefixed identifiers set by the provider cannot be set by clients. This should only apply to those identifiers that the provider supports

Requirements
properties.provider JMS reserves the 'JMSX' property name prefix for JMS defined properties. Unless noted otherwise, support for these properties is optional. The Enumeration ConnectionMetaData.getJMSXPropertyNames() method returns the names of the JMSX properties supported by a connection. Properties that may only be set by the provider include JMSXUserID, JMSXAppID, JMSXDeliveryCount, JMSXProducerTXID, JMSXConsumerTXID, JMSXRcvTimestamp and JMSXState.

testReservedWords

Verifies that using a reserved word as a property name throws an exception.

Requirements
properties.identifier.reserved Identifiers cannot be the words NULL, TRUE, FALSE, NOT, AND, OR, BETWEEN, LIKE, IN, IS, or ESCAPE. These are case-insensitive reserved words.

testValidIdentifiers

Verifies that valid identifiers may be used as property names

Requirements
properties.identifier An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true.

org.exolab.jmscts.test.message.properties.JMSXGroupTest

This class tests that connections support JMSXGroupID and JMSXGroupSeq properties

NOTE: the specification is not clear on the behaviour of null values for these properties.

testJMSGroupSeq

Verifies that the only allowed type for JMSXGroupID is an int.

Requirements
properties.group JMSXGroupID and JMSXGroupSeq are standard properties clients should use if they want to group messages. All providers must support them. JMSXGroupID is a string property. JMSXGroupSeq is an int property, starting at 1. @todo - need to verify if the range is applicable

testJMSGroupSeqRange

Verifies that JMSXGroupSeq only handles ints > 0

Requirements
properties.group JMSXGroupID and JMSXGroupSeq are standard properties clients should use if they want to group messages. All providers must support them. JMSXGroupID is a string property. JMSXGroupSeq is an int property, starting at 1. @todo - need to verify if the range is applicable

testJMSXGroupID

Verifies that the only allowed type for JMSXGroupID is a String.

Requirements
properties.group JMSXGroupID and JMSXGroupSeq are standard properties clients should use if they want to group messages. All providers must support them. JMSXGroupID is a string property. JMSXGroupSeq is an int property, starting at 1. @todo - need to verify if the range is applicable

org.exolab.jmscts.test.message.properties.PropertyConversionTest

This class tests message property conversion

testBoolean

Verifies boolean property conversion

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testByte

Verifies byte property conversion

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testDouble

Verifies double property conversion

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testFloat

Verifies float property conv ersion

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testInt

Verifies int property conversion

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testLong

Verifies long property conversion

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolea n byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testNullToPrimitive

Verifies that attempting to read a null as a primitive type is equivalent to calling the primitive's corresponding valueOf(String) conversion method with a null value.

Requirements
properties.conversion.null Attempting to read a null value as a Java primitive type must be treated as calling the primitive's corresponding valueOf(String) conversion method with a null value.

testShort

Verifies short property conversion

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testStringBoolean

Verifies string < - > boolean property conversions

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testStringByte

Verifies string < - > byte property conversions

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testStringDouble

Verifies string < - > double property conversions

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testStringFloat

Verifies string < - > float property conversions

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testStringInt

Verifies string < - > int property conversions

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testStringLong

Verifies string < - > long property conversions

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testStringObject

Verifies string < - > object property conversions

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

testStringShort

Verifies string < - > short property conversions

Requirements
properties.conversion Properties support the following conversion table. The marked cases must be supported. The unmarked cases must throw the JMS MessageFormatException.

The String to numeric conversions must throw the java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. A value set as the row type can be read as the column type.

  boolean byte short int long float double String
boolean X             X
byte   X X X X     X
short     X X X     X
int       X X     X
long         X     X
float           X X X
double             X X
String X X X X X X X X

org.exolab.jmscts.test.message.properties.PropertyTest

This class tests that message properties set before a message is sent are identical to those received.

testPropertyIntegrity

Verifies that user properties are not modified when a message is sent and subsequently received.

Requirements
properties.integrity User properties may not be modified by the provider
properties.method.getPropertyNames The order of property values is not defined. To iterate through a message's property values, use getPropertyNames to retrieve a property name enumeration and then use the various property get methods to retrieve their values. The getPropertyNames method does not return the names of the JMS standard header fields.

testPropertyNames

Verifies that JMS standard header fields are not returned by getPropertyNames().

Requirements
properties.method.getPropertyNames The order of property values is not defined. To iterate through a message's property values, use getPropertyNames to retrieve a property name enumeration and then use the various property get methods to retrieve their values. The getPropertyNames method does not return the names of the JMS standard header fields.

org.exolab.jmscts.test.message.properties.PropertyTypeTest

This class tests message property types

testObjectPropertyTypes

Verifies valid and invalid object property types.

Requirements
properties.objects The setObjectProperty method accepts values of Boolean, Byte, Short, Integer, Long, Float, Double and String. An attempt to use any other class must throw a JMS MessageFormatException.

The getObjectProperty method only returns values of null, Boolean, Byte, Short, Integer, Long, Float, Double and String. A null value is returned if a property by the specified name does not exist.

testPropertyTypes

Verifies the supported primitive property types.

Requirements
properties.types Property values can be boolean, byte, short, int, long, float, double, and String.

org.exolab.jmscts.test.message.readwrite.ReadWriteTest

This class tests that message properties and message bodies may be read and written on creation of a new message

testBytesReadableOnCreation

Verifies that attempting to read a BytesMessage on creation throws MessageNotReadableException , until BytesMessage.reset() is invoked, and that subsequent reads throw MessageEOFException

Requirements
message.bytes.creation When the message is first created, the body of the message is in write-only mode. If a client attempts to read a message in write-only mode, a MessageNotReadableException is thrown.
message.bytes.eof MessageEOFException must be thrown when an unexpected end of stream has been reached when a message is being read.
message.creation When a message is created, its message body and properties may be set.

testReadableOnCreation

Verifies that a message is readable on creation.

Requirements
message.creation When a message is created, its message body and properties may be set.

testStreamReadableOnCreation

Verifies that attempting to read a StreamMessage on creation throws MessageNotReadableException , until StreamMessage.reset() is invoked, and that subsequent reads throw MessageEOFException

Requirements
message.creation When a message is created, its message body and properties may be set.
message.stream.creation When the message is first created, the body of the message is in write-only mode. If a client attempts to read a message in write-only mode, a MessageNotReadableException is thrown.
message.stream.eof MessageEOFException must be thrown when an unexpected end of stream has been reached when a message is being read.

testWriteableOnClear

Verifies that a message is writeable after clearing its body.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testWriteableOnCreation

Verifies that a message is writable on creation.

Requirements
message.creation When a message is created, its message body and properties may be set.

org.exolab.jmscts.test.message.readwrite.SendReceiveReadWriteTest

This class tests that message properties and message bodies are writeable on send, and readable on receipt

testReadOnlyOnReceipt

Verifies that a message's user properties and body are read-only on receipt, and that they may be subsequently cleared.

Requirements
message.receive When a message is received its body is read only. If an attempt is made to change them, a MessageNotWriteableException must be thrown. If its properties or body are subsequently cleared, they are in the same state as a newly created message. TODO - need to test in transaction context

testWriteableOnSend

Verifies that the same message may be populated and sent more than once.

Req uirements
message.send After sending a message, a client may retain and modify it without affecting the message that has been sent. The same message object may be sent multiple times.

org.exolab.jmscts.test.message.stream.StreamMessageTest

This class tests the StreamMessage message type

testConversion

Verifies valid conversions for all types except String (this is handled by testStringConversion()).

Requirements
message.stream.conversion StreamMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. StreamMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testFullReadBytes

Verifies that readBytes can read an entire byte array, and returns -1 on the subsequent call.

Requirements
message.stream.method.readBytes Refer to javadoc

testIncrementalReadBytes

Verifies that readBytes can read be invoked incrementally.

Requirements
message.stream.method.readBytes Refer to javadoc

testInvalidNumericConversion

Verifies invalid string to numeric conversions.

Requirements
message.stream.conversion StreamMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. StreamMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testInvalidObject

Verifies that an invalid object being written using the writeObject() method throws MessageFormatException

Requirements
message.stream.method.writeObject Refer to javadoc

testNull

Verifies null conversions.

Requirements
message.stream.null For StreamMessage, attempting to read a null value as a Java primitive type must be treated as calling the primitive's corresponding valueOf(String) conversion method with a null value. Since char does not support a String conversion, attempting to read a null value as a char must throw NullPointerException.

NOTE: the specification is not explicit on the behaviour of invoking writeBytes() or writeString() with a null value, but an acceptable policy is to throw a NullPointerException. This is in keeping with the behaviour of DataOutputStream.

testPartialReadBytes

Verifies that invoking any read method when a partial byte array has been read throws MessageFormatException .

Requirements
message.stream.method.readBytes Refer to javadoc

testReadBytesClearBody1

Verifies that invoking readBytes() followed by clearBody() followed by readBytes() returns the expected result, when the first readBytes() call has not completed reading the array field. This verifies that clearBody() correctly clears the state of the message.

Requirements
message.stream.method.readBytes Refer to javadoc

testReadBytesClearBody2

Verifies that invoking readBytes() followed by clearBody() followed by readObject() returns the expected result, when the readBytes() call has not completed reading the array field. This ensures that clearBody() correctly clears the state of the message.

Requirements
message.stream.method.readBytes Refer to javadoc

testReadBytesReset1

Verifies that invoking readBytes() followed by reset() followed by readBytes() returns the expected result, when the first readBytes() call has not completed reading the array field. This verifies that reset() correctly resets the state of the message.

Requirements
message.stream.method.readBytes Refer to javadoc

testReadBytesReset2

Verifies that invoking readBytes() followed by reset() followed by readObject() returns the expected result, when the readBytes() call has not completed reading the array field. This verifies that reset() correctly resets the state of the message.

Requirements
message.stream.method.readBytes Refer to javadoc

testReadFailure

Verifies that if a read method throws MessageFormatException the current position of the read pointer is not incremented, and that a subsequent read is capable of recovering from the exception by re-reading the data as a different type.

Requirements
message.stream.read If a read method of a StreamMessage throws a MessageFormatException or NumberFormatException, the current position of the read pointer must not be incremented. A subsequent read must be capable of recovering from the exception by re-reading the data as a different type.

testReadWriteBytes

Verifies that readBytes returns that written by the writeBytes methods.

Requirements
message.stream.method.writeBytes(1) Refer to javadoc
message.stream.method.writeBytes(2) Refer to javadoc

testStringConversion

Verifies valid string conversions.

Requirements
message.stream.conversion StreamMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. StreamMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testWriteBytes

Verifies that invoking writeBytes does not modify the source array

Requirements
message.stream.method.writeBytes(1) Refer to javadoc
message.stream.method.writeBytes(2) Refer to javadoc

testWriteObject

Verifies that writeObject() can handle all supported types

Requirements
message.bytes.method.writeObject Refer to javadoc

org.exolab.jmscts.test.producer.ttl.ExpirationTest

This class tests message expiration

testExpiration

Verifies that messages expire.

It sends two groups of messages - one group which expires after 1 second, and another which don't expire, and verifies that after the first group should have expired, only the non-expiring group can be received.

If the JMS provider doesn't support immediate expiration of messages, the org.exolab.jmscts.test.producer.ttl.ExpirationTest.expirationInterval property should be configured in jmscts.properties to delay the test until the expired messages are collected.

Requirements
message.exp iration.zero If the time-to-live is specified as zero, expiration is set to zero to indicate that the message does not expire.
message.expiration.expired When GMT is later than an undelivered message's expiration time, the message should be destroyed. Clients should not receive messages that have expired; however, JMS does not guarantee that this will not happen.

testExpiration2DiffSubscribers

Verifies that messages to topics expire, when one subscriber is durable, and the other non-durable.

It sends two groups of messages - one group which expires after 1 second, and another which don't expire, and verifies that after the first group should have expired, only the non-expiring group can be received.

If the JMS provider doesn't support immediate expiration of messages, the org.exolab.jmscts.test.producer.ttl.ExpirationTest.expirationInterval property should be configured in jmscts.properties to delay the test until the expired messages are collected.

Requirements
message.expiration.zero If the time-to-live is specified as zero, expiration is set to zero to indicate that the message does not expire.
message.expiration.expired When GMT is later than an undelivered message's expiration time, the message should be destroyed. Clients should not receive messages that have expired; however, JMS does not guarantee that this will not happen.

testExpiration2Subscribers

Verifies that messages to topics expire, when there is more than one subscriber.

It sends two groups of messages - one group which expires after 1 second, and another which don't expire, and verifies that after the first group should have e xpired, only the non-expiring group can be received.

If the JMS provider doesn't support immediate expiration of messages, the org.exolab.jmscts.test.producer.ttl.ExpirationTest.expirationInterval property should be configured in jmscts.properties to delay the test until the expired messages are collected.

Requirements
message.expiration.zero If the time-to-live is specified as zero, expiration is set to zero to indicate that the message does not expire.
message.expiration.expired When GMT is later than an undelivered message's expiration time, the message should be destroyed. Clients should not receive messages that have expired; however, JMS does not guarantee that this will not happen.

testSingleMessageExpiration

Verifies that a single message expires.

It sends two messages - one which expires after 1 second, and another which doesn't expire, and verifies that after the first should have expired, only the non-expiring message can be received.

If the JMS provider doesn't support immediate expiration of messages, the org.exolab.jmscts.test.producer.ttl.ExpirationTest.expirationInterval property should be configured in jmscts.properties to delay the test until the expired messages are collected.

Requirements
message.expiration.zero If the time-to-live is specified as zero, expiration is set to zero to indicate that the message does not expire.
message.expiration.expired When GMT is later than an undelivered message's expiration time, the message should be destroyed. Clients should not receive messages that have expired; however, JMS does not guarantee that this will not happen.

org.exolab.jmscts.test.producer.ttl.QueueSenderTest

This class tests the behaviour of the time-to-live methods and their affect on the JMSExpiration, for QueueSender s

testDefaultTTL

Verifies that the default time-to-live for a sender equals 0 , and that the JMSExpiration property is set to 0 on send and receive when the default time-to-live is used.

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.
message.expiration.zero If the time-to-live is specified as zero, expiration is set to zero to indicate that the message does not expire.
producer.ttl.default If not specified, the default time-to-live for a producer equals 0

testDefaultTTLForAnonQueue

Verifies that the default time-to-live for a sender constructed with no destination equals 0 , and that the JMSExpiration property is set to 0 on send and receive when the default time-to-live is used.

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration hea der field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.
message.expiration.zero If the time-to-live is specified as zero, expiration is set to zero to indicate that the message does not expire.
producer.ttl.default If not specified, the default time-to-live for a producer equals 0

testSendWithTTL

Verifies that the time-to-live set at send is used when a message is sent, and that the JMSExpiration property on the received message equals that sent

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.

testSendWithTTLAndAnonQueue

Verifies that the time-to-live set at send is used when a message is sent, using a QueueSender created with no default queue, and that the JMSExpiration property on the received message equals that sent

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.

testSetTTL

Verifies that the time-to-live can be set on a sender, that the value is used when no time-to-live is provided when a message is sent, and that the JMSExpiration message property is set correctly on send and receive

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.
producer.ttl.set A client can specify a default time-to-live for messages sent by a message producer, to be used when a time-to-live isn't specified per message.

Note: the specification doesn't mention min or max values for time-to-live, or if any exceptions will be thrown if an invalid time-to-live is specified.

testSetTTLWithAnonQueue

Verifies that the time-to-live can be set on a sender created with no default queue, that the value is used when no time-to-live is provided when a message is sent, and that the JMSExpiration property on the received message equals that sent

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.
producer.ttl.set A client can specify a default time-to-live for messages sent by a message producer, to be used when a time-to-live isn't specified per message.

Note: the specification doesn't mention min or max values for time-to-live, or if any exceptions will be thrown if an invalid time-to-live is specified.

org.exolab.jmscts.test.producer.ttl.TopicPublisherTest

This class tests the behaviour of the time-to-live methods and their affect on the JMSExpiration, for TopicPublisher s

testDefaultTTL

Verifies that the default time-to-live for a publisher equals 0 , and that the JMSExpiration property is set to 0 on send and receive when the default time-to-live is used.

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.
message.expiration.zero If the time-to-live is specified as zero, expiration is set to zero to indicate that the message does not expire.
producer.ttl.default If not specified, the default time-to-live for a producer equals 0

testDefaultTTLForAnonTopic

Verifies that the default time-to-live for a publisher constructed with no destination equals 0 , and that the JMSExpiration property is set to 0 on send and receive when the default time-to-live is used.

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.
message.expiration.zero If the time-to-live is specified as zero, expiration is set to zero to indicate that the message does not expire.
producer.ttl.default If not specified, the default time-to-live for a producer equals 0

testPublishWithTTL

Verifies that the time-to-live set at publication is used when a message is sent, and that the JMSExpiration property on the received message equals that sent.

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.

testPublishWithTTLAndAnonTopic

Verifies that the time-to-live set at publication is used when a message is sent, using a TopicPublisher created with no default topic, and that the JMSExpiration property on the received message equals that sent.

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.

testSetTTL

Verifies that the time-to-live can be set on a publisher, that the value is used when no time-to-live is provided when a message is sent, and that the JMSExpiration property on the received message equals that sent.

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.
producer.ttl.set A client can specify a default time-to-live for messages sent by a message producer, to be used when a time-to-live isn't specified per mess age.

Note: the specification doesn't mention min or max values for time-to-live, or if any exceptions will be thrown if an invalid time-to-live is specified.

testSetTTLWithAnonTopic

Verifies that the time-to-live can be set on a publisher created with no default topic, that the value is used when no time-to-live is provided when a message is sent, and that the JMSExpiration property on the received message equals that sent.

Requirements
message.expiration.send When a message is sent, its expiration time is calculated as the sum of the time-to-live value specified on the send method and the current GMT value. On return from the send method, the message's JMSExpiration header field contains this value.
message.expiration.receive When a message is received its JMSExpiration header field contains the expiration as that on send.
producer.ttl.set A client can specify a default time-to-live for messages sent by a message producer, to be used when a time-to-live isn't specified per message.

Note: the specification doesn't mention min or max values for time-to-live, or if any exceptions will be thrown if an invalid time-to-live is specified.

org.exolab.jmscts.test.selector.AndOperatorTest

This class tests selectors containing the AND operator.

testAnd1

Verifies that the selector true and true selects all messages

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testAnd2

Verifies that the selector true and false selects no messages

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testAnd3

Verifies that the selector false and true selects no messages

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testAnd4

Verifies that the selector false and false selects no messages

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testAndCase

Verifies that the selector true AND true selects all messages

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.reservedwords.case Reserved words are case-insensitive.

testInvalidAnd1

Veri fies that the selector and throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalidAnd2

Verifies that the selector true and throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalidAnd3

Verifies that the selector false and throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testUnsetProperty1

Verifies that the selector true and dummy selects no messages, for the unset property 'dummy'

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty2

Verifies that the selector false and dummy selects no messages, for the unset property 'dummy'

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty3

Verifies that the selector dummy and true selects no messages, for the unset property 'dummy'

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty4

Verifies that the selector dummy and false selects no messages, for the unset property 'dummy'

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty5

Verifies that the selector dummy and dummy selects no messages, for the unset property 'dummy'

Requirements
selector.operator.and The AND operator evaluates as follows:
AND T F U
T T F U
F F F F
U U F U
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

org.exolab.jmscts.test.selector.BetweenOperatorTest

This class tests selector containing the BETWEEN operator.

testBetween1

Verifies that the selector 17 between 16 and 18 selects all messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testBetween2

Verifies that the selector 17 between 18 and 19 selects no messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testBetween3

Verifies that the selector 17 Between 17 And 17 selects all messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.reservedwords.case Reserved words are case-insensitive.

testBetween4

Verifies that the selector 17 between 4 * 4 and 10 + 8 selects all messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testBetween5

Verifies that the selector 17 between 4 * 5 and 10 + 12 selects no messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testBetween6

Verifies that the selector two between one and three selects all messages, where one, two and three are integer properties with with corresponding values

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testInvalid1

Verifies that the selector two between '1' and '3' throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid2

Verifies that the selector one between false and true throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid3

Verifies that the selector b' between 'a' and 'c' throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid4

Verifies that the selector between 1 and 3 throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid5

Verifies that the selector not between 1 and 3 throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid6

Verifies that the selector 2 between 1, 3 throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid7

Verifies that the selector 2 between 1 and throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid8

Verifies that the selector 2 between and 3 throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid9

Verifies that the selector JMSMessageID between 1 and 10 throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testNotBetween1

Verifies that the selector 17 not between 18 and 19 selects all messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNotBetween2

Verifies that the selector 17 not between 16 and 18 selects no messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNotBetween3

Verifies that the selector 17 not between 17 and 17 selects no messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNotBetween4

Verifies that the selector 17 Not Between 4 * 5 And 20 / 1 selects all messages

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.reservedwords.case Reserved words are case-insensitive.

testNotBetween5

Verifies that the selector two not between one and three selects all messages, where one, two and three are integer properties with with corresponding values

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testUnsetProperty1

Verifies that the selector dummy between 1 and 10 selects no messages, for the unset property 'dummy'

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty2

Verifies that the selector 1 between dummy and 10 selects no messages, for the unset property 'dummy'

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty3

Verifies that the selector 1 between 0 and dummy selects no messages, for the unset property 'dummy'

Requirements
selector.operator.between BETWEEN expressions are of the form: arithmetic-expr1 [NOT ] BETWEEN arithmetic-expr2 and arithmetic-expr3
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

org.exolab.jmscts.test.selector.BooleanTest

This class tests selectors containing boolean literals.

testEquals1

Verifies that the selector true = true selects all messages

Requirements
selector.comparison.boolean Boolean comparison is restricted to = and < >
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEquals2

Verifies that the selector true = false selects no messages

Requirements
selector.comparison.boolean Boolean comparison is restricted to = and < >
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testFalse

Verifies that the selector false selects no messages

Requirements
selector.literal.boolean A boolean literal is one of TRUE or FALSE.
selector.reservedwords.case Reserved words are case-insensitive.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testFalseCase

Verifies that the selector FALSE selects all messages

Requirements
selector.literal.boolean A boolean literal is one of TRUE or FALSE.
selector.reservedwords.case Reserved words are case-insensitive.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testGreaterEquals

Verifies that the selector false > = true throws InvalidSelectorException

Requirements
selector.comparison.boolean Boolean comparison is restricted to = and < >
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testGreaterThan

Verifies that the selector false > true throws InvalidSelectorException

Requirements
selector.comparison.boolean Boolean comparison is restricted to = and < >
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessEquals

Verifies that the selector false < = true throws InvalidSelectorException

Requirements
selector.comparison.boolean Boolean comparison is restricted to = and < >
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessThan

Verifies that the selector false < true throws InvalidSelectorException

Requirements
selector.comparison.boolean Boolean comparison is restricted to = and < >
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testNotEquals1

Verifies that the selector false < > true selects all messages

Requirements
selector.comparison.boolean Boolean comparison is restricted to = and < >
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNotEquals2

Verifies that the selector false < > false selects no messages

Requirements
selector.comparison.boolean Boolean comparison is restricted to = and < >
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testTrue

Verifies that the selector true selects all messages

Requirements
selector.literal.boolean A boolean literal is one of TRUE or FALSE.
selector.reservedwords.case Reserved words are case-insensitive.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testTrueCase

Verifies that the selector TrUe selects all messages

Requirements
selector.literal.boolean A boolean literal is one of TRUE or FALSE.
selector.reservedwords.case Reserved words are case-insensitive.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to f alse or unknown does not match.

org.exolab.jmscts.test.selector.EmptySelectorTest

This class tests the behaviour of empty selectors.

testEmpty

Verifies that consumer creation operations accept an empty string as a valid selector

Requirements
selector.empty If the value of a message selector is an empty string, the value is treated as a null and indicates that there is no message selector for the message consumer.

testNull

Verifies that consumer creation operations accept null as a valid selector

Requirements
selector.null A null message selector indicates that there is no message selector for the message consumer.

org.exolab.jmscts.test.selector.FloatTest

This class tests selectors containing floating point literals and objects.

testDivisionByZero

Verifies that the selector 10 / zero = 10 / zero selects all messages, when the double property 'zero' is set, with value 0.0

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testDoubleNaN1

Verifies that the selector doubleNaN = doubleNaN selects no messages, when the double property 'doubleNaN' is set, with value Double.NaN (as NaN != NaN)

Requirements
selector.expression A selector is a conditional expres sion; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testDoubleNaN2

Verifies that the selector doubleNaN < > doubleNaN selects all messages, when the double property 'doubleNaN' is set, with value Double.NaN

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEquals1

Verifies that the selector 0.0 = 0.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEquals2

Verifies that the selector 0.0 = 1.0 selects no messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A se lector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEquals3

Verifies that the selector 0.2 = 0.2 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEquals4

Verifies that the selector 0.2 = 0.0 selects no messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEquals5

Verifies that the selector 92d = 92 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific not ation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEquals6

Verifies that the selector 93f = 93 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEqualsProperty

Verifies that the selector rate = 0.2 selects all messages, when the double property 'rate' is set, with value 0.2

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testFloatNaN1

Verifies that the selector floatNaN = floatNaN selects no messages, when the float property 'floatNaN' is set, with value Float.NaN (as NaN != NaN)

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testFloatNaN2

Verifies that the selector floatNaN < > floatNaN selects all messages, when the float property 'floatNaN' is set, with value Float.NaN

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testGreaterEquals1

Verifies that the selector 2.0 > = 1.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testGreaterEquals2

Verifies that the selector 1.0 > = 2.0 selects no messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testGreaterThan1

Verifies that the selector 2.0 > 1.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testGreaterThan2

Verifies that the selector 1.0 > 2.0 selects no messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A sel ector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testInvalid1

Verifies that the selector 1.0 throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid2

Verifies that the selector -1.0 throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid3

Verifies that the selector 2.0 < '3.0' throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid4

Verifies that the selector 1.0 < > false throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presen ted. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid5

Verifies that the selector 1a.0 = 1a.0 throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessEquals1

Verifies that the selector 1.0 < = 2.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testLessEquals2

Verifies that the selector 2.0 < = 1.0 selects no messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testLessThan1

Verifies that the selector 1.0 < 2.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testLessThan2

Verifies that the selector 2.0 < 1.0 selects no messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNotEquals1

Verifies that the selector 1.0 < > 2.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric liter al is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNotEquals2

Verifies that the selector 1.0 < > 1.0 selects no messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNotEquals3

Verifies that the selector 1.0 < > 1.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNotEqualsProperty

Verifies that the selector rate < > 0.2 selects no messages, when the double property 'rate' is set, with value 0.2

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testNumericRange

Verifies that selectors can have approximate numeric literals in the range Double.MIN_VALUE..Double.MAX_VALUE , using the selector {min-value}={min-value} and {max-value} = {max-value} where {min-value} and {max-value} are the values of Double.MIN_VALUE and Double.MAX_VALUE respectively. This should select all messages.

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testUnaryMinus1

Verifies that the selector -1.0 = -1.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testUnaryMinus2

Verifies that the selector -1.0 = 1.0 selects no messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java floating-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testUnaryMinus3

Verifies that the selector --1.0 = 1.0 selects all messages

Requirements
selector.literal.approxnumeric An approximate numeric literal is a numeric value in scientific notation, such as 7E3 and -57.9E2, or a numeric value with a decimal, such as 7., -95.7, and +6.2; numbers in the range of Java double are supported. Approximate literals use the Java float ing-point literal syntax.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testUnsetProperty1

Verifies that the selector dummy + 10.0 = 10.0 selects no messages, for the unset property 'dummy'

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty2

Verifies that the selector dummy - 10.0 = -10.0 selects no messages, for the unset property 'dummy'

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty3

Verifies that the selector 10.0 + dummy = 10.0 selects no messages, for the unset property 'dummy'

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selecto r.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty4

Verifies that the selector 10.0 - dummy = 0.0 selects no messages, for the unset property 'dummy'

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty5

Verifies that the selector dummy * 10.0 = 0.0 selects no messages, for the unset property 'dummy'

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty6

Verifies that the selector 10.0 * dummy = 0.0 selects no messages, for the unset property 'dummy'

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comp arison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty7

Verifies that the selector dummy / 10.0 = 0.0 selects no messages, for the unset property 'dummy'

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

testUnsetProperty8

Verifies that the selector 10.0 / dummy = 0.0 selects no messages, for the unset property 'dummy'

Requirements
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.
selector.values.null Header fields and property values may be NULL. Comparison or arithmetic with an unknown value always yields an unknown value.

org.exolab.jmscts.test.selector.IdentifierTest

This class tests selector identifiers.

testDollars

Verifies that identifiers may contain '$' characters, using the selector $State = 'VIC' and property '$State' with value 'VIC'. This should select all messages.

Requirements
selector.identifier.name An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. This includes '_' and '$'. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testInvalid1

Verifies that the selector ~ABC = 'foo' throws InvalidSelectorException

Requirements
selector.identifier.name An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. This includes '_' and '$'. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid2

Verifies that the selector Country.name = 'Australia' throws InvalidSelectorException

Requirements
selector.identifier.name An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. This includes '_' and '$'. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testUnderscores

Verifies that identifiers may contain '_' characters, using the selector _postcode_ = '3001' and property '_postcode_' with value '3001'. This should select all messages.

Requirements
selector.identifier.name An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. This includes '_' and '$'. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testUserIdentifierCase

Verifies that user identifier names are case sensitive, using the selector country = 'Australia' , and property 'Country' with value 'Australia'. This shouldn't select any messages.

Requirements
selector.identifier.case Identifiers are case sensitive.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

org.exolab.jmscts.test.selector.JMSDeliveryModeTest

This class tests selectors containing JMSDeliveryMode

testInvalid1

Verifies that the selector JMSDeliveryMode = {non-persistent} or JMSDeliveryMode = {persistent} throws InvalidSelectorException, where {non-persistent} and {persistent} are the values of DeliveryMode.NON_PERSISTENT and DeliveryMode.PERSISTENT respectively

Requirements
selector.JMSDeliveryMode When used in a message selector JMSDeliveryMode is treated as having the values 'PERSISTENT' and 'NON_PERSISTENT'.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid2

Verifies that the selector JMSDeliveryMode = 'non_persistent' throws InvalidSelectorException.

Requirements
selector.JMSDeliveryMode When used in a message selector JMSDeliveryMode is treated as having the values 'PERSISTENT' and 'NON_PERSISTENT'.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect s elector must result in a JMS InvalidSelectorException.

testJMSDeliveryMode

Verifies that messages can be selected on JMSDeliveryMode, using the selector JMSDeliveryMode = 'PERSISTENT' or JMSDeliveryMode = 'NON_PERSISTENT' . This should select all messages

Requirements
selector.JMSDeliveryMode When used in a message selector JMSDeliveryMode is treated as having the values 'PERSISTENT' and 'NON_PERSISTENT'.
selector.identifier.header Message header field references are restricted to JMSDeliveryMode, JMSPriority, JMSMessageID, JMSTimestamp, JMSCorrelationID, and JMSType. JMSMessageID, JMSCorrelationID, and JMSType values may be null and if so are treated as a NULL value. TODO - need to test some of these in code
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

org.exolab.jmscts.test.selector.JMSPriorityTest

This class tests selectors containing JMSPriority

testInvalid1

Verifies that the selector JMSPriority > = '0' throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid2

Verifies that the selector '0' < = JMSPriority throws InvalidSelectorException

Requirements
selector.datetime Date and time values should use the standard Java long millis value. When a date or time literal is included in a message selector, it should be an integer literal for a millis value.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testJMSPriority

Verifies that messages can be selected on JMSPriority, using the selector JMSPriority < > 0 . This should select all messages

Requirements
selector.identifier.header Message header field references are restricted to JMSDeliveryMode, JMSPriority, JMSMessageID, JMSTimestamp, JMSCorrelationID, and JMSType. JMSMessageID, JMSCorrelationID, and JMSType values may be null and if so are treated as a NULL value. TODO - need to test some of these in code
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testJMSPriorityCase

Verifies that JMS identifier names are case sensitive, using the selector jmspriority between 1 and 9 . This shouldn't select any messages.

Requirements
selector.identifier.case Identifiers are case sensitive.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown d oes not match.

org.exolab.jmscts.test.selector.JMSTimestampTest

This class tests selectors containing JMSTimestamp

testInvalid1

Verifies that the selector JMSTimestamp > = '0' throws InvalidSelectorException

Requirements
selector.datetime Date and time values should use the standard Java long millis value. When a date or time literal is included in a message selector, it should be an integer literal for a millis value.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid2

Verifies that the selector '0' < = JMSTimestamp throws InvalidSelectorException

Requirements
selector.datetime Date and time values should use the standard Java long millis value. When a date or time literal is included in a message selector, it should be an integer literal for a millis value.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid3

Verifies that the selector JMSTimestamp = '2001/1/1 0:0' throws InvalidSelectorException

Requirements
selector.datetime Date and time values should use the standard Java long millis value. When a date or time literal is included in a message selector, it should be an integer literal for a millis value.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testJMSTimestamp1

Verifies that the selector JMSTimestamp > = 0 selects all messages

Requirements
selector.datetime Date and time values should use the standard Java long millis value. When a date or time literal is included in a message selector, it should be an integer literal for a millis value.
selector.identifier.header Message header field references are restricted to JMSDeliveryMode, JMSPriority, JMSMessageID, JMSTimestamp, JMSCorrelationID, and JMSType. JMSMessageID, JMSCorrelationID, and JMSType values may be null and if so are treated as a NULL value. TODO - need to test some of these in code
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testJMSTimestamp2

Verifies that the selector JMSTimestamp > = {time} selects all messages, where {time} is a literal value derived from System.currentTimeMillis()

Requirements
selector.datetime Date and time values should use the standard Java long millis value. When a date or time literal is included in a mes sage selector, it should be an integer literal for a millis value.
selector.identifier.header Message header field references are restricted to JMSDeliveryMode, JMSPriority, JMSMessageID, JMSTimestamp, JMSCorrelationID, and JMSType. JMSMessageID, JMSCorrelationID, and JMSType values may be null and if so are treated as a NULL value. TODO - need to test some of these in code
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testJMSTimestamp3

Verifies that the selector JMSTimestamp < {time} selects no messages, where {time} is a literal value derived from System.currentTimeMillis()

Requirements
selector.datetime Date and time values should use the standard Java long millis value. When a date or time literal is included in a message selector, it should be an integer literal for a millis value.
selector.identifier.header Message header field references are restricted to JMSDeliveryMode, JMSPriority, JMSMessageID, JMSTimestamp, JMSCorrelationID, and JMSType. JMSMessageID, JMSCorrelationID, and JMSType values may be null and if so are treated as a NULL value. TODO - need to test some of these in code
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

org.exolab.jmscts.test.selector.StringTest

This class tests selectors containing string literals and objects

testCaseComparison1

Verifies that string literals are case sensitive, using the selector 'abc' = 'ABC' . This shouldn't select any messages.

Requirements
selector.literal.string A string literal is enclosed in single quotes, with an included single quote represented by doubled single quote; for example, 'literal' and 'literal''s'.

String literals use the Unicode character encoding.
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testCaseComparison2

Verifies that string literals are case sensitive, using the selector 'abc' < > 'ABC' . This should select all messages.

Requirements
selector.literal.string A string literal is enclosed in single quotes, with an included single quote represented by doubled single quote; for example, 'literal' and 'literal''s'.

String literals use the Unicode character encoding.
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testCaseComparison3

Verifies that string literals are case sensitive when compared with string properties, using the selector Country = 'france' , and the string property 'Country', with value 'France'. This should select no messages.

Requirements
selector.literal.string A string literal is enclosed in single quotes, with an included single quote represented by doubled single quote; for example, 'literal' and 'literal''s'.

String literals use the Unicode character encoding.
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testCheckSingleQuotes1

Verifies that string literals can contain embedded quotes, using the selector 'it''s' = 'it''s' . This should select all messages

Requirements
selector.literal.string A string literal is enclosed in single quotes, with an included single quote represented by doubled single quote; for example, 'literal' and 'literal''s'.

String literals use the Unicode character encoding.
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testCheckSingleQuotes2

Verifies that the quotes are preserved in string literals with embedded quotes, using the selector 'it''s' = 'its' . This should select no messages

Requirements
selector.literal.string A string literal is enclosed in single quotes, with an included single quote represented by doubled single quote; for example, 'literal' and 'literal''s'.

String literals use the Unicode character encoding.
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEquals

Verifies that the selector 'abc' = 'abc' selects all messages

Requirements
selector.literal.string A string literal is enclosed in single quotes, with an included single quote represented by doubled single quote; for example, 'literal' and 'literal''s'.

String literals use the Unicode character encoding.
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testEqualsProperty

Ver ifies that the selector Country = 'France' selects all messages, when the string property 'Country' is set, with value 'France'

Requirements
selector.literal.string A string literal is enclosed in single quotes, with an included single quote represented by doubled single quote; for example, 'literal' and 'literal''s'.

String literals use the Unicode character encoding.
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.expression A selector is a conditional expression; a selector that evaluates to true matches; a selector that evaluates to false or unknown does not match.

testGreaterEquals1

Verifies that the selector 'abc' > = 'abc' throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testGreaterEquals2

Verifies that the selector dummy > = 'abc' throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testGreaterEquals3

Verifies that the selector 'abc' > = dummy throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testGreaterThan1

Verifies that the selector 'abc' > 'abc' throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testGreaterThan2

Verifies that the selector dummy > 'abc' throws InvalidSelectorException

Requirements
selector.compari son.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testGreaterThan3

Verifies that the selector 'abc' > dummy throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid1

Verifies that the selector 'abc' throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid2

Verifies that the selector 'abc' = 'abc throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid3

Verifies that the selector 'abc' = abc' throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid4

Verifies that the selector 'abc = 'abc' throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid5

Verifies that the selector 'abc'''' = 'abc' throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testInvalid6

Verifies that the selector "abc" = "abc" throws InvalidSelectorException

Requirements
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessEquals1

Verifies that the selector 'abc' < = 'abc' throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessEquals2

Verifies that the selector dummy < = 'abc' throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessEquals3

Verifies that the selector 'abc' < = dummy throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessThan1

Verifies that the selector 'abc' < 'abc' throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessThan2

Verifies that the selector dummy < 'abc' throws InvalidSelectorException

Requirements
selector.comparison.string String comparison is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

testLessThan3

Verifies that the selector 'abc' < dummy throws InvalidSelectorException

Requirements
selector.comparison.string String compariso n is restricted to = and < > Two strings are equal if and only if they contain the same sequence of characters.
selector.validation JMS providers are required to verify the syntactic correctness of a message selector at the time it is presented. A method providing a syntactically incorrect selector must result in a JMS InvalidSelectorException.

org.exolab.jmscts.test.session.AutoAckTest

This class tests the behaviour of consumers on sessions created with the Session.AUTO_ACKNOWLEDGE message acknowledgment mode.

testAutoAcknowledgement

Verifies auto acknowledgement functionality. Creates a consumer, send n messages, receives them, and closes the consumer. Creates another consumer and verifies that no messages can be received.

Requirements
session.AUTO_ACKNOWLEDGE With the AUTO_ACKNOWLEDGE session acknowledgement mode, the session automatically acknowledges a client's receipt of a message when it has either successfully returned from a call to receive or the MessageListener it has called to process the message successfully returns.

org.exolab.jmscts.test.session.clientack.ClientAcknowledgeTest

This class tests the behaviour of sessions created with the Session.CLIENT_ACKNOWLEDGE message acknowledgment mode.

testClientAcknowledge

Verifies client acknowledgement functionality. For each destination, send n messages, and then receive them. Acknowledge the last message received, recover the session, and verify that no other messages are received.

Requirements
session.CLIENT_ACKNOWLEDGE With the CL IENT_ACKNOWLEDGE session acknowledgement mode, a client acknowledges a message by calling the message's acknowledge method. Acknowledging a consumed message automatically acknowledges the receipt of all messages that have been delivered by its session.
session.recover A session's recover method is used to stop a session and restart it with its first unacknowledged message. In effect, the session's series of delivered messages is reset to the point after its last acknowledged message. The messages it now delivers may be different from those that were originally delivered due to message expiration and the arrival of higher-priority messages.

A session must set the redelivered flag of messages it redelivers due to a recovery.

testPartialClientAcknowledge

Verifies client acknowledgement functionality. For each destination, send n messages, and then receive them. Acknowledge the middle message received for each destination, recover the session, and verify that the messages can be received again. The messages received after recovery should have their JMSRedelivered flag set to true.

Requirements
session.CLIENT_ACKNOWLEDGE With the CLIENT_ACKNOWLEDGE session acknowledgement mode, a client acknowledges a message by calling the message's acknowledge method. Acknowledging a consumed message automatically acknowledges the receipt of all messages that have been delivered by its session.
session.recover A session's recover method is used to stop a session and restart it with its first unacknowledged message. In effect, the session's series of delivered messages is reset to the point after its last acknowledged message. The messages it now delivers may be diffe rent from those that were originally delivered due to message expiration and the arrival of higher-priority messages.

A session must set the redelivered flag of messages it redelivers due to a recovery.
message.redelivered.receive If a client receives a message with the JMSRedelivered indicator set, it is likely, but not guaranteed, that this message was delivered but not acknowledged in the past. In general, a provider must set the JMSRedelivered message header field of a message whenever it is redelivering a message.

testRecover

Verifies session recovery behaviour. For each destination, send n messages, and then receive them. Recover the session, and verify that the messages can be received again. The messages received after recovery should have their JMSRedelivered flag set to true.

Requirements
session.recover A session's recover method is used to stop a session and restart it with its first unacknowledged message. In effect, the session's series of delivered messages is reset to the point after its last acknowledged message. The messages it now delivers may be different from those that were originally delivered due to message expiration and the arrival of higher-priority messages.

A session must set the redelivered flag of messages it redelivers due to a recovery.
message.redelivered.receive If a client receives a message with the JMSRedelivered indicator set, it is likely, but not guaranteed, that this message was delivered but not acknowledged in the past. In general, a provider must set the JMSRedelivered message header field of a message whenever it is redelivering a message.

org.exolab.jmscts.test.session.clientack.CloseTest

This class tests the behaviour of closing sessions created with the Session.CLIENT_ACKNOWLEDGE message acknowledgment mode.

testConnectionClose

Verifies that closing a connection does not force an acknowledgement of client-acknowledged sessions.

Requirements
connection.close.session.CLIENT_ACKNOWLEDGE Closing a connection does NOT force an acknowledgement of client-acknowledged sessions.

testSessionClose

Verifies that closing a session does not force an acknowledgement of client-acknowledged sessions.

Requirements
session.close.CLIENT_ACKNOWLEDGE Closing a client-acknowledged session does NOT force an acknowledge.

org.exolab.jmscts.test.session.clientack.RepublishTest

This class tests the behaviour of republishing a received message, and then acknowledging it.

testRepublish

Verify the behaviour of republishing a received message, and then acknowledging it.

Requirements
session.CLIENT_ACKNOWLEDGE With the CLIENT_ACKNOWLEDGE session acknowledgement mode, a client acknowledges a message by calling the message's acknowledge method. Acknowledging a consumed message automatically acknowledges the receipt of all messages that have been delivered by its session.

org.exolab.jmscts.test.session.clientack.SubscriberRedeliveredTest

This class tests the behaviour of the JMSRedelivered flag when multiple topic subscribers subscribe to the same topic, and one of th e CLIENT_ACKNOWLEDGE sessions is recovered.

testJMSRedelivered

Verifies that messages received after TopicSession.recover() have their JMSRedelivered flag set to true , and that the same messages received via another TopicSession have their JMSRedelivered flag set to false .

Requirements
message.redelivered.receive If a client receives a message with the JMSRedelivered indicator set, it is likely, but not guaranteed, that this message was delivered but not acknowledged in the past. In general, a provider must set the JMSRedelivered message header field of a message whenever it is redelivering a message.

org.exolab.jmscts.test.session.CloseTest

This class tests the behaviour of Session.close

testCloseForClosedSession

Verifies that closing a closed session has no effect.

Requirements
session.close.closed Closing a closed session must NOT throw an exception.

testExceptionOnClose

Verifies that IllegalStateException is thrown for any Session method (except Session.close()) when invoking methods on a closed session.

Requirements
session.close Once a session has been closed, an attempt to use it or its message consumers and producers must throw an IllegalStateException (calls to the close method of these objects must be ignored).

org.exolab.jmscts.test.session.DupsAckTest

This class tests the behaviour of consumers on sessions created with the Session.DUPS_OK_ACKNOWLEDGE message acknowledg ment mode.

testDupsOKAcknowledgement

Verifies dups ok acknowledgement functionality. Creates a consumer, send n messages, receives them, and closes the consumer. Creates another consumer and verifies that 0-n messages are be received.

Requirements
session.DUPS_OK_ACKNOWLEDGE With the DUPS_OK_ACKNOWLEDGE session acknowledgement mode, the session lazily acknowledges the delivery of messages. This is likely to result in the delivery of some duplicate messages if JMS fails, so it should be used only by consumers that are tolerant of duplicate messages. Its benefit is the reduction of session overhead achieved by minimizing the work the session does to prevent duplicates.

org.exolab.jmscts.test.session.ListenerCloseTest

This class tests the behaviour of stopping and closing a connection while a listener is active. NOTE: Temporary destinations cannot be used as a separate connection is required to verify that the test is successful.

testSessionClose

Verify that running MessageListeners have full access to session if the session is closed.

Requirements
session.close.listeners If one or more of the connection's session's message listeners is processing a message at the point when connection close is invoked, all the facilities of the connection and its sessions must remain available to those listeners until they return control to the JMS provider.

org.exolab.jmscts.test.session.MessageListenerTest

This class tests that MessageListeners are invoked serially.

testSerialInvocation

Verifies that message listeners are invoked seri ally.

Requirements
session.listener.serialization A session serializes all asynchronous delivery of messages. While the session is busy executing one listener, all other messages to be asynchronously delivered to the session must wait.

org.exolab.jmscts.test.session.NonTransactedTest

This class verifies that methods used only for transacted sessions throw IllegalStateException if invoked

testCommit

Verifies that an IllegalStateException is thrown if Session.commit() is invoked for a non-transacted sesssion

Requirements
session.commit.IllegalStateException Invoking commit() on a non-transacted session should throw IllegalStateException

testRollback

Verifies that an IllegalStateException is thrown if Session.rollback() is invoked for a non-transacted sesssion

Requirements
session.rollback.IllegalStateException Invoking rollback() on a non-transacted session should throw IllegalStateException

org.exolab.jmscts.test.session.ReceiverCloseTest

This class tests the behaviour of closing a session while a receiver is active.

testSessionClose

Verifies that the receive timers for a closed session continue to advance, so receives may time out and return a null message while the session is stopped.

Requirements
session.close.receivers A close terminates all pending message receives on the connection's session's consumers. The receives may return with a message or null depending on whether or not there was a message available at the time of the close.

org.exolab.jmscts.test.session.transacted.CloseTest

This class tests session rollback functionality.

testRollbackForClosedConnection

Verifies that closing a connection rolls back the transactions in progress on its transacted sessions.

Requirements
connection.close.session.transacted Closing a connection must roll back the transactions in progress on its transacted sessions.

testRollbackForClosedSession

Verifies that closing a session rolls back the transaction in progress

Requirements
session.close.transacted Closing a transacted session must roll back its transaction in progress.

org.exolab.jmscts.test.session.transacted.CommitTest

This class tests session commit functionality

testCommit

Verifies session commit behaviour

Requirements
session.transactions Each transacted session supports a single series of transactions. Each transaction groups a set of produced messages and a set of consumed messages into an atomic unit of work. In effect, transactions organize a session's input message stream and output message stream into series of atomic units. When a transaction commits, its atomic unit of input is acknowledged and its associated atomic unit of output is sent.

testCommitForClosedEndpoint

Verifies that messages are sent on commit even if their producer has been closed, and that consumed m essages are acknowledged even if the consumer that received them has been closed prior to commit

Requirements
session.ack.closedconsumer A message can be acknowledged after its message consumer has closed as message acknowledgement is performed at the session level TODO - need to test this for single message acknowledgement via CLIENT_ACKWNOWLEDGE etc

org.exolab.jmscts.test.session.transacted.RecoverTest

This class verifies that methods used only for transacted sessions throw IllegalStateException if invoked

testRecover

Verifies that an IllegalStateException is thrown if Session.recover() is invoked for a transacted sesssion

Requirements
session.recover.IllegalStateException Invoking recover() on a transacted session should throw IllegalStateException

org.exolab.jmscts.test.session.transacted.RollbackTest

This class tests session rollback functionality.

testClose

Verifies that calling Session.rollback() for a closed session throws IllegalStateException

Requirements
session.close Once a session has been closed, an attempt to use it or its message consumers and producers must throw an IllegalStateException (calls to the close method of these objects must be ignored).

testRollback

Verifies session rollback behaviour

Requirements
session.rollback If a transacted session is rolled back, its produced messages are destroyed and its consumed messages are automatica lly recovered.

org.exolab.jmscts.test.topic.DuplicateDurableSubscriberTest

This class tests the behaviour of durable TopicSubscribers

testDuplicateSubscriber

Verifies that creating a duplicate subscriber in a different session but same connection throws JMSException

Requirements
subscriber.durable.unique Only one session at a time can have a TopicSubscriber for a particular durable subscription.

testDuplicateSubscriberPerSession

Verifies that creating a duplicate durable subscriber in the same session throws JMSException

Requirements
subscriber.durable.unique Only one session at a time can have a TopicSubscriber for a particular durable subscription.

org.exolab.jmscts.test.topic.DurableSubscriberTest

This class tests the behaviour of durable TopicSubscribers

testChangeSubscription

Verifies that a client can change an existing durable subscription by creating a durable subscriber with the same name and a new topic.

Requirements
subscriber.durable.changing A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name and a new topic and/or message selector. Changing a durable subscription is equivalent to deleting and recreating it.

testDurableSubscriber

Verifies that a durable subscriber can be created for a session, closed, and recreated.

Requirements
subscriber.durable If a client needs to receive all the messages published on a topic, including the ones published while the subscriber is inactive, it uses a durable TopicSubscriber. JMS retains a record of this durable subscription and insures that all messages from the topic's publishers are retained until either they are acknowledged by this durable subscriber or they have expired.

testUnsubscribe

Verifies that a durable subscriber can be created for a session, unsubscribed, and recreated

Requirements
subscriber.durable.unsubscribe TopicSessions provide the unsubscribe method for deleting a durable subscription created by their client. This deletes the state being maintained on behalf of the subscriber by its provider. It is erroneous for a client to delete a durable subscription while it has an active TopicSubscriber for it or while a message received by it is part of a current transaction or has not been acknowledged in the session. (Note: this last sentence suggests that a provider doesn't need to check that a client can remove a subscription)

org.exolab.jmscts.test.topic.NoLocalTest

This class tests the behaviour of the noLocal argument of TopicSubscriber

testNoLocal

Verifies the behaviour of the subscriber noLocal attribute

Requirements
subscriber.nolocal In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection.