Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Appendix C SSOLite Stored Procedures : Control Procedures : SW_SET_MBOX

SW_SET_MBOX
The SW_SET_MBOX procedure tells the current SSOLite session to use a different Mbox set from the default one.
Syntax
SW_SET_MBOX (
mbox_set_id in number(5))
where:
mbox_set_id is a unique identifier for the Mbox set you want to use.
Notes
This procedure is useful to partition messages for the purpose of performance or service levels. The procedure can be used in many ways, including for separating out bulk operations, such as purging or starting cases. Other sessions will still use the default Mbox set for operations such as delayed releases.
Use the SW_UNSET_MBOX procedure to restores using the default Mbox set for all operations.
Example
The following example shows how to set another Mbox set BGMBSETB for bulk operations. Remember to create the bgmboxtable3 and bgmboxtable4 tables, and the bgmboxqueue3 and bgmboxqueue4 AQ first. For more information about queue processing and Mbox set creation, see Processing Queues.

 
# Step 1. Add two new message queues.
#
swadm add_queue BGMBOX3 Local 0001::bgmboxtable3:bgmboxqueue3
swadm add_queue BGMBOX4 Local 0001::bgmboxtable4:bgmboxqueue4

# Step 2. Add a new Mbox set.
#
swadm add_mboxset BGMGSETB Local

# Step 3. View Mbox and queue IDs.
#
swadm show_mboxsets v
swadm show_queues

# Step 4. Add the BGMBOX3
and BGMBOX4 message queues to the BGMGSETB Mbox set (
6 is the Mboxset ID of the BGMGSETB Mbox set,
8 is the queue ID of the BGMBOX3 message queue, and
9 is the queue ID of the BGMBOX4 message queue.)
#
swadm add_queue_to_mboxset 6 8
swadm add_queue_to_mboxset 6 9

# Step 5. Set the BGMGSETB Mbox set for bulk case starts.
#
EXEC ssolite.SW_SET_MBOX(6);

# Step 6. Start the bulk cases.
#
declare
casenum numeric(20);
reqid numeric(20);
begin
ssolite_data.SW_ADD_PACK_DATA ('CustName', 'Allsop, J.A.');
ssolite_data.SW_ADD_PACK_DATA ('CustID', '478163');
ssolite.SW_CASESTART ('CUSTREQ', -1, -1, 'Refund request', 'user35', '', casenum, reqid);

end;
/
commit;

# Step 7. Restore using the default Mbox set.
#
EXEC ssolite.SW_UNSET_MBOX();

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved