Re: Integrating Calabash in a Web application

On 9 February 2011 00:06, Alam Sher wrote:

  Hi,

> Also I would like to cache each pipeline in a way that I don't
> have to initiate it again and again and just execute it with the input
> document in source port.

  Of course, Norm will give you more accurate answers, but from
my own experience, the short answer is no.  This is because
XPipeline is both the compiled form and the runtime object.  So
theoretically, you can reset the object and reuse it, but within
a multithreaded environment, you will have to create a pool of
pipelines and be sure threads wait for an available pipeline as
well as enforcing reseting the pipeline after use.

  In Servlex <http://code.google.com/p/servlex/>, I then chose
not to cache pipelines (though I properly cache stylesheets and
queries).  You can have a look at the class XProcPipeline[1] in
Servlex's trunk if you want to see a real example.

  Regards,

-- 
Florent Georges
http://fgeorges.org/

[1]servlex/src/java/org/expath/servlex/components/XProcPipeline.java

Received on Tuesday, 8 February 2011 23:31:44 UTC