removed or updated references to the old Server class.

This commit is contained in:
hns 2001-08-27 16:35:04 +00:00
parent 2bc06b199e
commit 4dea0349e2
3 changed files with 10 additions and 12 deletions

View file

@ -27,7 +27,6 @@ public class DbSource {
this.name = name;
this.props = props;
init ();
Server.getLogger().log ("created db source ["+name+", "+url+", "+driver+", "+user+"]");
}
public Connection getConnection () throws ClassNotFoundException, SQLException {
@ -42,7 +41,7 @@ public class DbSource {
con = DriverManager.getConnection (url, user, password);
// If we wanted to use SQL transactions, we'd set autoCommit to
// false here and make commit/rollback invocations in Transactor methods;
Server.getLogger().log ("Created new Connection to "+url);
System.err.println ("Created new Connection to "+url);
tx.registerConnection (this, con);
//////////////////////////////////////////////
/* DatabaseMetaData meta = con.getMetaData ();

View file

@ -27,6 +27,7 @@ public final class NodeManager {
protected Application app;
private CacheMap cache;
private Replicator replicator;
protected DbWrapper db;
@ -40,8 +41,6 @@ public final class NodeManager {
// a wrapper that catches some Exceptions while accessing this NM
public final WrappedNodeManager safe;
// an instance of Node that's used to cache null values
// private Node nullNode;
public NodeManager (Application app, String dbHome, Properties props) throws DbException {
this.app = app;
@ -68,7 +67,7 @@ public final class NodeManager {
idBaseValue = Math.max (1l, idBaseValue); // 0 and 1 are reserved for root nodes
} catch (NumberFormatException ignore) {}
db = new DbWrapper (dbHome, Server.dbFilename, this, Server.useTransactions);
db = new DbWrapper (dbHome, helma.main.Server.dbFilename, this, helma.main.Server.useTransactions);
initDb ();
logSql = "true".equalsIgnoreCase(props.getProperty ("logsql"));

View file

@ -33,7 +33,7 @@ import java.util.Vector;
return null;
} catch (Exception x) {
nmgr.app.logEvent ("Error retrieving Node via DbMapping: "+x.getMessage ());
if ("true".equalsIgnoreCase (Server.sysProps.getProperty("debug")))
if (nmgr.app.debug ())
x.printStackTrace();
throw new RuntimeException ("Error retrieving Node: "+x.getMessage ());
}
@ -46,7 +46,7 @@ import java.util.Vector;
return null;
} catch (Exception x) {
nmgr.app.logEvent ("Error retrieving Node \""+id+"\" from "+home+": "+x.getMessage ());
if ("true".equalsIgnoreCase (Server.sysProps.getProperty("debug")))
if (nmgr.app.debug ())
x.printStackTrace();
throw new RuntimeException ("Error retrieving Node: "+x.getMessage ());
}
@ -56,7 +56,7 @@ import java.util.Vector;
try {
return nmgr.getNodes (home, rel);
} catch (Exception x) {
if ("true".equalsIgnoreCase (Server.sysProps.getProperty("debug")))
if (nmgr.app.debug ())
x.printStackTrace();
throw new RuntimeException ("Error retrieving Nodes: "+x.getMessage ());
}
@ -66,7 +66,7 @@ import java.util.Vector;
try {
return nmgr.getNodeIDs (home, rel);
} catch (Exception x) {
if ("true".equalsIgnoreCase (Server.sysProps.getProperty("debug")))
if (nmgr.app.debug ())
x.printStackTrace();
throw new RuntimeException ("Error retrieving NodeIDs: "+x.getMessage ());
}
@ -76,7 +76,7 @@ import java.util.Vector;
try {
return nmgr.countNodes (home, rel);
} catch (Exception x) {
if ("true".equalsIgnoreCase (Server.sysProps.getProperty("debug")))
if (nmgr.app.debug ())
x.printStackTrace();
throw new RuntimeException ("Error counting Node: "+x.getMessage ());
}
@ -86,7 +86,7 @@ import java.util.Vector;
try {
nmgr.deleteNode (node);
} catch (Exception x) {
if ("true".equalsIgnoreCase (Server.sysProps.getProperty("debug")))
if (nmgr.app.debug ())
x.printStackTrace();
throw new RuntimeException ("Error deleting Node: "+x.getMessage ());
}
@ -96,7 +96,7 @@ import java.util.Vector;
try {
return nmgr.getPropertyNames (home, rel);
} catch (Exception x) {
if ("true".equalsIgnoreCase (Server.sysProps.getProperty("debug")))
if (nmgr.app.debug ())
x.printStackTrace();
throw new RuntimeException ("Error retrieving property names: "+x.getMessage ());
}