removed thread.stop(), some other small enhancements

This commit is contained in:
hns 2001-01-25 20:55:10 +00:00
parent 86423de367
commit 53a34144c3

View file

@ -148,7 +148,7 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn
public void stop () { public void stop () {
// stop all threads, this app is going down // stop all threads, this app is going down
if (worker != null) if (worker != null)
worker.stop (); worker.interrupt ();
worker = null; worker = null;
typemgr.stop (); typemgr.stop ();
@ -410,7 +410,6 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn
worker.sleep (cleanupSleep); worker.sleep (cleanupSleep);
} catch (InterruptedException x) { } catch (InterruptedException x) {
IServer.getLogger().log ("Scheduler for "+name+" interrupted"); IServer.getLogger().log ("Scheduler for "+name+" interrupted");
Thread.currentThread().interrupt();
} }
try { try {
IServer.getLogger().log ("Cleaning up "+name+": " + sessions.size () + " sessions active"); IServer.getLogger().log ("Cleaning up "+name+": " + sessions.size () + " sessions active");
@ -474,7 +473,7 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn
} }
public DbMapping getDbMapping (String typename) { public DbMapping getDbMapping (String typename) {
return (DbMapping) dbMappings.get (typename); return typename == null ? null : (DbMapping) dbMappings.get (typename);
} }
public void putDbMapping (String typename, DbMapping dbmap) { public void putDbMapping (String typename, DbMapping dbmap) {