@Override public final void shutdown() { doShutdown(); // other }
@Override public final void init() { // check prereq dependencies injected ensureThatState(specificationLoader, is(notNullValue())); ensureThatState(serviceList, is(notNullValue())); // a bit of a workaround, but required if anything in the metamodel (for // example, a // ValueSemanticsProvider for a date value type) needs to use the Clock // singleton // we do this after loading the services to allow a service to prime a // different clock // implementation (eg to use an NTP time service). if (!deploymentType.isProduction() && !Clock.isInitialized()) { FixtureClock.initialize(); } doInit(); }
@Override public PersistenceSession createPersistenceSession() { final PersistenceSession persistenceSession = super.createPersistenceSession(); if (persistedObjects != null) { final OidGenerator oidGenerator = persistenceSession.getOidGenerator(); if (oidGenerator instanceof SimpleOidGenerator) { final SimpleOidGenerator simpleOidGenerator = (SimpleOidGenerator) oidGenerator; simpleOidGenerator.resetTo(persistedObjects.getOidGeneratorMemento()); } } return persistenceSession; }