Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 69835 invoked by uid 500); 21 Mar 2001 09:58:19 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 69613 invoked by uid 1260); 21 Mar 2001 09:58:13 -0000 Date: 21 Mar 2001 09:58:13 -0000 Message-ID: <20010321095813.69608.qmail@apache.org> From: cziegeler@apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/serialization FOPSerializer.java cziegeler 01/03/21 01:58:12 Modified: src/org/apache/cocoon/serialization Tag: xml-cocoon2 FOPSerializer.java Added: lib Tag: xml-cocoon2 fop-0_17_0.jar Removed: lib Tag: xml-cocoon2 fop-0_16_0.jar Log: Updated to latest fop and fixed component handling for FOP serializer Revision Changes Path No revision No revision 1.1.2.1 +4286 -0 xml-cocoon/lib/Attic/fop-0_17_0.jar <> No revision No revision 1.1.2.14 +16 -9 xml-cocoon/src/org/apache/cocoon/serialization/Attic/FOPSerializer.java Index: FOPSerializer.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/FOPSerializer.java,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -r1.1.2.13 -r1.1.2.14 --- FOPSerializer.java 2001/02/22 17:10:42 1.1.2.13 +++ FOPSerializer.java 2001/03/21 09:58:10 1.1.2.14 @@ -12,7 +12,7 @@ import java.io.OutputStream; import java.io.PrintWriter; -import org.apache.avalon.Poolable; +import org.apache.avalon.Recyclable; import org.apache.fop.apps.Driver; import org.apache.fop.apps.FOPException; import org.apache.fop.apps.Version; @@ -29,15 +29,15 @@ * @author Giacomo Pati * (PWR Organisation & Entwicklung) * @author Stefano Mazzocchi - * @version CVS $Revision: 1.1.2.13 $ $Date: 2001/02/22 17:10:42 $ + * @version CVS $Revision: 1.1.2.14 $ $Date: 2001/03/21 09:58:10 $ * */ -public class FOPSerializer extends AbstractSerializer implements MessageListener, Poolable { +public class FOPSerializer extends AbstractSerializer implements MessageListener, Recyclable { /** * The FOP driver */ - private Driver driver = null; + private Driver driver; /** * Create the FOP driver @@ -67,17 +67,14 @@ public void endDocument() throws SAXException { super.endDocument(); try { - driver.format(); - driver.render(); + this.driver.format(); + this.driver.render(); } catch (IOException e) { getLogger().error("FOPSerializer.endDocument()", e); throw new SAXException (e); } catch (FOPException e) { getLogger().error("FOPSerializer.endDocument()", e); throw new SAXException (e); - } finally { - driver = null; - MessageHandler.removeListener(this); } } @@ -96,4 +93,14 @@ // we should consume the events in some meaningful way // for example formatting them on the metapipeline } + + /** + * Recycle the component and remove it from the MessageList + */ + public void recycle() { + super.recycle(); + MessageHandler.removeListener(this); + this.driver = null; + } + } ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org