Clone
Dan Haywood <dan@haywood-associates.co.uk>
committed
on 16 Sep 15
ISIS-1194: simplfying the bootstrap and wiring of components, in particular around PersistenceSessionFactory
specifically:
- IsisSessionFact… Show more
ISIS-1194: simplfying the bootstrap and wiring of components, in particular around PersistenceSessionFactory

specifically:

- IsisSessionFactory

 - now passed in the ServicesInjector (rather than obtaining it from the PersistenceSessionFactory)

 - initialization of FixtureClock done in IsisSessionFactory rather than PersistenceSessionFactory

- IsisSystem

 - createSessionFactory(), changed the order in order to remove some bidir relationships

 - in shutdownServices, avoid NPE if the serviceInitializer was never instantiated during init()

- PersistenceSessionFactory

- no longer implements MetaModelRefiner, instead moved out to separate class (PersistenceSessionFactoryMetamodelRefiner)

   - this allows us to break the bidir between PersistenceSessionFactory and SpecificationLoader

 - no longer requires a RuntimeContext

 - no longer requires a ServicesInjector (is provided by IsisSessionFactory when #createPersistenceSession() is called to pass onto the created PersistenceSession)

 - no longer implements SpecificationLoaderAware, nor requires a SpecificationLoader (is provided by IsisSessionFactory when #createPerisistenceSession is called)

- similar changes to IsisMetaModel, in its constructor an init() method, to wire up components in the correct order

- PersistenceSession

 - no longer holds reference to PersistenceSessionFactory (though does only as FixturesInstallerFlag in order that PSF can continue to cache whether fixtures installed)

 - is passed in the JDO PersistenceManagerFactory from Isis' PSF (rather than accessing the PSF's DataNucleusApplicationComponents, which is now wholly internal to PSF)

 - is passed in the ServicesInjector directly (rather than obtain from Isis' PSF)

- RuntimeContextAbstract

 - now also passed in SpecificationLoader into its constructor (required reordering of IsisSessionFactory#init to be able to do this)

 - thereby remove the whole SpecificationLookupDelegator contrivance

- JavaReflectorHelper

 - pass through deploymentType to ObjectReflectorDefault

- ObjectReflectorDefault

 - removal of isInjectorMethodFor, instead have callers instantiate the InjectorMethodEvaluatorDefault directly

also, to make caller hierarchy more useful::

- changed ApplicationScopedComponent and SessionScopedComponent into marker interfaces

- removed Injectable, pushed injectInto(Object) into subtypes

also:

- enhanced IsisMojoAbstract and IsisMojoValidate (maven-isis-plugin)

 - to accept an appManifest in the pom.xml

 - use an AppManifest rather than MetaModel to bootstrap the system and validate

- moved IsisComponentProviderDefault from core-integtest into core-runtime (renamed as ...Default2), so can be used by maven-isis-plugin

also:

- deleted AdapterManagerDefault, no longer used

Show less

master + 32 more