summaryrefslogtreecommitdiff
path: root/java/demo/Freeze/library/Server.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/demo/Freeze/library/Server.java')
-rw-r--r--java/demo/Freeze/library/Server.java74
1 files changed, 37 insertions, 37 deletions
diff --git a/java/demo/Freeze/library/Server.java b/java/demo/Freeze/library/Server.java
index 2ce57e21a78..cc94c02d2f9 100644
--- a/java/demo/Freeze/library/Server.java
+++ b/java/demo/Freeze/library/Server.java
@@ -12,53 +12,53 @@ class LibraryServer extends Ice.Application
public int
run(String[] args)
{
- Ice.Properties properties = communicator().getProperties();
+ Ice.Properties properties = communicator().getProperties();
- //
- // Create an object adapter
- //
- Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Library");
+ //
+ // Create an object adapter
+ //
+ Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Library");
- //
- // Create an evictor for books.
- //
- Freeze.Evictor evictor = Freeze.Util.createEvictor(adapter, _envName, "books", null, null, true);
- int evictorSize = properties.getPropertyAsInt("Library.EvictorSize");
- if(evictorSize > 0)
- {
- evictor.setSize(evictorSize);
- }
+ //
+ // Create an evictor for books.
+ //
+ Freeze.Evictor evictor = Freeze.Util.createEvictor(adapter, _envName, "books", null, null, true);
+ int evictorSize = properties.getPropertyAsInt("Library.EvictorSize");
+ if(evictorSize > 0)
+ {
+ evictor.setSize(evictorSize);
+ }
- adapter.addServantLocator(evictor, "book");
+ adapter.addServantLocator(evictor, "book");
- //
- // Create the library, and add it to the object adapter.
- //
- LibraryI library = new LibraryI(communicator(), _envName, "authors", evictor);
- adapter.add(library, communicator().stringToIdentity("library"));
+ //
+ // Create the library, and add it to the object adapter.
+ //
+ LibraryI library = new LibraryI(communicator(), _envName, "authors", evictor);
+ adapter.add(library, communicator().stringToIdentity("library"));
- //
- // Create and install a factory for books.
- //
- Ice.ObjectFactory bookFactory = new BookFactory(library);
- communicator().addObjectFactory(bookFactory, "::Demo::Book");
+ //
+ // Create and install a factory for books.
+ //
+ Ice.ObjectFactory bookFactory = new BookFactory(library);
+ communicator().addObjectFactory(bookFactory, "::Demo::Book");
- //
- // Everything ok, let's go.
- //
- adapter.activate();
+ //
+ // Everything ok, let's go.
+ //
+ adapter.activate();
- shutdownOnInterrupt();
- communicator().waitForShutdown();
- defaultInterrupt();
+ shutdownOnInterrupt();
+ communicator().waitForShutdown();
+ defaultInterrupt();
- library.close();
- return 0;
+ library.close();
+ return 0;
}
LibraryServer(String envName)
{
- _envName = envName;
+ _envName = envName;
}
private String _envName;
@@ -69,7 +69,7 @@ public class Server
static public void
main(String[] args)
{
- LibraryServer app = new LibraryServer("db");
- app.main("demo.Freeze.library.Server", args, "config.server");
+ LibraryServer app = new LibraryServer("db");
+ app.main("demo.Freeze.library.Server", args, "config.server");
}
}