Sybase WorkSpace enables you to send a message to a specified end
point in a JMS queue. This message can be defined in a stored procedure or
trigger.
Prerequisites To send a message to a
JMS queue, you must have TIBCO JMS running and an Adaptive Server Enterprise
connection profile with Real-Time Messaging configured. A message
receiver/queue must be available in the TIBCO JMS server to serve as the
endpoint, or destination, for the sent message.
- From
Enterprise Explorer, find the ASE connection
profile.
- Select the
procedural object for which you want to add messaging syntax.
Procedural Object |
How to
select |
Stored procedure |
Expand the
Stored Procedures folder, right-click the procedure, and select
Edit.
|
Trigger |
Expand the
Tables folder, expand
the table, and then the
Triggers folder.
Right-click the trigger and select
Edit. |
The procedure or trigger code appears in its associated editor.
-
In the Source page, place the cursor in the desired location within the SQL code, right-click and select
.
You can also open the wizard from the
icon on the toolbar.
-
Select
, and click
Next.
-
Select a JMS connection profile and ASE JMS provider from the corresponding drop-down menus.
The Provider Class and Provider URL fields are filled in
automatically.
-
Select a Queue.
Note: For a queue to be listed, it must exist in the TIBCO JMS
server. See your TIBCO JMS documentation for information on creating queues.
-
(Optional) When
Authentication is selected, provide a user
name and password that are configured on the TIBCO JMS provider.
The
Preview box displays the existing SQL
constructs.
-
Click
Next.
-
In the
Specify Message Body dialog, select one of the
following:
Option |
Action |
Variable
|
Provides a local variable or parameter form before the
current cursor position. Choose the variable or parameter from the drop-down.
The chosen variable or parameter becomes the message body in the current stored
procedural object definition.
|
Text |
Enter the message text, or use the Browse feature to locate
a text file for the message body.
|
Bytes |
Enter the message body in hexadecimal format. You can also
use the Browse button to locate a hexadecimal file that you can copy into the
message body.
|
Select Statement |
Select SQL... to invoke the Visual SQL dialog.
|
-
(Optional) Click
Next to specify message options.
-
Enter the message options.
Tab |
Description |
Options |
Contains the default JMS options:
|
Properties |
Customize JMS
system properties: mode, priority, correlation, reply queue, reply topic, and
time-to-live. Sybase provides default values. To change these, use the
drop-downs and check boxes where provided. The Correlation field remains dimmed
unless you select its check box.
|
User-Defined Properties |
- Click Add to
invoke the Property dialog. Use Edit and Delete to respectively edit and delete properties.
- Enter the name and
value of the property you want to add.
- Select the String
Type check box if required.
- Click OK.
The property name and value appears in the User Defined
Properties table.
|
-
Click
Finish.
Note: Because ASE messaging constructs are functions,
select appears before the messaging construct.
You can also assign the messaging function to a local variable that has already
been declared.
Send your feedback on this help topic to Sybase Technical Publications:
pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc.
For product-related issues or technical support, contact Sybase Technical Support
at 1-800-8SYBASE.