AnsweredAssumed Answered

avmRemote to local filesystem

Question asked by pcuvecle on Jun 6, 2007
Latest reply on Jun 19, 2007 by kvc
Hi all,

I understood that the avmRemote component allows a RMI connection to the Alfresco repository in order to be able to virtualize sites in the Virtualization server but is there a way to automaticaly redirect the avmRemote to the local filesystem ?

Indeed, as long as my website remains in preview / staging states, in other words in the virtualization server, that's great because I can easily access the sandoxes and staging content. But, when my site is published to another alfresco with the site mapped to a CIFS drive mapped to a standalone Tomcat server context, my avmRemote calls fail becaue I'm not connected to an AVM anymore.

I've looked at the WCM exemple from the v2.0.0


in org.alfresco.web.pr.PressReleaseBean

public static List getPressReleases(PageContext pageContext)
        throws Exception
    {
        FormDataFunctions ef = new ServletContextFormDataFunctionsAdapter(pageContext.getServletContext());
        Map entries = ef.parseXMLDocuments("press-release", "/media/releases/content");
        List result = new ArrayList(entries.size());
        java.util.Map.Entry entry;
        for(Iterator i$ = entries.entrySet().iterator(); i$.hasNext(); result.add(loadPressRelease((Document)entry.getValue(), (String)entry.getKey())))
            entry = (java.util.Map.Entry)i$.next();

        return result;
    }


and the FormDataFunctions.parseXMLDocuments seems to connect to the AVM content in any case

Is there a way to switch transparently to the file system to get the XML contents with the same code  ? Use the AVM content when I am on staging/sandbox and the file system (or CIFS) when I have a published site disconnected from Alfresco (but still running in a java servlet container) ?

(I hope I explained my thoughts clearly enough)

Outcomes