You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Alexandre SAPANEL <al...@photobox.com> on 2011/09/24 11:00:05 UTC

Asynchronous process and correlation problem

Hi,



Here is the use case :

I’ve got a BPEL process with an invoke and a receive activity with
correlation.

When the receive activity is called too quickly (1 or 2 seconds after the
invoke), Apache ODE cannot find any route for incoming message correlation

But when I wait 10 seconds before invoking the receive activity, everything
works well and the correlation is done correctly.



It seems that Apache ODE has not enough time to persist correlation keys
after the invoke and when the receive is called too quickly then it
considers that the message cannot be correlated.



Is there any way to handle this case ? Is there any retry/redelivering
message mechanism to configure in Apache ODE when a route cannot be found ?



Any help would be appreciated



Thanks



Alexandre

Re: Asynchronous process and correlation problem

Posted by Waruna Ranasinghe <wa...@gmail.com>.
Hi

Can you try the following patch attached to -
https://issues.apache.org/jira/browse/ODE-942

<https://issues.apache.org/jira/browse/ODE-942>Thanks,
Waruna

On 29 September 2011 10:53, Waruna Ranasinghe <wa...@gmail.com> wrote:

> Hi Alexandre,
>
> We were using ODE with OpenJPA. But we are not facing such an issue.
> May be this is relate to these issues - [1, 2]
>
> I'll try to provide you with a patch for ODE asap. So that you can try it
> out.
>
> [1] -
> https://wso2.org/jira/browse/CARBON-10628?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs
> [2] - https://issues.apache.org/jira/browse/ODE-894
>
> Thanks,
> Waruna
> <https://issues.apache.org/jira/browse/ODE-894>
> On 29 September 2011 00:29, Alexandre SAPANEL <
> alexandre.sapanel@photobox.com> wrote:
>
>> Hi Tammo,
>>
>> I'm working with Apache ODE 1.3.5 with Mysql and OpenJPA (and cannot move
>> to Hibernate due to technical constraints).
>> I found a dirty and not acceptable solution which consists on using Mex
>> interceptor and add a Thread.sleep(10000) in the ' onProcessInvoked'
>> method ...
>> Thus I am sure that the correlation key is saved (transaction commited by
>> ODE) before the process instance receives a callback...
>> Any other idea ?
>> Thanks
>>
>> -----Message d'origine-----
>> De : Tammo van Lessen [mailto:tvanlessen@gmail.com]
>> Envoyé : mercredi 28 septembre 2011 16:11
>> À : user@ode.apache.org
>> Objet : Re: Asynchronous process and correlation problem
>>
>> Hi Alexandre,
>>
>> which version of ODE, which database and which DAO implementation do
>> you use? This functionality is actually available and should work as
>> expected. However, it heavily depends on database locks, so it will
>> perhaps not fully work with derby. I recommend MySQL or any other
>> MVCC-enabled database. Also, I remember some issues of this kind with
>> the OpenJPA DAO layer, so I recommend to give the hibernate
>> implementation a try.
>>
>> HTH,
>>  Tammo
>>
>> On Sat, Sep 24, 2011 at 11:00, Alexandre SAPANEL
>> <al...@photobox.com> wrote:
>> > Hi,
>> >
>> >
>> >
>> > Here is the use case :
>> >
>> > I’ve got a BPEL process with an invoke and a receive activity with
>> > correlation.
>> >
>> > When the receive activity is called too quickly (1 or 2 seconds after
>> the
>> > invoke), Apache ODE cannot find any route for incoming message
>> correlation
>> >
>> > But when I wait 10 seconds before invoking the receive activity,
>> everything
>> > works well and the correlation is done correctly.
>> >
>> >
>> >
>> > It seems that Apache ODE has not enough time to persist correlation keys
>> > after the invoke and when the receive is called too quickly then it
>> > considers that the message cannot be correlated.
>> >
>> >
>> >
>> > Is there any way to handle this case ? Is there any retry/redelivering
>> > message mechanism to configure in Apache ODE when a route cannot be
>> found ?
>> >
>> >
>> >
>> > Any help would be appreciated
>> >
>> >
>> >
>> > Thanks
>> >
>> >
>> >
>> > Alexandre
>> >
>>
>>
>>
>> --
>> Tammo van Lessen - http://www.taval.de
>>
>
>
>
> --
> -----------------------------------------------------
> Regards,
> Waruna Ranasinghe
>
> mob: 0724318285
> blog: http://warunapw.blogspot.com
> twitter: http://twitter.com/warunapww
> http://lk.linkedin.com/in/waruna
> www.facebook.com/waruna.ranasinghe
>



-- 
-----------------------------------------------------
Regards,
Waruna Ranasinghe

mob: 0724318285
blog: http://warunapw.blogspot.com
twitter: http://twitter.com/warunapww
http://lk.linkedin.com/in/waruna
www.facebook.com/waruna.ranasinghe

Re: Asynchronous process and correlation problem

Posted by Waruna Ranasinghe <wa...@gmail.com>.
Hi Alexandre,

We were using ODE with OpenJPA. But we are not facing such an issue.
May be this is relate to these issues - [1, 2]

I'll try to provide you with a patch for ODE asap. So that you can try it
out.

[1] -
https://wso2.org/jira/browse/CARBON-10628?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs
 [2] - https://issues.apache.org/jira/browse/ODE-894

Thanks,
Waruna
<https://issues.apache.org/jira/browse/ODE-894>
On 29 September 2011 00:29, Alexandre SAPANEL <
alexandre.sapanel@photobox.com> wrote:

> Hi Tammo,
>
> I'm working with Apache ODE 1.3.5 with Mysql and OpenJPA (and cannot move
> to Hibernate due to technical constraints).
> I found a dirty and not acceptable solution which consists on using Mex
> interceptor and add a Thread.sleep(10000) in the ' onProcessInvoked'
> method ...
> Thus I am sure that the correlation key is saved (transaction commited by
> ODE) before the process instance receives a callback...
> Any other idea ?
> Thanks
>
> -----Message d'origine-----
> De : Tammo van Lessen [mailto:tvanlessen@gmail.com]
> Envoyé : mercredi 28 septembre 2011 16:11
> À : user@ode.apache.org
> Objet : Re: Asynchronous process and correlation problem
>
> Hi Alexandre,
>
> which version of ODE, which database and which DAO implementation do
> you use? This functionality is actually available and should work as
> expected. However, it heavily depends on database locks, so it will
> perhaps not fully work with derby. I recommend MySQL or any other
> MVCC-enabled database. Also, I remember some issues of this kind with
> the OpenJPA DAO layer, so I recommend to give the hibernate
> implementation a try.
>
> HTH,
>  Tammo
>
> On Sat, Sep 24, 2011 at 11:00, Alexandre SAPANEL
> <al...@photobox.com> wrote:
> > Hi,
> >
> >
> >
> > Here is the use case :
> >
> > I’ve got a BPEL process with an invoke and a receive activity with
> > correlation.
> >
> > When the receive activity is called too quickly (1 or 2 seconds after
> the
> > invoke), Apache ODE cannot find any route for incoming message
> correlation
> >
> > But when I wait 10 seconds before invoking the receive activity,
> everything
> > works well and the correlation is done correctly.
> >
> >
> >
> > It seems that Apache ODE has not enough time to persist correlation keys
> > after the invoke and when the receive is called too quickly then it
> > considers that the message cannot be correlated.
> >
> >
> >
> > Is there any way to handle this case ? Is there any retry/redelivering
> > message mechanism to configure in Apache ODE when a route cannot be
> found ?
> >
> >
> >
> > Any help would be appreciated
> >
> >
> >
> > Thanks
> >
> >
> >
> > Alexandre
> >
>
>
>
> --
> Tammo van Lessen - http://www.taval.de
>



-- 
-----------------------------------------------------
Regards,
Waruna Ranasinghe

mob: 0724318285
blog: http://warunapw.blogspot.com
twitter: http://twitter.com/warunapww
http://lk.linkedin.com/in/waruna
www.facebook.com/waruna.ranasinghe

RE: Asynchronous process and correlation problem

Posted by Alexandre SAPANEL <al...@photobox.com>.
Hi Tammo,

I'm working with Apache ODE 1.3.5 with Mysql and OpenJPA (and cannot move
to Hibernate due to technical constraints).
I found a dirty and not acceptable solution which consists on using Mex
interceptor and add a Thread.sleep(10000) in the ' onProcessInvoked'
method ...
Thus I am sure that the correlation key is saved (transaction commited by
ODE) before the process instance receives a callback...
Any other idea ?
Thanks

-----Message d'origine-----
De : Tammo van Lessen [mailto:tvanlessen@gmail.com]
Envoyé : mercredi 28 septembre 2011 16:11
À : user@ode.apache.org
Objet : Re: Asynchronous process and correlation problem

Hi Alexandre,

which version of ODE, which database and which DAO implementation do
you use? This functionality is actually available and should work as
expected. However, it heavily depends on database locks, so it will
perhaps not fully work with derby. I recommend MySQL or any other
MVCC-enabled database. Also, I remember some issues of this kind with
the OpenJPA DAO layer, so I recommend to give the hibernate
implementation a try.

HTH,
  Tammo

On Sat, Sep 24, 2011 at 11:00, Alexandre SAPANEL
<al...@photobox.com> wrote:
> Hi,
>
>
>
> Here is the use case :
>
> I’ve got a BPEL process with an invoke and a receive activity with
> correlation.
>
> When the receive activity is called too quickly (1 or 2 seconds after
the
> invoke), Apache ODE cannot find any route for incoming message
correlation
>
> But when I wait 10 seconds before invoking the receive activity,
everything
> works well and the correlation is done correctly.
>
>
>
> It seems that Apache ODE has not enough time to persist correlation keys
> after the invoke and when the receive is called too quickly then it
> considers that the message cannot be correlated.
>
>
>
> Is there any way to handle this case ? Is there any retry/redelivering
> message mechanism to configure in Apache ODE when a route cannot be
found ?
>
>
>
> Any help would be appreciated
>
>
>
> Thanks
>
>
>
> Alexandre
>



--
Tammo van Lessen - http://www.taval.de

Re: Asynchronous process and correlation problem

Posted by Tammo van Lessen <tv...@gmail.com>.
Hi Alexandre,

which version of ODE, which database and which DAO implementation do
you use? This functionality is actually available and should work as
expected. However, it heavily depends on database locks, so it will
perhaps not fully work with derby. I recommend MySQL or any other
MVCC-enabled database. Also, I remember some issues of this kind with
the OpenJPA DAO layer, so I recommend to give the hibernate
implementation a try.

HTH,
  Tammo

On Sat, Sep 24, 2011 at 11:00, Alexandre SAPANEL
<al...@photobox.com> wrote:
> Hi,
>
>
>
> Here is the use case :
>
> I’ve got a BPEL process with an invoke and a receive activity with
> correlation.
>
> When the receive activity is called too quickly (1 or 2 seconds after the
> invoke), Apache ODE cannot find any route for incoming message correlation
>
> But when I wait 10 seconds before invoking the receive activity, everything
> works well and the correlation is done correctly.
>
>
>
> It seems that Apache ODE has not enough time to persist correlation keys
> after the invoke and when the receive is called too quickly then it
> considers that the message cannot be correlated.
>
>
>
> Is there any way to handle this case ? Is there any retry/redelivering
> message mechanism to configure in Apache ODE when a route cannot be found ?
>
>
>
> Any help would be appreciated
>
>
>
> Thanks
>
>
>
> Alexandre
>



-- 
Tammo van Lessen - http://www.taval.de