1 package org.prevayler.demos.demo1; 2 3 import org.prevayler.Prevayler; 4 import org.prevayler.PrevaylerFactory; 5 6 import java.io.*; 7 8 9 public class Main { 10 11 public static void main(String [] args) throws Exception { 12 printMessage(); 13 Prevayler prevayler = PrevaylerFactory.createPrevayler(new NumberKeeper(), "demo1"); 14 new PrimeCalculator(prevayler).start(); 15 } 16 17 18 static private void printMessage() throws Exception { 19 System.out.println("\nRobustness Reminder: You can kill this process at any time.\nWhen you restart the system, you will see that nothing was lost.\nPress Enter to continue.\n"); 20 (new BufferedReader(new InputStreamReader(System.in))).readLine(); 21 } 22 23 } 24 | Popular Tags |