[
https://issues.apache.org/jira/browse/TUSCANY-1872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612838#action_12612838
]
Ivan Dubrov commented on TUSCANY-1872:
--------------------------------------
Do you have any releases of this component after this one was fixed?
> DAS CommandImpl(String) leaks EMF/XSD XSDImportImpl objects for sdoModel.xsd
> ----------------------------------------------------------------------------
>
> Key: TUSCANY-1872
> URL: https://issues.apache.org/jira/browse/TUSCANY-1872
> Project: Tuscany
> Issue Type: Bug
> Components: Java DAS RDB
> Affects Versions: Java-DAS-Next
> Reporter: Ron Gavlin
> Assignee: Luciano Resende
> Priority: Critical
> Fix For: Java-DAS-Next
>
>
> Whenever a DAS rdb.impl.CommandImpl is constructed, it attempts to re-load
> the schema definition for the "commonj.sdo/java" namespace which imports the
> "commonj.sdo" namespace. For each XSDHelper.define() invocation, an new
> XSDImportImpl is allocated which contains its own XSDSchemaImpl object for
> the "commonj.sdo" namespace which is 25K in size. Many constructions of the
> DAS rdb.impl.CommandImpl will eventually cause an OutOfMemoryException.
> Tuscany SDO already pre-defines the "commonj.sdo/java" namespace as part of
> its initialization. According to JIRA issue TUSCANY-20, this used to not be
> the case. Now that TUSCANY-20 is fixed, the DAS should no longer be
> attempting to define the "commonj.sdo/java" types.
> The patch below removes these lines of code which are causing the memory
> leak. Please apply ASAP.
> Thanks,
> - Ron
> Index:
> C:/development/working/1/tuscany-das/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CommandImpl.java
> ===================================================================
> ---
> C:/development/working/1/tuscany-das/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CommandImpl.java
> (revision 584191)
> +++
> C:/development/working/1/tuscany-das/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CommandImpl.java
> (working copy)
> @@ -39,20 +39,6 @@
>
> public CommandImpl(String sqlString) {
> statement = new Statement(sqlString);
> -
> - try {
> - URL url = getClass().getResource("/xml/sdoJava.xsd");
> - if (url == null) {
> - throw new RuntimeException("Could not find resource:
> xml/sdoJava.xsd");
> - }
> -
> - InputStream inputStream = url.openStream();
> - XSDHelper.INSTANCE.define(inputStream, url.toString());
> - inputStream.close();
> - } catch (IOException ex) {
> - throw new RuntimeException(ex);
> - }
> -
> }
>
> public CommandImpl(org.apache.tuscany.das.rdb.config.Command command) {
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.