Clone Tools
  • last updated 20 mins ago
Constraints: committers
Constraints: files
Constraints: dates
ISIS-1427: renames methods in IsisSystemForTest, rationalizes functionality between IsisSystem and IsisSessionFactory

The intent being that IsisSystem is just a builder for IsisSessionFactory. The responsibility for calling @PostConstruct and @PreDestroy was held by IsisSystem, meaning that it was necessary to call both shutdown on IsisSessionFactory and then on IsisSystem. Moving the responsibility for services initialization/destroy into IsisSessionFactory therefore simplifies the callers; there is no need to hold onto the IsisSystem, just use the IsisSessionFactory.

As part of this the DeploymentCategoryProviderDefault is now a fallback service, added into ServicesInjector prior to init'ing the guice IsisInjectModel (which creates the IsisSystem and thence IsisSessionFactory).

  1. … 25 more files in changeset.
ISIS-1427: simplifying IsisContext and minimizing calls to it; also removed Localization (unused)

  1. … 214 more files in changeset.
ISIS-1427: use DeploymentCategory rather than DeploymentType throughout (except in very initial bootstrapping).


- no need for IsisInjectModel to expose DeploymentType or IsisConfiguration as @Provides @Singleton

- remove DeploymentType from IsisComponentProvider classes (plays no part), just pass to IsisSystem directly.

- allow IsisSystem to be created from a non-null AppManifest (internally creates a default IsisComponentProviderDefault2)

  1. … 40 more files in changeset.
ISIS-1393: if IsisSystem fails to init (for any reason), then fail the mojo

ISIS-1419: simplified Session management.

The exception resulting, I believe, from lack of symmetry in the integ tests: they set up a single session for all tests, but in the shutdown (called by a Runtime hook), create a different session again to perform the @PreDestroy stuff. In this commit, I've decided to get rid of this shutdown stuff, basically orphaning that initial session (it is never closed down, but then the JVM quits anyway, and this is for an inmemory databases so no real harm).

A subsequent commit will take look to close the session in the teardown of each test.

In detail:

- in IsisContext, change the Map<Thread,IsisSession> into a simple ThreadLocal. remove the logic to save every IsisSession in this map, and remove the closeAllSessionsInstance(). In IsisSession, remove the id() and sessionOpenTime properties (now unused), and remove closeAll() - was now just the same as close();

- in PersistenceSession, split out calling of __isis_startRequest/__isis_postConstruct and then __isis_preDestroy/__isis_endRequest into two loops, just so easier to move around if need be. (Currently, calling one after the other, so no functional change here).


- no longer allow the ProgrammingModel to be overridden (in IsisComponentProviderDefault, IsisComponentProviderDefault2, IsisSystemForTest, IsisMojoAbstract)

- reformatted IsisSystemForTest (comments), also WebRequestCycleForIsis

- ServiceInitializer, introduced constructor for state (rather than pass into validate(...)); updated IsisSystem correspondingly

- removed unused method in DeploymentType

  1. … 11 more files in changeset.
ISIS-1407: SpecificationLoader is now a concrete class (rolled ObjectReflector up into it).

  1. … 155 more files in changeset.
ISIS-1406: simpleapp integ tests also now running

  1. … 2 more files in changeset.
ISIS-1342: IsisSystem no longer throws MetaModelException, instead pushes it onto the IsisContext. Its callers (IsisWicketApplication, or IsisSessionFilter - for RO - or CukeGlueAbstract, or IsisSystemForTest) then expose the error appropriately, accessing from IsisContext.

Additional details:

- IsisSystem no longer initializes the AuthenticationManager, AuthorizationManager or PersistenceSessionFactory if there was a metamodel validation, to minimize impact on runtime.

- IsisSystemForTest will fail with a minimal error for any subsequent tests

- IsisContext now as new metamodeInvalidException field. This is static rather than held on the IsisContext instance as a threadlocal; that's because IsisSystemForTest actually calls IsisContext.testReset() to discard the IsisContext singleton.

- IsisSessionFilter (which sits in front of RO viewer) now always checks that the metamodel is vaild. It does this simply by querying the IsisContext. (If WebAppBootstrapper was used to bootstrap, rather than wicket viewer, then IsisSystem.init() is still called so no diff in end result)

- ScenarioException simply does a fail() if no instance available on threadlocal.

- CukeGlueAbstract similarly has simple guards for if ScenarioException available, to reduce amount of noise when problem is metamodel invalid

- formatting changes only for IsisWicketApplication

- WebRequestCycleForIsis looks for validation errors first-off in its onException handler, if any are found then immediately redirects to the MmvErrorPage. This seems to work fine for always rendering MMV page.


- IsisMojoAbstract keeps the IsisSystem initialized while it executes.

  1. … 9 more files in changeset.
ISIS-1313: new 'commonSchemas' configuration parameter.

ISIS-1237: swagger mojo, also some updates to docs and simpleapp archetype

    • -0
    • +134
  1. … 3 more files in changeset.
ISIS-1258: adding xsd goal for mvn plugin.

    • -0
    • +155
ISIS-1194: simplify isis-maven-plugin to use appManifest (rather than isisConfigDir).

As a result, delete the IsisMetaModel class, since no longer required.

  1. … 5 more files in changeset.
ISIS-1194: simplfying the bootstrap and wiring of components, in particular around PersistenceSessionFactory


- 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


- 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


- deleted AdapterManagerDefault, no longer used

  1. … 64 more files in changeset.
ISIS-1194: moving application-scoped components to RuntimeContextAbstract superclass; IsisTransaction simplifications

- IsisConfigurationDefault now implements ConfigurationService (and using IsisConfigurationDefault concrete class rather than interface where necessary)

- RuntimeContext implementations now require a ServiceInjector, and default the deployment category and configuration; these are set up and immutable for the runtime context

- meaning that RuntimeContext no longer is ServiceInjectorAware.


- IsisTransaction passed through the PersistenceSession (rather than obtain from IsisContext)

  1. … 21 more files in changeset.
ISIS-848: enhancing IsisComponentProvider impls to honour GlobSpec if present.


- chaged GlobSpec API to return list of classes of fixture scripts, rather than the fixture scripts themselves.

- standardized method names of IsisComponentProvider interface ("provide..." instead of a mixture of "provide..." and "obtain...")

-moved common functionality into IsisComponentProviderAbstract, including having InstallerComponentProviderUsingInstallers eagerly evaluating

- removed superfluous constants in SystemConstants

- simplified ServicesInstaller#getServices(DeploymentType) to just #getServices(...), since the globSpec will now be the preferred way to vary runtimes

- made the ServicesInstaller impls all inherit from ServicesInstallerAbstract

- extending IsisConfigurationBuilder and InstallerLookup to allow the IsisComponentProvider to put new properties into the config

  1. … 20 more files in changeset.
ISIS-284: use injected @Parameter for configuration rather than reading directly.

ISIS-284: renaming of mojo classes to better capture intent (IsisRunnable -> MetaModelProcessor, IsisMojoReporter -> MetaModelProcessor.Context).

Also add the MavenProject into the MetaModelValidator.Context interface, and make private in IsisMojoAbstract. That way all the stuff that the subclasses (eg IsisMojoValidate) needs is available in the MetaModelProcessor.Context API)

    • -0
    • +46
ISIS-284: refactored isis-maven-plugin, factoring out IsisMojoAbstract superclass to remove boilerplate in future mojos.

    • -0
    • +184
    • -0
    • +18
    • -0
    • +59
ISIS-284: moving isis-maven-plugin from todo app's webapp module and instead in the dom module. Supported this by extending the ServicesInstaller API, adding setIgnoreFailures.

Also added into simpleapp example.

  1. … 8 more files in changeset.
ISIS-284: moved isis-maven-plugin into core; deleted unused code; todoapp example now references the plugin in its webapp project.

    • -0
    • +171
    • -0
    • +36
    • -0
    • +43
    • -0
    • +36
  1. … 15 more files in changeset.