home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_06.cab / samp6iux.asp < prev    next >
Text File  |  1997-10-03  |  4KB  |  46 lines

  1.  <% If Request("DontFrame")<>1 Then Response.Redirect "/iissamples/sdk/asp/docs/SampFram.asp?ovfile=/iishelp/iis/htm/sdk/samp6iux.asp&srcfile=Queuing/RecoverableDelivery" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  3. <HTML>
  4. <HEAD>
  5. <META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
  6. <title>Recoverable Delivery</title>
  7. <script language="JavaScript">
  8.  
  9.     szNavVersion = navigator.appVersion
  10.  
  11.     if (navigator.appName == "Microsoft Internet Explorer") {
  12.     if (szNavVersion.indexOf ("4.") >= 0) {
  13.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
  14.     } else {
  15.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
  16.     }
  17.     }
  18.     else if (navigator.appName == "Netscape") {
  19.     document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
  20.     }
  21.     else {
  22.     document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
  23.     }
  24.  
  25. </script>
  26. <META NAME="DESCRIPTION" CONTENT="Internet Information Server reference information"></HEAD>
  27. <BODY BGCOLOR=#FFFFFF TEXT=#000000>
  28. <font face="Verdana, Arial, Helvetica">
  29. <h3><a name="_recoverable_delivery"></a>Recoverable Delivery</h3>
  30. <p>
  31. MSMQ provides you with a number of distinct methods for delivering messages. This sample demonstrates how to open a message queue and transmit a simple message using one type of delivery called recoverable delivery. Recoverable delivery means that message delivery is guaranteed, as MSMQ will either forward the message immediately to the queue or save it to disk. If you use recoverable delivery, you can be sure that your message will arrive at its destination, even if the computer crashes or the network is temporarily down. This guarantee is not without a price, however; recoverable delivery is slower than other forms of delivery. </p>
  32. <p>
  33. This example first creates an instance of the <b>MSMQQueueInfo</b> object, which will be used as a template for the actual queue object instances. <b>MSMQQueueInfo</b> contains a number of properties that can be used to configure the queue instances it will create, but in this sample, only the <b>PathName</b> property is set. <b>PathName</b> specifies the MSMQ pathname of the queue, and is given in the general form <i>MachineName\QueueName</i>. Note that in this example, the <i>MachineName</i> part of the MSMQ pathname is a period (.), which indicates that the queue is located on the local computer.</p>
  34. <p>
  35. The <b>MSMQQueueInfo.Open</b> method is used to create an instance of the actual queue object, <b>MSMQQueue</b>, and the variable <i>Queue</i> is set to refer to the new queue instance. </p>
  36. <p>
  37. At this point, having gained access to the IIS_SDK_EXAMPLE queue, this sample now creates a new message object by instantiating <b>MSMQMessage</b>. The reference to the instance, <i>Msg</i>, is used to set the description and content of the message using the <b>Label</b> and <b>Body</b> properties. The <b>Delivery</b> property, which indicates whether express or recoverable delivery is used, is also set at this time. For this demonstration, it has been set to indicate that MSMQ is to use recoverable delivery.</p>
  38. <p>
  39. With the message complete and the queue configured, the script is ready to send the message. The <b>MSMQMessage.Send</b> method is called to send the message to the queue pointed to by the reference <i>Queue</i>, and the queue is closed with the <b>Close</b> method. The message is now available to any other applications that have permission and inclination to access that queue. </p>
  40. <p>
  41. <b>Note</b>  This sample requires that you install MSMQ on your host machine. It also requires, prior to running this sample for the first time, that you start MSMQ Explorer and create a new queue named IIS_SDK_EXAMPLE. MSMQ Explorer can also be used after the sample is run so that you can examine the results of the script's execution.</p>
  42. <hr class="iis" size="1">
  43. <p align="center"><em><a href="/iishelp/common/colegal.htm">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
  44. </BODY>
  45. </HTML>
  46.