1 28 package de.nava.informa.utils.manager; 29 30 42 public final class PersistenceManagerConfig { 43 44 private static PersistenceManagerIF manager; 45 46 47 static { 48 final String propertyName = "informa.persistencemanager"; 50 String className = System.getProperty(propertyName); 51 try { 52 setPersistenceManagerClassName(className); 53 } catch (Exception e) { 54 e.printStackTrace(); 55 } 56 } 57 58 61 private PersistenceManagerConfig() { 62 } 63 64 77 public static void setPersistenceManagerClassName(String className) 78 throws ClassNotFoundException , IllegalAccessException , InstantiationException { 79 80 manager = null; 81 82 if (className != null) { 84 manager = (PersistenceManagerIF) Class.forName(className).newInstance(); 85 } 86 } 87 88 93 public static PersistenceManagerIF getPersistenceManager() { 94 return manager; 95 } 96 } 97 | Popular Tags |