mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13037: PostgreSQL upgrade scripts from 2.1.6, 2.2.0, and 2.2.1 12995: Fix build: account for change of path to log4j jar in 3rd party project 12981: Added support for monitoring of installed modules via JMX 12971: Correction to 12970 - better handle case when log4j not available. 12970: Work around log4j bug to allow editing of the "threshold" property of HierarchyDynamicBean through JMX 12926: Merged V3.0 to V3.1 Merged V2.2 to V3.0 12861: ETHREEOH-19, ETHREEOH-24, ETHREEOH-113, ETHREEOH-115, ETHREEOH-449, ETHREEOH-537, ETHREEOH-561, ETHREEOH-566, ETHREEOH-572, ETHREEOH-1072: Retry failed transactions from MS SQL Server in snapshot mode 12924: Avoid direct log4j dependencies 12918: Avoided Log4J imports by using introspection git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13516 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -80,6 +80,8 @@ public class Main
|
||||
/**
|
||||
* Creates a new instance of this tool..
|
||||
*
|
||||
* @param contextPath
|
||||
* path to the context xml file
|
||||
* @throws SQLException
|
||||
* the SQL exception
|
||||
* @throws IOException
|
||||
@@ -94,12 +96,12 @@ public class Main
|
||||
* the no such field exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Main() throws SQLException, IOException, InstantiationException, IllegalAccessException,
|
||||
public Main(final String contextPath) throws SQLException, IOException, InstantiationException, IllegalAccessException,
|
||||
ClassNotFoundException, NoSuchFieldException
|
||||
{
|
||||
final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]
|
||||
{
|
||||
"classpath:/org/alfresco/extension/dump-context.xml"
|
||||
"file:" + contextPath
|
||||
});
|
||||
final DataSource datasource = (DataSource) context.getBean("dataSource");
|
||||
this.con = datasource.getConnection();
|
||||
@@ -142,7 +144,13 @@ public class Main
|
||||
*/
|
||||
public static void main(final String[] args) throws Exception
|
||||
{
|
||||
final NamedElementCollection result = new Main().execute();
|
||||
if (args.length != 2)
|
||||
{
|
||||
System.out.println("Usage:");
|
||||
System.out.println("java " + Main.class.getName() + " <context.xml> <output.xml>");
|
||||
System.exit(1);
|
||||
}
|
||||
final NamedElementCollection result = new Main(args[0]).execute();
|
||||
|
||||
// Set up a SAX TransformerHandler for outputting XML
|
||||
final SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory.newInstance();
|
||||
@@ -157,7 +165,7 @@ public class Main
|
||||
// It was worth a try
|
||||
}
|
||||
t.setOutputProperty(OutputKeys.INDENT, "yes");
|
||||
xmlOut.setResult(new StreamResult(args[0]));
|
||||
xmlOut.setResult(new StreamResult(args[1]));
|
||||
|
||||
xmlOut.startDocument();
|
||||
result.output(xmlOut);
|
||||
|
Reference in New Issue
Block a user