Announcement Announcement Module
No announcement yet.
surf.xml - runtime and mode Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • surf.xml - runtime and mode


    is somebody able to explain me, how to setup another runtime mode for SpringSurf?
    Im interested in the "local" mode (how to configure the remote path??) and the "alfresco" mode (how is that working and is it recommended to use this with Alfresco WCM?)
    The reason, why i need to know this: I want my SpringSurf app to search on the local disc for all the dynamic content like templates, pages, components, webscripts, ......

    And whats about the 3 modes "development", "preview" and "production" ? Cant find any infos at the project documentation...

    thanks for your help and best regards

  • #2
    Hello? Anybody there?


    • #3

      Sorry I have been away on paternity leave for several weeks! Busy, busy.

      Yes some explanation is required here!

      The two autowire 'modes' available are:
      FYI preview is from the Alfresco Surf days and no longer used.

      In 'development' - all FreeMarker template caches are disabled, all JavaScript compliation is disabled and all Surf model object caches are disabled.
      This is highly recommended during day-to-day development as it means you instantly see changes deployed to individual files on a running app-server. Generally you will only need to at most "Refresh WebScripts" if you make a change to say a WebScript descriptor file or similar - pretty much all other file changes will be seen instantly, including web-tier javascript and included files.

      In 'production' - all template+surf caches and JavaScript compilation and caching of compiled scripts is enabled. This is obviously recommended for product usage for maximum performance. You can still clear all the system caches via "Refresh WebScripts" on a runtime system if required.

      The autowire 'runtime's available are:

      The runtime's effectively setup the search paths used by WebScripts and Surf to find pages, templates and components.

      'classpath' - only the set of classpath related search paths are used. This includes the various Spring configured paths that end in .classpath such as The classpath locations tend to have a prefix something like 'surf/webscripts'.

      'webapp' - includes the classpath search paths plus all those related to the "webinf" folder in jar files etc. such as

      'local' - includes the webapp and classpath search paths plus those related to local disk locations, such as, the default path configured is surf/webscripts.

      'alfresco' - includes all the above search paths, plus the "remote" search paths used by Alfresco Share and other apps to load surf objects from a remote server. If you want to see how these work I suggest checking out the Alfresco Share or (more simply) the Alfresco Mobile project and examine the config. It allows you to store and retrieve Surf model objects from a remote Alfresco server instance.

      It is a good idea to examine the config files to see where these various search paths point to - and find the prefixes to the various paths. See spring-surf-application-context.xml. All these Spring beans can be overridden in the usual way.

      Hope this helps!



      • #4
        Hi Kev,

        Please post a link to the full surf.xml configuration documentation, if you have it.
        I'll ask enterprise support in the interim and paste a link here once I get it.