You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/01/21 12:17:00 UTC

[jira] [Commented] (ISIS-2270) Rethink, who shall manage Lifecycles of DomainObjects, ViewModels and Mixins

    [ https://issues.apache.org/jira/browse/ISIS-2270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17020178#comment-17020178 ] 

ASF subversion and git services commented on ISIS-2270:
-------------------------------------------------------

Commit ab644549f3cba64cfa03e516085a13d3c79af4b7 in isis's branch refs/heads/master from Andi Huber
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=ab64454 ]

ISIS-2270: redesign FactoryService:

- add #get(Class)
- deprecate #instantiate(Class)

also adding scope meta annot. to @DomainObject @Mixin @ViewModel

> Rethink, who shall manage Lifecycles of DomainObjects, ViewModels and Mixins
> ----------------------------------------------------------------------------
>
>                 Key: ISIS-2270
>                 URL: https://issues.apache.org/jira/browse/ISIS-2270
>             Project: Isis
>          Issue Type: Improvement
>            Reporter: Daniel Keir Haywood
>            Assignee: Andi Huber
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> 1) Document and annotate @DomainObject, @ViewModel and @Mixin with @Scope(SCOPE_PROTOTYPE)
> 2) FactoryService#instantiate needs a semantic update
> We want Spring to discover these types from the classpath (so that we can build the metamodel eagerly), but we don't want it to manage them, or do we?
> Using @Scope(PROTOTYPE) is the closest we can come to expressing that without (attempting to) define a custom scope for each of these three types., analogous to factoryService#instantiate for transient objects.
> In practical terms, inventing a custom "entity" scope is probably impossible due to DN's design (the enhancer creates a dnNewInstance method and this is called upon as a factory).
> Instead, then, we "veto" any of these domain types so that Spring is NOT allowed to instantiate any of them.
> The docs should be updated to explain what we're doing here.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)