Multi Threaded FOP?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Multi Threaded FOP?

Theresa Jayne Forster

I am looking into redoing my FOP integration and maybe adding it into some form of MQ service,

So many applications can request fop functionality and then have their response sent on the MQQueue,

How Threadsafe is the Fop engine? Or is the current newFopInstance from a singleton factory instance totally threadsafe?

 

Are there any catcha’s I need to be aware of?

 

Kindest regards

 


Theresa Forster

Senior Software Developer

 

Reply | Threaded
Open this post in threaded view
|

Re: Multi Threaded FOP?

Peter Hancock-2
Hi Theresa,

I believe there are multi-threading gotchas when embedding FOP and her
dependencies; see
http://xmlgraphics.apache.org/fop/0.95/embedding.html#multithreading,

There are certainly many multi-threaded production systems that have
successfully embed FOP and it would be nice to know some of the issues
that were faced whilst they were being developed.  it would be very
useful to have a page on the website, or perhaps on the wiki dedicated
to this subject, included some war stories and solutions devised.

Peter

On Thu, Jun 9, 2011 at 9:26 AM, Theresa Jayne Forster
<[hidden email]> wrote:

> I am looking into redoing my FOP integration and maybe adding it into some
> form of MQ service,
>
> So many applications can request fop functionality and then have their
> response sent on the MQQueue,
>
> How Threadsafe is the Fop engine? Or is the current newFopInstance from a
> singleton factory instance totally threadsafe?
>
>
>
> Are there any catcha’s I need to be aware of?
>
>
>
> Kindest regards
>
>
>
> Theresa Forster
>
> Senior Software Developer
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Multi Threaded FOP?

Sergiu Dumitriu-2
On 06/09/2011 10:51 AM, Peter Hancock wrote:

> Hi Theresa,
>
> I believe there are multi-threading gotchas when embedding FOP and her
> dependencies; see
> http://xmlgraphics.apache.org/fop/0.95/embedding.html#multithreading,
>
> There are certainly many multi-threaded production systems that have
> successfully embed FOP and it would be nice to know some of the issues
> that were faced whilst they were being developed.  it would be very
> useful to have a page on the website, or perhaps on the wiki dedicated
> to this subject, included some war stories and solutions devised.

We didn't notice any big problems in our integration. Just read the
Javadoc to see which classes are thread-safe and which aren't.

You can create a singleton FopFactory, but you have to create new
FOUserAgent and Fop objects for each new transformation.

You can look here for an example:
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/pdf/impl/PdfExportImpl.java

> Peter
>
> On Thu, Jun 9, 2011 at 9:26 AM, Theresa Jayne Forster
> <[hidden email]>  wrote:
>> I am looking into redoing my FOP integration and maybe adding it into some
>> form of MQ service,
>>
>> So many applications can request fop functionality and then have their
>> response sent on the MQQueue,
>>
>> How Threadsafe is the Fop engine? Or is the current newFopInstance from a
>> singleton factory instance totally threadsafe?
>>
>>
>>
>> Are there any catcha’s I need to be aware of?
>>
>>
>>
>> Kindest regards
>>
>>
>>
>> Theresa Forster
>>
>> Senior Software Developer


--
Sergiu Dumitriu
http://purl.org/net/sergiu/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Multi Threaded FOP?

Alexios Giotis
In reply to this post by Theresa Jayne Forster
The last 6 months or so, it works pretty good for us in productions systems. We are using FOP 1.0 + a selection of patches that fix concurrency issues, for example see:

https://issues.apache.org/bugzilla/show_bug.cgi?id=50698
https://issues.apache.org/bugzilla/show_bug.cgi?id=46360
http://marc.info/?l=fop-user&m=129646673801270&w=2

Alexis


On Jun 9, 2011, at 11:26 AM, Theresa Jayne Forster wrote:

> I am looking into redoing my FOP integration and maybe adding it into some form of MQ service,
> So many applications can request fop functionality and then have their response sent on the MQQueue,
> How Threadsafe is the Fop engine? Or is the current newFopInstance from a singleton factory instance totally threadsafe?
>  
> Are there any catcha’s I need to be aware of?
>  
> Kindest regards
>  
>
> Theresa Forster
> Senior Software Developer
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]