Geronimo
  1. Geronimo
  2. GERONIMO-5527

Support -c/--clean option in the server startup script to clean cache for OSGi/tomcat

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: osgi
    • Security Level: public (Regular issues)
    • Labels:
      None

      Description

      To fix server bugs in geronimo 2.x , we usually replace the module with a fixed module to see if the bug was fixed. But in Geronimo 3.0, it does not work because there's osgi cache to prevent the fixed module from loading.

      we also have some tomcat cache within var/catalina/, we need to clean them too. We need a switch to clear the whole OSGi/Tomcat cache to resolve this for now.

        Issue Links

          Activity

          Hide
          Shawn Jiang added a comment - - edited

          trunk@r1025840 provided an option

          geronimo run -c  
          or  
          geronimo run --clean
           

          to clean the osgi bundle cache before starting the server.

          Show
          Shawn Jiang added a comment - - edited trunk@r1025840 provided an option geronimo run -c or geronimo run --clean to clean the osgi bundle cache before starting the server.
          Hide
          Shawn Jiang added a comment -

          reopen it because we still need to add tomcat cache cleanup.

          Show
          Shawn Jiang added a comment - reopen it because we still need to add tomcat cache cleanup.
          Hide
          Shawn Jiang added a comment -

          Just realized there's a framework property to determine the cache cleanup. We should levarage it instead of using FileUtil.deleteall() for OSGi cache.

          ----------------------------------------------
          org.osgi.framework.storage.clean - Determines whether the bundle cache is flushed. The value can either be "none" or "onFirstInit", where "none" does not flush the bundle cache and "onFirstInit" flushes the bundle cache when the framework instance is first initialized. The default value is "none".
          -----------------------------------------------

          Show
          Shawn Jiang added a comment - Just realized there's a framework property to determine the cache cleanup. We should levarage it instead of using FileUtil.deleteall() for OSGi cache. ---------------------------------------------- org.osgi.framework.storage.clean - Determines whether the bundle cache is flushed. The value can either be "none" or "onFirstInit", where "none" does not flush the bundle cache and "onFirstInit" flushes the bundle cache when the framework instance is first initialized. The default value is "none". -----------------------------------------------
          Hide
          Shawn Jiang added a comment -

          Committed additional fixes to m2 and trunk to:

          1, Levarage OSGi standard cache clean flag
          2, Externalize other resources to clean to geronimo script.

          ----------------------------------------------------------------------------------------------------
          ASF #1025840 Thu Oct 21 02:05:53 EDT 2010 genspring GERONIMO-5527 provide a way to clean osgi bundle cache when starting the server.
          Files Changed
          MODIFY /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
          MODIFY /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
          MODIFY /geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/daemon/DaemonCLParser.java
          MODIFY /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo

          Repository Revision Date User Message
          ASF #1063193 Tue Jan 25 04:47:01 EST 2011 genspring GERONIMO-5527 Support c/-clean option in the server startup script to clean cache for OSGi/tomcat

          1, Levarage OSGi standard cache clean flag
          2, Externalize other resources to clean to geronimo script.
          Files Changed
          MODIFY /geronimo/server/branches/3.0-M2/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
          MODIFY /geronimo/server/branches/3.0-M2/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
          MODIFY /geronimo/server/branches/3.0-M2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java

          Show
          Shawn Jiang added a comment - Committed additional fixes to m2 and trunk to: 1, Levarage OSGi standard cache clean flag 2, Externalize other resources to clean to geronimo script. ---------------------------------------------------------------------------------------------------- ASF #1025840 Thu Oct 21 02:05:53 EDT 2010 genspring GERONIMO-5527 provide a way to clean osgi bundle cache when starting the server. Files Changed MODIFY /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat MODIFY /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java MODIFY /geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/daemon/DaemonCLParser.java MODIFY /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo Repository Revision Date User Message ASF #1063193 Tue Jan 25 04:47:01 EST 2011 genspring GERONIMO-5527 Support c/ -clean option in the server startup script to clean cache for OSGi/tomcat 1, Levarage OSGi standard cache clean flag 2, Externalize other resources to clean to geronimo script. Files Changed MODIFY /geronimo/server/branches/3.0-M2/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo MODIFY /geronimo/server/branches/3.0-M2/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat MODIFY /geronimo/server/branches/3.0-M2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
          Hide
          Jarek Gawor added a comment -

          We shouldn't need to change any geronimo batch or shell scripts for this. The list of directories to remove can be specified in etc/system.properties file. That way, the user could easily add additional directories and it will seamlessly work with GEP.

          Show
          Jarek Gawor added a comment - We shouldn't need to change any geronimo batch or shell scripts for this. The list of directories to remove can be specified in etc/system.properties file. That way, the user could easily add additional directories and it will seamlessly work with GEP.
          Hide
          Shawn Jiang added a comment -

          Agree It's cleaner to move the directories to etc/system.propreties.

          But current directories are passed into the server with a system proproties. GEP could pick it up easily too. : )

          Show
          Shawn Jiang added a comment - Agree It's cleaner to move the directories to etc/system.propreties. But current directories are passed into the server with a system proproties. GEP could pick it up easily too. : )
          Hide
          Jarek Gawor added a comment -

          Committed additional improvements to trunk (revision 1065795) and M2 branch (revision 1065801). The list of directories to remove is now specified in etc/system.properties file.

          Show
          Jarek Gawor added a comment - Committed additional improvements to trunk (revision 1065795) and M2 branch (revision 1065801). The list of directories to remove is now specified in etc/system.properties file.

            People

            • Assignee:
              Jarek Gawor
              Reporter:
              Shawn Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development