Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1414

nextTransaction can cause null pointers with the new MetricsService.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.12.1
    • Fix Version/s: 1.13.0
    • Component/s: Core
    • Labels:
      None

      Description

      The reason is that request-scoped services are implemented as transaction services. Most of the time the scope of a request and the scope of a transacion are one and the same: there is just one transaction per scope. However, TransactionService#nextTransaction admits for there being multiple transactions per request.

      This bug is that the current implementation for RequestScoped does the init/close as part of the Transaction management. Instead, this should be part of the PersistenceSession#open/close (a PersistenceSession wraps a JDO session, so basically corresponds to the request).

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit cdaaa74a6449a5893828119ee8e2e3e61daf9f83 in isis's branch refs/heads/ISIS-1414 from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=cdaaa74 ]

        ISIS-1414: moving the @RequestScoped initialization/close stuff out of IsisTransactionManager and IsisTransaction, and into PersistenceSession.

        Also:

        • CommandService#startTransaction is no longer called.
        • remove unused code/hashmap in PersistenceSession
        Show
        jira-bot ASF subversion and git services added a comment - Commit cdaaa74a6449a5893828119ee8e2e3e61daf9f83 in isis's branch refs/heads/ ISIS-1414 from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=cdaaa74 ] ISIS-1414 : moving the @RequestScoped initialization/close stuff out of IsisTransactionManager and IsisTransaction, and into PersistenceSession. Also: CommandService#startTransaction is no longer called. remove unused code/hashmap in PersistenceSession
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 21b27fe49790adc78a3fe7804ff4feba7790bbed in isis's branch refs/heads/ISIS-1414 from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=21b27fe ]

        ISIS-1414: moving the @RequestScoped initialization/close stuff out of IsisTransactionManager and IsisTransaction, and into PersistenceSession.

        Also:

        • CommandService#startTransaction is no longer called.
        • remove unused code/hashmap in PersistenceSession
        Show
        jira-bot ASF subversion and git services added a comment - Commit 21b27fe49790adc78a3fe7804ff4feba7790bbed in isis's branch refs/heads/ ISIS-1414 from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=21b27fe ] ISIS-1414 : moving the @RequestScoped initialization/close stuff out of IsisTransactionManager and IsisTransaction, and into PersistenceSession. Also: CommandService#startTransaction is no longer called. remove unused code/hashmap in PersistenceSession
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit ad9cec42cb3828f2f9c4d43c62bd787ccff94d81 in isis's branch refs/heads/ISIS-1414 from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=ad9cec4 ]

        ISIS-1414: removing 'numberOfPropertiesModified' from ixn.xsd and MetricsService; this is xactn-scoped information, not request-scoped. Also introduced WithTransactionScoped as a means to indicate which of the request-scoped members are really transaction-scoped.

        Show
        jira-bot ASF subversion and git services added a comment - Commit ad9cec42cb3828f2f9c4d43c62bd787ccff94d81 in isis's branch refs/heads/ ISIS-1414 from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=ad9cec4 ] ISIS-1414 : removing 'numberOfPropertiesModified' from ixn.xsd and MetricsService; this is xactn-scoped information, not request-scoped. Also introduced WithTransactionScoped as a means to indicate which of the request-scoped members are really transaction-scoped.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 21b27fe49790adc78a3fe7804ff4feba7790bbed in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=21b27fe ]

        ISIS-1414: moving the @RequestScoped initialization/close stuff out of IsisTransactionManager and IsisTransaction, and into PersistenceSession.

        Also:

        • CommandService#startTransaction is no longer called.
        • remove unused code/hashmap in PersistenceSession
        Show
        jira-bot ASF subversion and git services added a comment - Commit 21b27fe49790adc78a3fe7804ff4feba7790bbed in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=21b27fe ] ISIS-1414 : moving the @RequestScoped initialization/close stuff out of IsisTransactionManager and IsisTransaction, and into PersistenceSession. Also: CommandService#startTransaction is no longer called. remove unused code/hashmap in PersistenceSession
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit ad9cec42cb3828f2f9c4d43c62bd787ccff94d81 in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=ad9cec4 ]

        ISIS-1414: removing 'numberOfPropertiesModified' from ixn.xsd and MetricsService; this is xactn-scoped information, not request-scoped. Also introduced WithTransactionScoped as a means to indicate which of the request-scoped members are really transaction-scoped.

        Show
        jira-bot ASF subversion and git services added a comment - Commit ad9cec42cb3828f2f9c4d43c62bd787ccff94d81 in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=ad9cec4 ] ISIS-1414 : removing 'numberOfPropertiesModified' from ixn.xsd and MetricsService; this is xactn-scoped information, not request-scoped. Also introduced WithTransactionScoped as a means to indicate which of the request-scoped members are really transaction-scoped.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit bbdc9fca438d9f2d2cf19128e5f9f2a471e831ea in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=bbdc9fc ]

        ISIS-1414: introduced sequence for chg.xsd so that PublishedObjects can have a sequence; promoted WithTransactionScope interface to applib; QueryResultsCache now implements this interface.

        The "transactionId" is really an interaction id, and there could be multiple transactions within a single such interaction. Therefore any PublishedObjects (= set of dirtied objects within a transaction) needs to have a sequence number to distinguish from other transactions, and also from any interaction executions.

        Show
        jira-bot ASF subversion and git services added a comment - Commit bbdc9fca438d9f2d2cf19128e5f9f2a471e831ea in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=bbdc9fc ] ISIS-1414 : introduced sequence for chg.xsd so that PublishedObjects can have a sequence; promoted WithTransactionScope interface to applib; QueryResultsCache now implements this interface. The "transactionId" is really an interaction id, and there could be multiple transactions within a single such interaction. Therefore any PublishedObjects (= set of dirtied objects within a transaction) needs to have a sequence number to distinguish from other transactions, and also from any interaction executions.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 53401049e9beabd11718148999ab7594679f2ca1 in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5340104 ]

        ISIS-1414: tiny fix to docs

        Show
        jira-bot ASF subversion and git services added a comment - Commit 53401049e9beabd11718148999ab7594679f2ca1 in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5340104 ] ISIS-1414 : tiny fix to docs
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 5d9185285b6f5268fad7807f25fa624a4bfb0c27 in isis's branch refs/heads/ISIS-1427 from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5d91852 ]

        ISIS-1414: ensures that getChangedObjectProperties() is called

        for the MetricsService, even if not called for auditing (ie were no audited objects changed in the xactn)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 5d9185285b6f5268fad7807f25fa624a4bfb0c27 in isis's branch refs/heads/ ISIS-1427 from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5d91852 ] ISIS-1414 : ensures that getChangedObjectProperties() is called for the MetricsService, even if not called for auditing (ie were no audited objects changed in the xactn)

          People

          • Assignee:
            danhaywood Dan Haywood
            Reporter:
            danhaywood Dan Haywood
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development