/Kilimanjaro_RTM/DialogPool/Scripts/4 - Run demo.sql
SQL | 53 lines | 16 code | 11 blank | 26 comment | 0 complexity | b91d6b24243f321659f2d9de7d874759 MD5 | raw file
1-------------------------------------------------------------------- 2-- Script for dialog pool sample. 3-- 4-- This file is part of the Microsoft SQL Server Code Samples. 5-- Copyright (C) Microsoft Corporation. All Rights reserved. 6-- This source code is intended only as a supplement to Microsoft 7-- Development Tools and/or on-line documentation. See these other 8-- materials for detailed information regarding Microsoft code samples. 9-- 10-- THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF 11-- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 12-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 13-- PARTICULAR PURPOSE. 14-------------------------------------------------------------------- 15 16------------------------------------------------------------------------------------ 17-- Run demo application. 18------------------------------------------------------------------------------------ 19 20USE SsbDemoDb; 21GO 22 23-------------------------------------------------------------------------- 24-- Send messages from initiator to target. 25-- Initiator uses dialogs from the dialog pool. 26-- Initiator also retires dialogs based on application criteria, 27-- which results in recycling dialogs in the pool. 28-------------------------------------------------------------------------- 29exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message1.</xml>' 30exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message2.</xml>' 31exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message3.</xml>' 32exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message4.</xml>' 33exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message5.</xml>' 34GO 35 36-- Show the dialog pool 37SELECT * FROM DialogPool; 38GO 39 40-- Show the dialogs used. 41SELECT * FROM sys.conversation_endpoints; 42GO 43 44-- Check whether the TARGET side has processed the messages 45SELECT * FROM MsgTable; 46GO 47 48TRUNCATE TABLE MsgTable; 49GO 50 51 52 53