diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java index e77fafc28..a9212e560 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java @@ -20,13 +20,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; -import javax.xml.transform.Source; -import javax.xml.transform.Templates; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerFactory; import javax.xml.transform.sax.SAXTransformerFactory; -import javax.xml.transform.sax.TransformerHandler; import org.apache.commons.lang.exception.NestableRuntimeException; import org.w3c.dom.Document; @@ -73,9 +67,6 @@ public class XMLFactory { _domFactories[arrIdx] = domFactory; } } - - _transFactory = (SAXTransformerFactory) TransformerFactory. - newInstance(); _validating = new ValidatingErrorHandler(); } @@ -130,47 +121,6 @@ public class XMLFactory { return getDOMParser(false, false).newDocument(); } - /** - * Return a Transformer that will apply the XSL transformation - * from the given source. If the source is null, - * no transformation will be applied. - */ - public static Transformer getTransformer(Source source) { - try { - if (source == null) - return _transFactory.newTransformer(); - return _transFactory.newTransformer(source); - } catch (TransformerConfigurationException tfce) { - throw new NestableRuntimeException(tfce); - } - } - - /** - * Return a Templates for the given XSL source. - */ - public static Templates getTemplates(Source source) { - try { - return _transFactory.newTemplates(source); - } catch (TransformerConfigurationException tfce) { - throw new NestableRuntimeException(tfce); - } - } - - /** - * Return a TransformerHandler for transforming SAX events, applying the - * XSL transform from the given source. If the source is null, no - * transform will be applied. - */ - public static TransformerHandler getTransformerHandler(Source source) { - try { - if (source == null) - return _transFactory.newTransformerHandler(); - return _transFactory.newTransformerHandler(source); - } catch (TransformerConfigurationException tfce) { - throw new NestableRuntimeException(tfce); - } - } - /** * Return the array index of the factory with the given properties. */ diff --git a/openjpa-lib/src/test/java/org/apache/openjpa/lib/xml/TestXMLWriter.java b/openjpa-lib/src/test/java/org/apache/openjpa/lib/xml/TestXMLWriter.java index 7ade5cffe..b3201ec37 100644 --- a/openjpa-lib/src/test/java/org/apache/openjpa/lib/xml/TestXMLWriter.java +++ b/openjpa-lib/src/test/java/org/apache/openjpa/lib/xml/TestXMLWriter.java @@ -15,6 +15,7 @@ package org.apache.openjpa.lib.xml; import java.io.InputStreamReader; import java.io.StringWriter; import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; @@ -48,7 +49,7 @@ public class TestXMLWriter extends TestCase { StringWriter formatted = new StringWriter(); StreamResult result = new StreamResult(new XMLWriter(formatted)); - Transformer trans = XMLFactory.getTransformer(null); + Transformer trans = TransformerFactory.newInstance().newTransformer(); trans.transform(source, result); // read the correct output into a buffer diff --git a/openjpa-persistence-jdbc/pom.xml b/openjpa-persistence-jdbc/pom.xml index f886c7b98..8af7ef094 100644 --- a/openjpa-persistence-jdbc/pom.xml +++ b/openjpa-persistence-jdbc/pom.xml @@ -90,6 +90,7 @@ pathsep=" "/> + - diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java index 898f647b9..5c58ac3f0 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java @@ -48,8 +48,6 @@ public class PersistenceProductDerivation PersistenceMetaDataFactory.class.getName()); conf.metaFactoryPlugin.setAlias(ALIAS_EJB, PersistenceMetaDataFactory.class.getName()); - conf.metaFactoryPlugin.setDefault(SPEC_JPA); - conf.metaFactoryPlugin.setString(SPEC_JPA); } public void afterSpecificationSet(OpenJPAConfiguration c) {