* minor fix.

This commit is contained in:
Heng Sin Low 2007-07-24 04:59:44 +00:00
parent 8912cb3940
commit f24df9b029
2 changed files with 15 additions and 4 deletions

View File

@ -76,6 +76,7 @@ public class PackIn extends SvrProcess {
PackInHandler handler = new PackInHandler();
handler.set_TrxName(trxName);
handler.setCtx(ctx);
handler.setProcess(this);
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
String msg = "Start Parser";
@ -227,6 +228,7 @@ public class PackIn extends SvrProcess {
// impXML.setUpdateMode(args[7]);
impXML.m_UpdateMode = args[7];
impXML.importXML(file, Env.getCtx(), null);
System.exit(0);

View File

@ -136,12 +136,14 @@ public class PackInHandler extends DefaultHandler {
private List<Element> menus = new ArrayList<Element>();
private List<DeferEntry> defer = new ArrayList<DeferEntry>();
private Stack<Element> stack = new Stack<Element>();
private PackIn packIn;
private void init() throws SAXException {
PackIn pack = new PackIn();
packageDirectory = pack.m_Package_Dir;
m_UpdateMode = pack.m_UpdateMode;
m_DatabaseType = pack.m_Database;
if (packIn == null)
packIn = new PackIn();
packageDirectory = packIn.m_Package_Dir;
m_UpdateMode = packIn.m_UpdateMode;
m_DatabaseType = packIn.m_Database;
File file = new File("");
SimpleDateFormat formatter_file = new SimpleDateFormat("yyMMddHHmmssZ");
SimpleDateFormat formatter_log = new SimpleDateFormat("MM/dd/yy HH:mm:ss");
@ -696,4 +698,11 @@ public class PackInHandler extends DefaultHandler {
startElement = b;
}
}
/**
* @param packIn
*/
public void setProcess(PackIn packIn) {
this.packIn = packIn;
}
} // PackInHandler