Progress
External Program
Interfaces


Methods In the Session Objects

Table C–1 provides a brief description of the methods in the Session Objects. For complete information and syntax, see the "Session Objects" section in "Accessing SonicMQ Messaging From the Progress 4GL" or the "4GL–JMS API Alphabetical Reference" section in this appendix.

Table C–1: Methods In the Session Objects
Method
Purpose
Procedure connects to the SonicMQ Adapter and starts a JMS connection and session.
Procedure allows applications to view messages in a queue without consuming them.
Procedure cancels a durable subscription.
Procedure acknowledges all messages received up to that point in the current transaction.
Procedure sends all messages published (or sent to a queue) up to that point in the current transaction.
Procedure creates a new BytesMessage.
Procedure creates a new HeaderMessage.
Procedure creates a new MapMessage.
Procedure creates a new Message Consumer.

Procedure creates a multipart message and returns a handle to it.

Procedure creates a new StreamMessage.
Procedure creates a new TextMessage.
Procedure creates a new XMLMessage.
Procedure closes a session and its underlying connection and deletes the session procedure.
Function returns the value set by the preceding setAdapterService. Null is returned if setAdapterService was not called.
Function returns the value set by the preceding setBrokerURL.
Function returns the value set by the preceding setClientID. Null is returned if setClientID was not called.
Function returns the AppServer connection ID.
Function returns a comma-separated list of connection and provider attributes.
Function returns comma-separated list of Sonic Broker URLs for the client to try to connect to.
Function returns the value specified by setDefaultPersistency value.
Function returns the value specified by setDefaultPriority; it returns 4 if setDefaultPriority was not called.
Function returns the value specified by setDefaultTimeToLive.
Function returns the value specified by setLoadBalancing.
Function returns the value set by the preceding setJmsServerName.
Function returns the value set by the preceding setPassword.

Function returns the value set by the preceding setSequential.

Function returns the value set by the preceding setSingleMessageAcknowledgement
Function returns the value set by the preceding setTransactedReceive.
Function returns the value set by the preceding setTransactedSend.
Function returns the value set by the preceding setUser.
Procedure publishes a message to topicName.
Procedure receives messages from queueName.
Procedure starts redelivering all unacknowledged messages received up to that point in the current session.
Procedure sends a message to a destination and designates the messageConsumer parameter for processing replies.
Procedure starts redelivering the messages received up to that point in the current transaction.
Procedure discards all messages sent up to that point in the current transaction.
Procedure sends a message to queueName.
Procedure specifies the service name under which the SonicMQ Adapter is registered with the NameServer; the default is adapter.progress.jms.
Procedure sets the value of the SonicMQ broker URL.
Procedure sets the clientID value for the SonicMQ broker connection and overwrites the default clientID set on the server side.
Procedure specifies a list of brokerURLs for the client to try to connect to.
Procedure sets the default message persistency value for all messages sent in that session.
Procedure sets the default message priority for all messages sent in that session.
Procedure sets the default time to live.
Procedure handles asynchronous conditions.
Procedure specifies the JMS broker implementation, SonicMQ.
Procedure enables or disables client-side load balancing.
Procedure turns the automatic display of synchronous errors and conditions on and off.
Procedure sets the password value for the SonicMQ broker login and overwrites the default password property set on the SonicMQ Adapter side.
Procedure specifies the interval in seconds for the JMS Adapter to actively ping the SonicMQ broker so communication failure can be detected promptly.
Procedure sets the number of messages a Sonic client can retrieve in a single operation from a queue containing multiple messages.
Procedure determines when the Sonic client goes back to the broker for more messages.

Procedure lets the application control whether clients try connecting to brokers in a connection list sequentially or randomly. To attempt load balancing, request randomly.

Procedure lets an application turn on single-message acknowledgement for a client session.

Procedure makes a session transacted for receiving; a session is not transacted by default.
Procedure makes a session transacted for sending; a session is not transacted by default.
Procedure sets the user value for the SonicMQ broker login and overwrites the default user property set on the SonicMQ Adapter side.
Procedure starts receiving messages after creating a new session or after calling stopReceiveMessages.
Procedure causes the SonicMQ Adapter broker to stop receiving messages on behalf of the 4GL client and to stop sending messages already received by the SonicMQ Adapter broker for the 4GL client.
Procedure subscribes to topicName. The messages are handled asynchronously by the messageConsumer object.
Procedure waits and processes events as long as the user-defined function returns true and there is no period of more than the specified number of seconds in which no messages are received.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095