dims 00/12/08 04:05:07
Modified: src/org/apache/cocoon/serialization Tag: xml-cocoon2
FOPSerializer.java
Added: lib Tag: xml-cocoon2 fop-0_15_0.jar
Removed: lib Tag: xml-cocoon2 fop_0_14_1-dev.jar
Log:
1. Patch from "Carsten Ziegeler" <[EMAIL PROTECTED]>" for Poolable
FOPSerializer
2. Moving to FOP 0.15 as per Carsten's suggestion.
Revision Changes Path
No revision
No revision
1.1.2.1 +2145 -0 xml-cocoon/lib/Attic/fop-0_15_0.jar
<<Binary file>>
No revision
No revision
1.1.2.8 +8 -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.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- FOPSerializer.java 2000/12/05 00:24:13 1.1.2.7
+++ FOPSerializer.java 2000/12/08 12:05:06 1.1.2.8
@@ -12,6 +12,7 @@
import java.io.OutputStream;
import java.io.PrintWriter;
+import org.apache.avalon.Poolable;
import org.apache.fop.apps.Driver;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.Version;
@@ -28,10 +29,10 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* (PWR Organisation & Entwicklung)
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/12/05 00:24:13 $
+ * @version CVS $Revision: 1.1.2.8 $ $Date: 2000/12/08 12:05:06 $
*
*/
-public class FOPSerializer extends AbstractSerializer implements
MessageListener {
+public class FOPSerializer extends AbstractSerializer implements
MessageListener, Poolable {
/**
* The FOP driver
@@ -40,8 +41,9 @@
/**
* Create the FOP driver
+ * Set the <code>OutputStream</code> where the XML should be serialized.
*/
- public FOPSerializer() {
+ public void setOutputStream(OutputStream out) {
this.driver = new Driver();
// the use of static resources sucks for servlet enviornments
@@ -55,12 +57,6 @@
this.driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
this.driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
this.driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
- }
-
- /**
- * Set the <code>OutputStream</code> where the XML should be serialized.
- */
- public void setOutputStream(OutputStream out) {
this.driver.setWriter(new PrintWriter(out));
this.setContentHandler(this.driver.getContentHandler());
}
@@ -77,6 +73,9 @@
throw new SAXException (e);
} catch (FOPException e) {
throw new SAXException (e);
+ } finally {
+ driver = null;
+ MessageHandler.removeListener(this);
}
}