Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-119524

Service Builder entity is still being cached even when the "cache-enabled" attribute is set to false in service.xml

    Details

      Description

      Description
      This issue is reproduced when using OSGI DS for the Service Builder's dependency injection.

      This issue is not an issue in master, due to the new changes to the functionality of this attribute:

      Steps to Reproduce

      1. Startup Liferay 7.2 w/ database access
      2. Deploy the attached test-cache-enabled Service Builder modules: test-cache-enabled-jars.zip (See below for additional details)
      3. Login
      4. Navigate to http://localhost:8080/api/jsonws 
        1. Navigate to context name: foo
      5. Select add-foo
        1. Input userName: foo
        2. Invoke
      6. Select list-user-names
        1. Invoke
      7. Notice: entry "foo" is shown
      8. Navigate to your database
        1. Inspect table: FOO_foo
        2. Notice the added entry with username: foo
        3. Modify the entry to username: bar
        4. Apply changes to the entry
      9. Select list-user-names
        1. Invoke

      Expected Result
      The results show the updated username value: "bar"

      Actual Result
      The results show the old username value: "foo"


      Additional Info: test-cache-enabled Service Builder modules
      The attached test-cache-enabled Service Builder modules are created using Liferay blade's Service Builder Template.

      The only additions made to the template were:

      • Setting cache-enabled to false for the Foo entity
      • Introducing service calls to add Foo, remove Foo, and list Foo usernames

        Attachments

          Activity

            People

            Assignee:
            summer.zhang Summer Zhang
            Reporter:
            eric.yan Eric Yan
            Participants of an Issue:
            Recent user:
            Jason Pince
            Engineering Assignee:
            Eric Yan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              17 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP95
                7.0.10.15 DXP SP15
                7.0.X
                7.1.10 DXP FP20
                7.1.10.5 SP5
                7.1.X
                7.2.10 DXP FP9
                7.2.X
                7.3.X
                7.3.6 CE GA7
                Master