Re: Integrating Calabash in a Web application

Hmmm. I don't think runtime.xprocData is thread safe either.

If I create 2 copies of similar xpipeline from same runtime and execute 
them in two different threads, I start getting 
ArrayIndexOutOfBoundsException in XTry.java > catch block where 
XProcData.errors is requested and traversed (my pipeline can throw 
p:error on certain conditions).

So didn't do anything smart and just made all public methods on 
XProcData object to be synchronized for confirmation and this seems to 
fix this issue.

Don't know where is it going though :)

Note: I personally think there is a bug in implementation of p:error as 
far as error propagation is concerned, I'll file that bug separately.

Alam Sher

On 2/9/2011 4:03 PM, Florent Georges wrote:
> On 9 February 2011 01:36, Alam Sher wrote:
>
>> I create 10 runtime with say a set of 20  different loaded pipelines each.
>> I'll have a pool of 200 (10 instances of an identical pipeline each)
>> pipelines this way.
>    I think you don't even need to create several runtime objects.  Just
> have one, and load several times the pipelines in your cache.  And be
> sure to properly release unused pipelines, under all conditions.
>
>    But this has to be confirmed, and anyway I think this is an area
> within which you will have to investigate on your own, including
> getting familiar with the overall internals architecture of Calabash
> (really, it's not that complex).
>
>    And yes, I am interested by your results ;-)
>
>    Regards,
>


-- 
*Alam Sher Khan*
Lead Engineer, Billing & Integration
http://www.AdvOSS.com
+92 321 512 6543

Received on Wednesday, 9 February 2011 12:32:01 UTC