[
https://issues.apache.org/jira/browse/ODE-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Karthick Sankarachary updated ODE-262:
--------------------------------------
Attachment: unique-correlation-set-for-branch.patch
The attached patch implements the "unique" attribute extension on the
<correlationSet> element as shown below:
<correlationSet name="name" properties="p1 p2 ..." unique="yes|no">
To illustate its use, we apply this attribute to the classical counter example
described above. In order to keep duplicate "init" messages from instantiating
multiple (process) instances, you will need to constrain the correlation set
defined on that message type to be "unique", like so:
<b:correlationSets>
- <b:correlationSet name="name" properties="t:counterProp"/>
+ <b:correlationSet name="name" properties="t:counterProp" unique="yes"/>
</b:correlationSets>
Consequently, every time that correlation set is initialized in a start
activity, the server will check to see if there are any instances running with
that correlation value. If such an instance does exist, then the server
responds with an appropriate SOAP fault message. If, and only if, no such
instance is found, does the server create a new instance.
By way of an example, the first time you send an "init" message with the name
"foo", as shown below, the server will start a new instance with that name.
<soapenv:Body>
<coun:init>
<name>foo</name>
</coun:init>
</soapenv:Body>
The second time you send an "init" message with the same name ("foo"), you will
get a fault message back, as shown below:
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring
xmlns:axis2ns1="http://www.apache.org/ode/type/extension">axis2ns1:duplicateInstance</faultstring>
<detail>
<fault xmlns="http://www.apache.org/ode/type/extension">Found a
duplicate instance with the same message key</fault>
</detail>
</soapenv:Fault>
</soapenv:Body>
On the other hand, if you send an "init" message with a different name (say
"bar"), as shown below, then the server will go ahead and start another
instance with the new name.
<soapenv:Body>
<coun:init>
<name>bar</name>
</coun:init>
</soapenv:Body>
Note that care was taken to deal with race conditions caused by duplicate
messages that arrive at the exact same instant. As for the proposed extension
to make correlation sets durable, that has been deferred for now, in part
because it involves a performance penalty.
> Duplicated correlation set values is accepted and creates a second instance
> instead of throwing an exception
> ------------------------------------------------------------------------------------------------------------
>
> Key: ODE-262
> URL: https://issues.apache.org/jira/browse/ODE-262
> Project: ODE
> Issue Type: Bug
> Components: BPEL Runtime
> Affects Versions: 1.1.1
> Environment: Apache ODE 1.1.1 or 1.2
> Tomcat
> The counter example of infoq.
> Reporter: Amin Anjomshoaa
> Assignee: Karthick Sankarachary
> Fix For: 2.0
>
> Attachments: unique-correlation-set-for-branch.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The classical counter example of infoq
> (http://www.infoq.com/articles/paul-brown-ode) can be used. Sending the
> "init" message for the second (third, fourth, ... ) time with the value "foo"
> will create a new instance. I was expecting a CorrelationViolation exception
> when the second init message is arriving.
> All upcoming messages are then correlated with the last instance only.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.