public Application (String name, SystemProperties sysProps, SystemProperties sysDbProps, File home) throws RemoteException, DbException, IllegalArgumentException {  if (name == null || name.trim().length() == 0) throw new IllegalArgumentException ("Invalid application name: "+name);  this.name = name; this.home = home;  threadgroup = new ThreadGroup ("TX-"+name);  String appHome = sysProps.getProperty ("appHome"); if (appHome != null && !"".equals (appHome.trim())) appDir = new File (appHome); else appDir = new File (home, "apps"); appDir = new File (appDir, name); if (!appDir.exists()) appDir.mkdirs ();  String dbHome = sysProps.getProperty ("dbHome"); if (dbHome != null && !"".equals (dbHome.trim())) dbDir = new File (dbHome); else dbDir = new File (home, "db"); dbDir = new File (dbDir, name); if (!dbDir.exists()) dbDir.mkdirs ();  File propfile = new File (appDir, "app.properties"); props = new SystemProperties (propfile.getAbsolutePath (), sysProps);  File dbpropfile = new File (appDir, "db.properties"); dbProps = new SystemProperties (dbpropfile.getAbsolutePath (), sysDbProps);  File pwf = new File (home, "passwd"); CryptFile parentpwfile = new CryptFile (pwf, null); pwf = new File (appDir, "passwd"); pwfile = new CryptFile (pwf, parentpwfile);  nmgr = new NodeManager (this, dbDir.getAbsolutePath (), props);  charset = props.getProperty ("charset", "ISO-8859-1");  debug = "true".equalsIgnoreCase (props.getProperty ("debug")); checkSubnodes = !"false".equalsIgnoreCase (props.getProperty ("subnodeChecking"));  try { requestTimeout = Long.parseLong (props.getProperty ("requestTimeout", "60"))*1000l; } catch (Exception ignore) {	}  templateExtension = props.getProperty ("templateExtension", ".hsp"); scriptExtension = props.getProperty ("scriptExtension", ".js"); actionExtension = props.getProperty ("actionExtension", ".hac"); skinExtension = ".skin";  sessions = new Hashtable (); activeUsers = new Hashtable (); dbMappings = new Hashtable (); dbSources = new Hashtable ();  appnode = new Node ("app"); xmlrpc = IServer.getXmlRpcServer (); xmlrpcAccess = new XmlRpcAccess (this);
public Application () throws RemoteException { super ();
    public Application (String name, SystemProperties sysProps, SystemProperties sysDbProps, File home)	    throws RemoteException, DbException, IllegalArgumentException {		if (name == null || name.trim().length() == 0)	    throw new IllegalArgumentException ("Invalid application name: "+name);	this.name = name;	this.home = home;	threadgroup = new ThreadGroup ("TX-"+name);	String appHome = sysProps.getProperty ("appHome");	if (appHome != null && !"".equals (appHome.trim()))	    appDir = new File (appHome);	else	    appDir = new File (home, "apps");	appDir = new File (appDir, name);	if (!appDir.exists())		    appDir.mkdirs ();	String dbHome = sysProps.getProperty ("dbHome");	if (dbHome != null && !"".equals (dbHome.trim()))	    dbDir = new File (dbHome);	else	    dbDir = new File (home, "db");	dbDir = new File (dbDir, name);	if (!dbDir.exists())		    dbDir.mkdirs ();	File propfile = new File (appDir, "app.properties");	props = new SystemProperties (propfile.getAbsolutePath (), sysProps);	File dbpropfile = new File (appDir, "db.properties");	dbProps = new SystemProperties (dbpropfile.getAbsolutePath (), sysDbProps);	File pwf = new File (home, "passwd");	CryptFile parentpwfile = new CryptFile (pwf, null);	pwf = new File (appDir, "passwd");	pwfile = new CryptFile (pwf, parentpwfile);	nmgr = new NodeManager (this, dbDir.getAbsolutePath (), props);	charset = props.getProperty ("charset", "ISO-8859-1");	debug = "true".equalsIgnoreCase (props.getProperty ("debug"));	checkSubnodes = !"false".equalsIgnoreCase (props.getProperty ("subnodeChecking"));		try {	    requestTimeout = Long.parseLong (props.getProperty ("requestTimeout", "60"))*1000l;	} catch (Exception ignore) {	}		templateExtension = props.getProperty ("templateExtension", ".hsp");	scriptExtension = props.getProperty ("scriptExtension", ".js");	actionExtension = props.getProperty ("actionExtension", ".hac");	skinExtension = ".skin";		sessions = new Hashtable ();	activeUsers = new Hashtable ();	dbMappings = new Hashtable ();	dbSources = new Hashtable ();	appnode = new Node ("app");	xmlrpc = IServer.getXmlRpcServer ();	xmlrpcAccess = new XmlRpcAccess (this);    }