summaryrefslogtreecommitdiff
path: root/java/demo/Ice/async/Server.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-05-25 13:45:57 +0000
committerBernard Normier <bernard@zeroc.com>2007-05-25 13:45:57 +0000
commit87066d75a2e1026f39e81aa9d5c555b571295b70 (patch)
treee6304ee267f05f065ac223dc17f02fc42e2e0b0d /java/demo/Ice/async/Server.java
parentadding listener for assertion failures (diff)
downloadice-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/Server.java')
-rw-r--r--java/demo/Ice/async/Server.java24
1 files changed, 23 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();