[
https://issues.apache.org/jira/browse/ISIS-1342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15211506#comment-15211506
]
ASF subversion and git services commented on ISIS-1342:
-------------------------------------------------------
Commit 8bf7fd7f04049e3632454c34e1ca329df1a936f7 in isis's branch
refs/heads/master from [~danhaywood]
[ 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.
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.
Improvements:
- IsisMojoAbstract keeps the IsisSystem initialized while it executes.
> The metamodel validation error page doesn't reliably render itself if there
> are errors.
> ---------------------------------------------------------------------------------------
>
> Key: ISIS-1342
> URL: https://issues.apache.org/jira/browse/ISIS-1342
> Project: Isis
> Issue Type: Bug
> Components: Core
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Priority: Minor
> Fix For: 1.12.0
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)