xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergiu Dumitriu <ser...@xwiki.com>
Subject Re: Multi Threaded FOP?
Date Thu, 09 Jun 2011 09:06:53 GMT
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
> <theresa@inbrand.co.uk>  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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message