Commit 8bf7fd7f04049e3632454c34e1ca329df1a936f7 in isis's branch refs/heads/master from Dan Haywood
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=8bf7fd7 ]
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.
- 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.