This example only works with ObjectSpace Voyager(tm).
Visit the Voyager homepage for more information.
try
{
// create and fill a remote map
VHashMap map = new VHashMap( "localhost:8000/JGL4" );
map.add( "Spider-Man", "Peter Parker" );
map.add( "Wolverine", "Logan" );
map.add( "Batman", "Bruce Wayne" );
map.add( "Oracle", "Barbara Gordon" );
map.liveForever(); // do not garbage collect
map.saveNow(); // save copy to database of server 8000
System.out.println( "saved " + map );
}
catch ( VoyagerException ex )
{
System.err.println( "caught: " + ex );
}
Voyager.shutdown();