PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-26064

Overriding hibernate cache configurations via plugins causes new configuration to not be reported properly in JMX

    Details

    • Branch Version/s:
      6.1.x, 6.0.x
    • Backported to Branch:
      Committed
    • Caused by:
      Other bug fix
    • Where was the bug?:
      Java
    • Similar Issues:
      Show 5 results 

      Description

      To reproduce:
      (1) create plugin w/ hibernate cache config file override (e.g. set the timeToIdleSeconds to 6000)
      (2) Deploy plugin
      (3) Check in JMX console to see if the timeToIdleSeconds has been properly changed.

        Issue Links

          Activity

          Hide
          Michael Saechang added a comment -

          Committed on:
          6.1.x GIT ID: 08bec9c88ea84f9e96a18408eeb8a875a36b2825.
          6.2.x GIT ID: d4cf11b7d86173784951fd655e7b2272f753d715.

          Show
          Michael Saechang added a comment - Committed on: 6.1.x GIT ID: 08bec9c88ea84f9e96a18408eeb8a875a36b2825. 6.2.x GIT ID: d4cf11b7d86173784951fd655e7b2272f753d715.
          Hide
          Paul Piao (Inactive) added a comment -

          PASSED Manual Testing using the following steps:

          1. Setup portal to have one node
          2. Set up VisualVm
          a. run \jdk1.6.0_25\bin\jvisualvm.exe
          b. Add Plugins:
          i. Tools> Plugins
          ii. Select [Available Plugins] tab
          iii. Check VisualVM-MBeans
          3. In VisualVM, MBeans tab. net.sf.ehcache-> CacheConfiguration-> hibernate-override.xml]
          4. Observe the default values for example:
          name="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl"
          5. Configure the following file in the plugin to override cache:
          \sample-ehcache-override-portlet.rar\sample-ehcache-override-portlet\docroot\WEB-INF\src\ehcache\hibernate-override.xml
          a. Change the "timeToIdleSeconds" value to be different from the default:
          <cache
          eternal="false"
          maxElementsInMemory="10000"
          name="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl"
          overflowToDisk="false"
          timeToIdleSeconds="600"
          >
          </cache>
          6. Deploy the plugin
          7. Affirm that the default value is replaced by the values in the plugin.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. 6.2.x GIT ID: c3f53fabae6cf9adb5a8a99e75388538e1250931.

          The default values is not replaced.

          Fixed on:
          Tomcat 7.0 + MySQL 5. 6.1.x EE GIT ID: f2e635c88fc1f008865e04b058e2117a9eea99b5.
          Tomcat 7.0 + MySQL 5. 6.2.x GIT ID: 0c6c2c89d5eca7d7459fc23e074e60c52e4d28f1.

          On fixed ID. I can find the default values is replaced.

          Show
          Paul Piao (Inactive) added a comment - PASSED Manual Testing using the following steps: 1. Setup portal to have one node 2. Set up VisualVm a. run \jdk1.6.0_25\bin\jvisualvm.exe b. Add Plugins: i. Tools> Plugins ii. Select [Available Plugins] tab iii. Check VisualVM-MBeans 3. In VisualVM, MBeans tab. net.sf.ehcache-> CacheConfiguration-> hibernate-override.xml] 4. Observe the default values for example: name="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl" 5. Configure the following file in the plugin to override cache: \sample-ehcache-override-portlet.rar\sample-ehcache-override-portlet\docroot\WEB-INF\src\ehcache\hibernate-override.xml a. Change the "timeToIdleSeconds" value to be different from the default: <cache eternal="false" maxElementsInMemory="10000" name="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl" overflowToDisk="false" timeToIdleSeconds="600" > </cache> 6. Deploy the plugin 7. Affirm that the default value is replaced by the values in the plugin. Reproduced on: Tomcat 7.0 + MySQL 5. 6.2.x GIT ID: c3f53fabae6cf9adb5a8a99e75388538e1250931. The default values is not replaced. Fixed on: Tomcat 7.0 + MySQL 5. 6.1.x EE GIT ID: f2e635c88fc1f008865e04b058e2117a9eea99b5. Tomcat 7.0 + MySQL 5. 6.2.x GIT ID: 0c6c2c89d5eca7d7459fc23e074e60c52e4d28f1. On fixed ID. I can find the default values is replaced.
          Hide
          Michael Saechang added a comment -

          Thank you for testing Paul. Closing as 'Fixed'.

          Show
          Michael Saechang added a comment - Thank you for testing Paul. Closing as 'Fixed'.
          Hide
          Paul Piao (Inactive) added a comment -

          PASSED Manual Testing using the following steps:

          1. Setup portal to have one node
          2. Set up VisualVm
          a. run \jdk1.6.0_25\bin\jvisualvm.exe
          b. Add Plugins:
          i. Tools> Plugins
          ii. Select [Available Plugins] tab
          iii. Check VisualVM-MBeans
          3. In VisualVM, MBeans tab. net.sf.ehcache-> CacheConfiguration-> hibernate-override.xml]
          4. Observe the default values for example:
          name="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl"
          5. Configure the following file in the plugin to override cache:
          \sample-ehcache-override-portlet.rar\sample-ehcache-override-portlet\docroot\WEB-INF\src\ehcache\hibernate-override.xml
          a. Change the "timeToIdleSeconds" value to be different from the default:
          <cache
          eternal="false"
          maxElementsInMemory="10000"
          name="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl"
          overflowToDisk="false"
          timeToIdleSeconds="600"
          >
          </cache>
          6. Deploy the plugin
          7. Affirm that the default value is replaced by the values in the plugin.

          Fixed on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x CE GIT ID: 78eb221407070614ff8bf6571f0b898dcfba520f.

          I can find the default values is replaced.

          Show
          Paul Piao (Inactive) added a comment - PASSED Manual Testing using the following steps: 1. Setup portal to have one node 2. Set up VisualVm a. run \jdk1.6.0_25\bin\jvisualvm.exe b. Add Plugins: i. Tools> Plugins ii. Select [Available Plugins] tab iii. Check VisualVM-MBeans 3. In VisualVM, MBeans tab. net.sf.ehcache-> CacheConfiguration-> hibernate-override.xml] 4. Observe the default values for example: name="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl" 5. Configure the following file in the plugin to override cache: \sample-ehcache-override-portlet.rar\sample-ehcache-override-portlet\docroot\WEB-INF\src\ehcache\hibernate-override.xml a. Change the "timeToIdleSeconds" value to be different from the default: <cache eternal="false" maxElementsInMemory="10000" name="com.liferay.portlet.asset.model.impl.AssetTagPropertyImpl" overflowToDisk="false" timeToIdleSeconds="600" > </cache> 6. Deploy the plugin 7. Affirm that the default value is replaced by the values in the plugin. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x CE GIT ID: 78eb221407070614ff8bf6571f0b898dcfba520f. I can find the default values is replaced.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 50 weeks, 5 days ago

                Development

                  Structure Helper Panel