PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/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. -- Run demo application.
  17. ------------------------------------------------------------------------------------
  18. USE SsbDemoDb;
  19. GO
  20. --------------------------------------------------------------------------
  21. -- Send messages from initiator to target.
  22. -- Initiator uses dialogs from the dialog pool.
  23. -- Initiator also retires dialogs based on application criteria,
  24. -- which results in recycling dialogs in the pool.
  25. --------------------------------------------------------------------------
  26. exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message1.</xml>'
  27. exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message2.</xml>'
  28. exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message3.</xml>'
  29. exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message4.</xml>'
  30. exec usp_send 'SsbInitiatorService', 'SsbTargetService', 'SsbContract', 'SsbMsgType', '<xml>This is a well formed XML Message5.</xml>'
  31. GO
  32. -- Show the dialog pool
  33. SELECT * FROM DialogPool;
  34. GO
  35. -- Show the dialogs used.
  36. SELECT * FROM sys.conversation_endpoints;
  37. GO
  38. -- Check whether the TARGET side has processed the messages
  39. SELECT * FROM MsgTable;
  40. GO
  41. TRUNCATE TABLE MsgTable;
  42. GO