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

BaseUpgradeWebModuleRelease and BaseUpgradeServiceModuleRelease are executed anytime we deploy a web module

    Details

      Description

      Most of the web modules implement a register method in this way:

      public class ChatWebUpgrade implements UpgradeStepRegistrator {
      
      	@Override
      	public void register(Registry registry) {
      		BaseUpgradeWebModuleRelease upgradeWebModuleRelease =
      			new BaseUpgradeWebModuleRelease() {
      
      				@Override
      				protected String getBundleSymbolicName() {
      					return "com.liferay.chat.web";
      				}
      
      				@Override
      				protected String[] getPortletIds() {
      					return new String[] {"1_WAR_chatportlet"};
      				}
      
      			};
      
      		try {
      			upgradeWebModuleRelease.upgrade();
      		}
      		catch (UpgradeException ue) {
      			throw new RuntimeException(ue);
      		}
      
      		registry.register(
      			"com.liferay.chat.web", "0.0.0", "1.0.0", new DummyUpgradeStep());
      
      		registry.register(
      			"com.liferay.chat.web", "0.0.1", "1.0.0", new UpgradePortletId());
      	}
      

      And this causes that the upgradeWebModuleRelease is executed anytime the module is deployed. However that upgrade process is only needed the first time we come from an old version (to add the release record).

      With the issue LPS-72046 we avoid to print a log trace anytime this class is executed since it's confusing. However we should find a way to execute this logic just in the upgrade process.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              alberto.chaparro Alberto Chaparro
              Recent user:
              Kiyoshi Lee
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package