public static void init(Properties properties) throws Exception { if (initialized) return; system = new SystemInstance(properties); initialized = true; }
public static void reset(){ try { system = new SystemInstance(System.getProperties()); initialized = false; } catch (Exception e) { throw new RuntimeException("Failed to create default instance of SystemInstance", e); } }
public static synchronized void reset() { try { System.clearProperty("openejb.loader"); system = new SystemInstance(new Properties()); // don't put system properties here, it is already done initialized = false; } catch (final Exception e) { throw new LoaderRuntimeException("Failed to create default instance of SystemInstance", e); } }
public static synchronized void reset() { try { System.clearProperty("openejb.loader"); system.set(new SystemInstance(new Properties())); // don't put system properties here, it is already done initialized = false; } catch (final Exception e) { throw new LoaderRuntimeException("Failed to create default instance of SystemInstance", e); } }
public static synchronized void init(final Properties properties) throws Exception { if (initialized) { return; } system.set(new SystemInstance(properties)); // WARNING: reverse order since we don't overwrite existing entries readSystemProperties(get().currentProfile()); readSystemProperties(); readUserSystemProperties(); // if the user read System.getProperties() instead of our properties, used in bval-tomee tck for instance System.getProperties().putAll(system.get().getProperties()); initialized = true; get().setProperty("openejb.profile.custom", Boolean.toString(!get().isDefaultProfile())); initDefaultComponents(); }
public static synchronized void init(final Properties properties) throws Exception { if (initialized) { return; } system = new SystemInstance(properties); // WARNING: reverse order since we don't overwrite existing entries readSystemProperties(get().currentProfile()); readSystemProperties(); readUserSystemProperties(); // if the user read System.getProperties() instead of our properties, used in bval-tomee tck for instance System.getProperties().putAll(system.getProperties()); initialized = true; get().setProperty("openejb.profile.custom", Boolean.toString(!get().isDefaultProfile())); }