[ http://issues.apache.org/jira/browse/XALANJ-1988?page=all ]
Brian Minchau updated XALANJ-1988:
----------------------------------
Fix Version: 2.7
> Core dump: Sun Hotspot JVM 1.3.1_11b-02 optimizer core dumps optimizing a
> Xalan
> -------------------------------------------------------------------------------
>
> Key: XALANJ-1988
> URL: http://issues.apache.org/jira/browse/XALANJ-1988
> Project: XalanJ2
> Type: Bug
> Components: transformation
> Versions: 2.4Dx
> Environment: Sun Sparc Workstation Netra-T4, Solaris 5.9, Sun Hotspot JVM
> 1.3.1_11-b02 (Optimization ON), BEA Weblogic 7.0 SP4 running Java Webapps (no
> JNI/native code), XalanJ2 (Implementation version 2.4.D1)
> Reporter: SAUVAGEAU Eric
> Fix For: 2.7
>
> I just added this issue to complete the problem reported by Manish.
> In fact we are using XALAN this way :
> Transformer transformer = getTransformer(xslSource);
> transformer.setOutputProperty(OutputKeys.ENCODING, sEncoding);
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> StreamResult mlResult = new StreamResult(baos);
> StreamSource xmlStreamSource = new
> StreamSource(xmlSource.toStringReader());
> transformer.transform(xmlStreamSource, mlResult);
>
> the method getTransformer is like this :
> protected Transformer getTransformer(BDataXsl dataXsl) throws
> ExTransformerException
> {
> Transformer transformer = null;
> if (dataXsl != null) {
> // try to get it from cache
> String sKey = dataXsl.getKey();
> Templates translet = (Templates) _dataFactory.getCacheData(sKey);
> // do we have a transformer
> if (translet == null) {
> try {
> StreamSource xslStreamSource = new
> StreamSource(dataXsl.toStringReader());
> xslStreamSource.setSystemId(dataXsl.getFileName());
> translet = _transformerFactory.newTemplates(xslStreamSource);
> transformer = translet.newTransformer();
> }
> catch (TransformerConfigurationException ex) {
> // code omitted for clarity
> }
> }
> else {
> try {
> transformer = translet.newTransformer();
> }
> catch (TransformerConfigurationException ex) {
> // code omitted for clarity
> }
> }
> }
> // code omitted for clarity
> My inderstanding is that Templates are thread safe and transformer are not
> but do you see any bad stuff in this code ?
> Thanks in advance.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]