Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: demo1/Main.java


1   // Prevayler(TM) - The Open-Source Prevalence Layer.
2   
3   // Copyright (C) 2001 Klaus Wuestefeld, Paul Hammant
4   
5   // This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
6   package demo1;
7   
8   import com.ghettojedi.opp.configuration.ServerConfiguration;
9   import com.ghettojedi.opp.persistence.PersistenceManager;
10  import com.ghettojedi.opp.instrumentation.OppRunner;
11  
12  import java.io.File;
13  
14  public class Main {
15      public static void main(String[] args) throws Throwable {
16          OppRunner.run(RealMain.class.getName(), args);
17      }
18  
19      public static class RealMain {
20          public static void main(String[] args) throws Exception {
21              System.out.println("\nRobustness Reminder: You can kill this process at any time. When you restart the system, you will see that nothing was lost.\n");
22              PersistenceManager pm = new PersistenceManager(new NumberKeeper(), new File("PrevalenceBase" + File.separator + "demo1"));
23              ServerConfiguration.get().setSystem(pm.getSystem());
24              ServerConfiguration.get().getCommitManager().setListener(pm);
25  
26              new PrimeFrame(pm);
27          }
28      }
29  }
30