(Andreas Brenk) wrote:

Hi,

in a current project the website repository Magnolia uses gets
modified by another part of the application that directly accesses the
JCR API. The Magnolia adminCentral is not used to modify content. My
problem now is: Magnolia only sees the repository as it was when the
server was started. No modifications made during the same server
runtime show up. Wether they are moved nodes / pages or updated
paragraphs. Only a server restart makes these changes visible.

I already tried modifying the Magnolia code in several places and
calling Session#refresh() or Item#refresh() but my changes don't show
up. I read section 7.1.3.4 ("Seeing Changes Made by Other Sessions")
of the JCR spec over and over again but to no avail.
I had similar problems. I would point you to a JIRA task describing the problem, if JIRA wasn't down again and again and again.

So here's a link to gmane:
http://thread.gmane.org/gmane.comp.cms.magnolia.devel/3939

For some reason, I still have to refresh the hierarchy manager with

   /*
    * This method is a workaround for jackrabbit bug
    * http://issues.apache.org/jira/browse/JCR-155
    *
* Better than to invalidate the session like in the original magnolia code.
    */

   private HierarchyManager refreshHierarchyManager( String repository ) {
       HierarchyManager hierarchyManager;

this.getRequest().getSession().removeAttribute( "mgnlHMgr_" + repository + "_" + ContentRepository.DEFAULT_WORKSPACE ); this.getRequest().getSession().removeAttribute( "mgnlAccessMgr_" + repository + "_default" ); this.getRequest().getSession().removeAttribute( "mgnlRepositorySession_" + repository + "_default" ); hierarchyManager = SessionAccessControl.getHierarchyManager( this.getRequest(), this.getRepository() );

       return hierarchyManager;
   }



I still do not fully understand what is going on. Maybe you see somewhat clearer?

--
Cheers
Michael

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to