10.07.2015 Views

Using TCP Adapters with Ensemble - InterSystems Documentation

Using TCP Adapters with Ensemble - InterSystems Documentation

Using TCP Adapters with Ensemble - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Using</strong> the AdapterAn <strong>Ensemble</strong> production continues running until it is stopped, either programmatically or by an administrator using theManagement Portal. When a production stops, the following events related to outbound adapters occur:1. <strong>Ensemble</strong> waits for each business operation to reach a quiescent state (that is, <strong>Ensemble</strong> waits until each businessoperation has completed all of its synchronous requests).2. The OnTearDown() method in each outbound adapter is called.3. All outbound adapter and business operation objects are destroyed and their background processes are killed.4. Each business operation’s OnProductionStop class method is called, once for each configured item of that class inthe production.When a business operation is disabled by a system administrator, or becomes inactive according to its configured schedule,the production continues to run but the associated outbound adapter is shut down, and its OnTearDown() method is executed,as described above.3.2 <strong>Using</strong> the AdapterOnce you determine that your production needs the EnsLib.<strong>TCP</strong>.CountedOutboundAdapter, you can include it in the productionconfiguration as follows:1. Choose or create a business operation class that uses the EnsLib.<strong>TCP</strong>.CountedOutboundAdapter.2. If you create a new business operation class, be sure to:• Add at least one method to the method map.• Implement each method in the method map.• Write the business operation methods so that they call methods from the EnsLib.<strong>TCP</strong>.CountedOutboundAdapterclass.• Compile the new class.3. Configure the production. Add a business operation of the chosen class.4. Configure the new business operation. To do so, click it and specify values for the settings on the right.To enable it, select the Enabled box.The next sections provide details.3.3 Creating a New Business Operation ClassThe simplest way to deploy the EnsLib.<strong>TCP</strong>.CountedOutboundAdapter is to choose an existing business operation class thatalready uses it.If no existing class has the functionality you need, create a business operation class that uses theEnsLib.<strong>TCP</strong>.CountedOutboundAdapter. Create the new class in Studio as follows:1. From the File menu, choose New. A dialog pops up. Edit it as follows:• Click on the Production tab.• Select the Business Operation icon and click OK.<strong>Using</strong> <strong>TCP</strong> <strong>Adapters</strong> <strong>with</strong> <strong>Ensemble</strong> 15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!