1 package org.prevayler.demos.demo2; 2 3 import org.prevayler.Prevayler; 4 import org.prevayler.PrevaylerFactory; 5 import org.prevayler.demos.demo2.business.Bank; 6 7 8 9 public class MainTransient { 10 11 public static void main(String [] ignored) throws Exception { 12 out( "This demo shows how persistence can be turned off" 13 + "\nwithout changing ONE SINGLE LINE OF CODE in the" 14 + "\nbusiness classes or GUI. This is useful for" 15 + "\nrunning automated test scripts orders of magnitude" 16 + "\nfaster than with persistence turned on." 17 + "\n(Pay no attention to the 'Robustness Reminder' this time ;)" 18 ); 19 20 Prevayler prevayler = PrevaylerFactory.createTransientPrevayler(new Bank()); 22 23 Main.startGui(prevayler); 24 } 25 26 27 private static void out(String message) { 28 System.out.println(message); 29 } 30 31 } 32 | Popular Tags |