[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] This sets the entire application up for queued execution. This doesn't mean that all components within this applications will be queued at all times. This just means that this application in general can execute components queued. The actual queuing of components is activated on an interface-by-interface basis. The second setting activates the "listening mechanism" which automatically checks the queue for calls made to the queued components. This is a very handy setting, because we can simply turn this off to simulate a disconnected environment (otherwise, the asynchronous processing in our examples would take place so quickly, we wouldn't even notice it). Now that we have the new application, let's also set up the actual component. To do so, right-click the "Components" node and select the "New" option from the menu. Simply add the Hospital.DLL as a plain COM component. Once that is done, we also need to specify the interfaces that are supposed to be executed in a queued fashion. Drill down into the component until you see the interface "Iordermedicine" and Note that we are not interested in any security settings at this point. Typically, application as well as component security should be turned of on the items we just created. However, it cannot hurt to check these settings. They can be viewed in the application property dialog as well as the component property dialog. Both have a "Security" page. Make sure the "Enforce access checks…" checkbox is NOT checked. Now that we set up this queued application, COM+ automatically created queues in the Queuing Services. We don't have to interfere with any of those settings, but it is interesting to take a look. To do so, activate the "Computer Management" tool (Start/Programs/Administrative Tools/Computer Management) and drill down to Services and Applications\Message Queuing\Private Queues. In this folder you will find several queues that are generated automatically and are named depending on the name of your queued application. In our example the queues are named "hospital", "hospital_0" through "hospital_4" and "hospital_deadqueue". The first 6 queues are used to route messages (the longer it takes for a message to be delivered, the higher the queue number it is located in). If there is a problem and the message can not be delivered, it ends up in the "deadqueue" (see below). [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] |