[MGNLXAA-90] Disable deactivation and enable activation without UUID check in Configuration for the first and second level nodes Created: 21/Apr/15  Updated: 25/Nov/15  Resolved: 06/May/15

Status: Closed
Project: Transactional Activation
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2.2

Type: Improvement Priority: Neutral
Reporter: Evzen Fochr Assignee: Evzen Fochr
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
dependency
depends upon MGNLACTIVATION-58 Disable deactivation and enable activ... Closed
is depended upon by MGNLEE-389 Add UITest for "Disable deactivation ... Closed
relation
is related to MGNLUI-3426 Disable unPublish action in Configura... Closed
is related to MGNLUI-3677 Backport – Disable unPublish action i... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

For config workspace and its lvl1 and 2 nodes disable deactivation to prevent accidental damage to the instance. Activation should be done by only checking existence of path, because nodes generated during installation have different UUID's on author and public instance and change of UUID is done delete -> create that can broke public instance.



 Comments   
Comment by Jan Haderka [ 24/Apr/15 ]

Isn't the code you execute in PNFE same as one in INFE? You could do better than copy it over

Comment by Roman Kovařík [ 28/Apr/15 ]

info.magnolia.module.exchangetransactional.XAReceiveFilterTest#testUpdateConfigWorkspace/testRemoveConfigWorkspace:

  • the tests are almost the same with tons of code for setup which it makes really hard to read
  • missing given/when/then
  • both tests have inner classes which extends another inner class defined in the file. Couldn't you just merge it?
  • private HierarchyManager is not used
  • user are using new variables for HttpServletRequest / ActivationModule although there are such fields in the class defined
  • commented code // setAtomName("blah.xml");
  • the code is not formatted
Comment by Roman Kovařík [ 05/May/15 ]

QA:

  • You get no exception / message when trying to deactivate a module node since it tries to get node by UUID and ends up in catch block with only the debug message.
  • Activation of a module node:
    2015-05-05 11:12:27,716 INFO  info.magnolia.module.activation.BaseSyndicatorImpl: Exchange: activation succeeded [/modules/personalization-segmentation-app]
    2015-05-05 11:12:33,275 INFO  nolia.module.exchangetransactional.XAReceiveFilter: 225:1430817153244 User superuser successfully activated /modules/personalization-segmentation-app on magnoliaPublic.
    2015-05-05 11:12:33,289 ERROR nolia.module.exchangetransactional.XAReceiveFilter: Backup copy of the content that should have been present until the end of transaction was not found. Please check your logs for earlier errors and check consistence of content with uuid 56b35af7-f3f0-4cd8-9294-8af86995e9c4
    javax.jcr.ItemNotFoundException: 56b35af7-f3f0-4cd8-9294-8af86995e9c4
    	at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:384)
    	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:328)
    	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:622)
    	at org.apache.jackrabbit.core.SessionImpl.getNodeById(SessionImpl.java:536)
    	at org.apache.jackrabbit.core.SessionImpl.getNodeByIdentifier(SessionImpl.java:1102)
    	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNodeByIdentifier(DelegateSessionWrapper.java:182)
    	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNodeByIdentifier(DelegateSessionWrapper.java:182)
    	at info.magnolia.jcr.wrapper.NodeWrappingDelegateSessionWrapper.getNodeByIdentifier(NodeWrappingDelegateSessionWrapper.java:58)
    	at info.magnolia.cms.core.DefaultHierarchyManager.getContentByUUID(DefaultHierarchyManager.java:410)
    	at info.magnolia.module.exchangetransactional.XAReceiveFilter.commit(XAReceiveFilter.java:280)
    	at info.magnolia.module.exchangetransactional.XAReceiveFilter.receive(XAReceiveFilter.java:155)
    	at info.magnolia.module.activation.ReceiveFilter.doFilter(ReceiveFilter.java:183)
    	at info.magnolia.module.exchangetransactional.XAReceiveFilter.doFilter(XAReceiveFilter.java:101)
    	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.cms.security.auth.login.LoginFilter.doFilter(LoginFilter.java:127)
    	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.enterprise.registration.RegistrationFilter.doFilter(RegistrationFilter.java:56)
    	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
    	at info.magnolia.cms.filters.CosMultipartRequestFilter.doFilter(CosMultipartRequestFilter.java:89)
    	at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.module.devicedetection.filter.DeviceDetectionFilter.doFilter(DeviceDetectionFilter.java:71)
    	at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.personalization.preview.filter.PreviewFilter.doFilter(PreviewFilter.java:92)
    	at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
    	at info.magnolia.personalization.trait.AbstractTraitDetectorFilter.doFilter(AbstractTraitDetectorFilter.java:61)
    	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.personalization.trait.AbstractTraitDetectorFilter.doFilter(AbstractTraitDetectorFilter.java:61)
    	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:112)
    	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.cms.filters.ContextFilter.doFilter(ContextFilter.java:129)
    	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
    	at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65)
    	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    	at info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:106)
    	at info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:66)
    	at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:107)
    	at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:93)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:745)
    2015-05-05 11:12:33,297 INFO  info.magnolia.module.activation.BaseSyndicatorImpl: Exchange: activation succeeded [/modules/personalization-segmentation-app]
    
Generated at Mon Feb 12 11:06:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.