enlarged application skin cache, added getProperty method

without default parameter, removed stack dump when
user.onLogout() is not defined.
This commit is contained in:
hns 2001-11-26 17:21:48 +00:00
parent 93debe88a2
commit 5ae3d18565

View file

@ -104,7 +104,7 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, IRep
Properties classMapping;
// a cache for parsed skin objects
CacheMap skincache = new CacheMap (100, 0.75f);
public CacheMap skincache = new CacheMap (200, 0.80f);
/**
* Zero argument constructor needed for RMI
@ -892,9 +892,7 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, IRep
if (u.uid != null) {
try {
eval.invokeFunction (u, "onLogout", new Object[0]);
} catch (Exception ignore) {
ignore.printStackTrace ();
}
} catch (Exception ignore) {}
activeUsers.remove (u.uid);
}
sessions.remove (u.getSessionID ());
@ -980,7 +978,7 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, IRep
DbSource dbs = (DbSource) dbSources.get (dbSrcName);
if (dbs != null)
return dbs;
if (dbProps.getProperty (dbSrcName+".url") != null && dbProps.getProperty (dbSrcName+".driver") != null) {
if (dbProps.getProperty (dbSrcName+".url") != null && dbProps.getProperty (dbSrcName+".driver") != null) {
try {
dbs = new DbSource (name, dbProps);
dbSources.put (dbSrcName, dbs);
@ -1012,6 +1010,12 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, IRep
public void putDbMapping (String typename, DbMapping dbmap) {
dbMappings.put (typename, dbmap);
}
/**
* Proxy method to get a property from the applications properties.
*/
public String getProperty (String propname) {
return props.getProperty (propname);
}
/**
* Proxy method to get a property from the applications properties.