Hello,

I have a problem where Fop sometimes keeps an open handle on the fonts given
to the FOUserAgent object. The fonts are defined through the
FOUserAgent.setFontBaseURL method.

My code looks like this:

OutputStream out = //this is some output stream
try{ 
    Source source= message.getInputAs(getConfig(), SUPPORTED_IN_TYPES);
    FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

        //defines values on the FOUserAgent through the setters like 
setFontBaseURL
    configureFOUserAgent(context, foUserAgent);
        
    org.apache.fop.apps.Fop fop = fopFactory.newFop(mimeType, foUserAgent,
out);            
    Result result= new SAXResult(fop.getDefaultHandler());
    
    transformer= transformerPool.lease();
    transformer.transform(source, result);
} finally {
    if ( null != out ) 
        out.close();
}

While debugging I found out that the fopFactory.newFop call obtains the
handle. Unfortunately, the handle seems to be arbitrarly released, ie. a
garbage collection is sometimes necessary to free the handle.
Did anyone encounter the same problem? Is there a way my environment or the
implementation I work on would interfere with fop? (I'm running fop 0.94
with Java 6 on Vista)
Thank you in advance for your help :)

Regards,

Matthieu
-- 
View this message in context: 
http://www.nabble.com/Fop-instance-keeping-handle-on-font-file-tp18689197p18689197.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to