From 5ae3d18565dd218c06934b4be20e7e0eecafe0c1 Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 26 Nov 2001 17:21:48 +0000 Subject: [PATCH] enlarged application skin cache, added getProperty method without default parameter, removed stack dump when user.onLogout() is not defined. --- src/helma/framework/core/Application.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index 8820383f..4de16ac4 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -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.