Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
<html>
<head>
<link rel="stylesheet" href="../jquery-ui-1.9.2.custom/css/smoothness/jquery-ui-1.9.2.custom.min.css">
<link rel="stylesheet" href="../jquery-ui-1.9.2.custom/development-bundle/demos/demos.css">
<script src="../jquery-ui-1.9.2.custom/js/jquery-1.8.3.js"></script>
<script src="../jquery-ui-1.9.2.custom/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="examples.js"></script>
</head>
<body>
<h2 align="center">Out of Process : Consumer : Is correlation on a different method?</h2>
<p class="helpNote" style="font-size:12;font-weight:bold">
This section is used to specify the correlation read point, if your continuing transaction
is different from where your correlated payload needs to be read.
</p>
<div id="exampleTabs">
<ul>
<li><a href="#exampleTabs-1">Example 1 (Nested)</a></li>
</ul>
<div id="exampleTabs-1">
<p class="helpCode" style="font-size:11;font-style:italic">
package com.packagename;<br>
public class ConsumerClassName {<br>
<br>
     private void receive() {<br>
         continuingTransaction(inStream);<br>
     }<br>
<br>
     private void continuingTransaction(Stream inStream) {<br>
         CustomPayload payload = readCorrelation(inStream);<br>
         payload.getMessage();<br>
     }
</p>
<p class="helpStar" style="font-size:11;font-style:italic;color:red;font-weight:bold">
     private CustomPayload readCorrelation(Stream inStream) {<br>
         CustomPayload payload = inStream.readObject();<br>
         return payload;<br>
     }<br>
</p>
<p class="helpCode" style="font-size:11;font-style:italic">
}
</p>
<p class="helpNote" style="font-size:12">
In the above example continuingTransaction(Stream inStream) of class com.packagename.ConsumerClassName is the continuing transaction while,
readCorrelation(Stream inStream) of class com.packagename.ConsumerClassName is the nested method that reads the correlation header from the payload.
</p>
<hr/>
<p class="helpValues" style="font-size:12;color:blue;">
<b>Values to put in this section of the tool for the above example.<br></b>
Match Type: Matches Class<br>
Full Class Name: com.yourpackagename.ConsumerClassName <br>
Method Name: readCorrelation <br>
Method Parameters: Stream inStream
</p>
</div>
<div id="exampleTabs-2">
<p class="helpCode" style="font-size:11;font-style:italic">
package com.packagename;<br>
public class ConsumerClassName {<br>
<br>
     private void receive() {<br>
         CustomPayload payload = readCorrelation(instream);<br>
         // do some work<br>
         continuingTransaction(payload);<br>
     }<br>
<br>
     private void continuingTransaction(CustomPayload payload) {<br>
         payload.getMessage();<br>
     }
</p>
<p class="helpStar" style="font-size:11;font-style:italic;color:red;font-weight:bold">
     private CustomPayload readCorrelation(Stream inStream) {<br>
         CustomPayload payload = inStream.readObject();<br>
         return payload;<br>
     }<br>
</p>
<p class="helpCode" style="font-size:11;font-style:italic">
}
</p>
<p class="helpNote" style="font-size:12">
In the above example continuingTransaction(CustomPayload payload) of class com.packagename.ConsumerClassName is the continuing transaction which is called downstream,
while readCorrelation(Stream inStream) of class com.packagename.ConsumerClassName is the called first that reads the correlation header from the payload.
</p>
<hr/>
<p class="helpValues" style="font-size:12;color:blue;">
<b>Values to put in this section of the tool for the above example.<br></b>
Match Type: Matches Class<br>
Full Class Name: com.yourpackagename.ConsumerClassName <br>
Method Name: readCorrelation <br>
Method Parameters: Stream inStream
</p>
</div>
</div>
</body>
</html>