You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2016/03/15 09:04:33 UTC

[jira] [Updated] (ISIS-1228) Reorganizing/splitting out DomainObjectContainer service.

     [ https://issues.apache.org/jira/browse/ISIS-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Haywood updated ISIS-1228:
------------------------------
    Description: 
Originally this ticket was much narrower in scope, simply to introduce nextTransaction() into fixture scripts.  

This was implemented by adding nextTransaction() to DomainObjectContainer.

>From there though I decided that DOC was become too bloated, so split it out into a number of other domain services:
- TransactionService ... for this new method and also flushTransaction

but then eventually also:
- RepositoryService (persist, allMatches, uniqueMatch, firstMatch)
- MessageService  (informUser, warnUser, raiseError)
- ConfigurationService (getProperties etc)
- ServiceRegistry (lookupService, injectServicesInto)

The existing DOC methods have been deprecated, the DOCDefault impl delegates to the new services.

~~~~
The original request for this ticket was raised by Oscar:
When using FixtureScripts, there can be many actions that, on the real world, are execute in different time contexts.

For example, a user creates an Account on the webapp and after that executes different actions.

That’s relevant if using the queryResultsCache service (or the new planned “@Action” annotation extension) because the results previously created (i.e., the Account) might be available on the cache.

So perhaps some mechanism like the nextTransation() method might be also introduced on FixtureScripts.

What do you think?

~~~~~~~
Dan's reply:
Makes sense.

There is a nextTransaction() method in the AbstractIntegTest class, you could see how that is implemented and see if it can be adapted?

Or, another idea is that the framework could run each FixtureScript automatically in a separate transaction; that would be a better simulation of a sequence of user interactions?

  was:
originally raised by Oscar:
When using FixtureScripts, there can be many actions that, on the real world, are execute in different time contexts.

For example, a user creates an Account on the webapp and after that executes different actions.

That’s relevant if using the queryResultsCache service (or the new planned “@Action” annotation extension) because the results previously created (i.e., the Account) might be available on the cache.

So perhaps some mechanism like the nextTransation() method might be also introduced on FixtureScripts.

What do you think?

~~~~~~~
Dan's reply:
Makes sense.

There is a nextTransaction() method in the AbstractIntegTest class, you could see how that is implemented and see if it can be adapted?

Or, another idea is that the framework could run each FixtureScript automatically in a separate transaction; that would be a better simulation of a sequence of user interactions?

        Summary: Reorganizing/splitting out DomainObjectContainer service.  (was: Introduce nextTransaction() into fixture scripts.  Generalized to reorganizing/splitting out DomainObjectContainer service.)

> Reorganizing/splitting out DomainObjectContainer service.
> ---------------------------------------------------------
>
>                 Key: ISIS-1228
>                 URL: https://issues.apache.org/jira/browse/ISIS-1228
>             Project: Isis
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: core-1.8.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: 1.12.0
>
>
> Originally this ticket was much narrower in scope, simply to introduce nextTransaction() into fixture scripts.  
> This was implemented by adding nextTransaction() to DomainObjectContainer.
> From there though I decided that DOC was become too bloated, so split it out into a number of other domain services:
> - TransactionService ... for this new method and also flushTransaction
> but then eventually also:
> - RepositoryService (persist, allMatches, uniqueMatch, firstMatch)
> - MessageService  (informUser, warnUser, raiseError)
> - ConfigurationService (getProperties etc)
> - ServiceRegistry (lookupService, injectServicesInto)
> The existing DOC methods have been deprecated, the DOCDefault impl delegates to the new services.
> ~~~~
> The original request for this ticket was raised by Oscar:
> When using FixtureScripts, there can be many actions that, on the real world, are execute in different time contexts.
> For example, a user creates an Account on the webapp and after that executes different actions.
> That’s relevant if using the queryResultsCache service (or the new planned “@Action” annotation extension) because the results previously created (i.e., the Account) might be available on the cache.
> So perhaps some mechanism like the nextTransation() method might be also introduced on FixtureScripts.
> What do you think?
> ~~~~~~~
> Dan's reply:
> Makes sense.
> There is a nextTransaction() method in the AbstractIntegTest class, you could see how that is implemented and see if it can be adapted?
> Or, another idea is that the framework could run each FixtureScript automatically in a separate transaction; that would be a better simulation of a sequence of user interactions?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)