During an ANT run the OtherProperties elements are not cleared between subsequent hibernatecfg subtasks -------------------------------------------------------------------------------------------------------
Key: XDT-1598 URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1598 Project: XDoclet Type: Bug Components: Hibernate Module Versions: 1.2.3 Reporter: AL Assigned to: xdoclet-devel (Use for new issues) The DocletTask implementation takes care that only one instance is created for each subtask. Hence, if an ant build target contains multiple <hibernatecfg ../> element there will be on instance servicing them. The properties of the hibernatecfg subtask from modules\hibernate\src\xdoclet\modules\hibernate\HibernateCfgSubTask.java are set via setter and addXXX methods. The bug is caused by the fact that the jndiProperties, otherProperties and otherMappings lists respectively map is not reset after the engine finishes. This way the list/map of properties is an ever growing one during the build process. The proposed fix is to implement the "void engineFinished()" method to clean up these lists. protected void engineFinished() throws XDocletException { jndiProperties.clear(); otherProperties.clear(); otherMappings.clear(); } For a clean solution the above code should be extended to clear up all the properties set for a given run as otherwise properties set in one hibernatecfg element will propagate to the subsequently defined onces. Note that the jndiProperties member is defined as an ArrayList. Instead of the implementation use the interface (List) in the definition and initialize it with an ArrayList instance. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel