diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-05-25 13:45:57 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-05-25 13:45:57 +0000 |
commit | 87066d75a2e1026f39e81aa9d5c555b571295b70 (patch) | |
tree | e6304ee267f05f065ac223dc17f02fc42e2e0b0d /java/demo/Ice/async | |
parent | adding listener for assertion failures (diff) | |
download | ice-87066d75a2e1026f39e81aa9d5c555b571295b70.tar.bz2 ice-87066d75a2e1026f39e81aa9d5c555b571295b70.tar.xz ice-87066d75a2e1026f39e81aa9d5c555b571295b70.zip |
Renamed existing Freeze Evictor to BackgroundSaveEvictor and added new
TransactionalEvictor
Diffstat (limited to 'java/demo/Ice/async')
-rw-r--r-- | java/demo/Ice/async/Server.java | 24 | ||||
-rw-r--r-- | java/demo/Ice/async/WorkQueue.java | 3 |
2 files changed, 26 insertions, 1 deletions
diff --git a/java/demo/Ice/async/Server.java b/java/demo/Ice/async/Server.java index 4434f3b59a5..ffca3c49247 100644 --- a/java/demo/Ice/async/Server.java +++ b/java/demo/Ice/async/Server.java @@ -28,7 +28,29 @@ public class Server extends Ice.Application Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello"); _workQueue = new WorkQueue(); - adapter.add(new HelloI(_workQueue), communicator().stringToIdentity("hello")); + + final HelloI helloServant = new HelloI(_workQueue); + + Ice.ServantLocator servantLocator = new Ice.ServantLocator() + { + public Ice.Object locate(Ice.Current curr, Ice.LocalObjectHolder cookie) + { + return helloServant; + } + + public void finished(Ice.Current curr, Ice.Object servant, Ice.LocalObject cookie) + { + // nothin + } + + public void deactivate(String category) + { + System.err.println("deactivating servant locator"); + } + }; + + + adapter.addServantLocator(servantLocator, ""); _workQueue.start(); adapter.activate(); diff --git a/java/demo/Ice/async/WorkQueue.java b/java/demo/Ice/async/WorkQueue.java index bc18061058a..cbe528e77d8 100644 --- a/java/demo/Ice/async/WorkQueue.java +++ b/java/demo/Ice/async/WorkQueue.java @@ -68,12 +68,15 @@ public class WorkQueue extends Thread // // Throw exception for any outstanding requests. // + + /* java.util.Iterator p = _callbacks.iterator(); while(p.hasNext()) { CallbackEntry entry = (CallbackEntry)p.next(); entry.cb.ice_exception(new RequestCanceledException()); } + */ } public synchronized void |