7 Replies Latest reply on Feb 4, 2010 12:30 AM by jake_flex

    Externalizing Blaze DS / LCDS Service Configuration

    msakrejda Level 4

      Every once in a while, someone asks about externalizing Blaze DS service configruation, and the best response seems to come from Christophe Coenraet's blog: http://coenraets.org/blog/2009/03/externalizing-service-configuration-using-blazeds-and-lc ds/ . However, today I noticed the ServerConfig class and this gem:

       

      The XML source is provided during the compilation process.   However, there is currently no internal restriction preventing the   acquisition of this XML data by other means, such as network, local file   system, or shared object at runtime.

       

      This seems to imply that I can expose the services-config.xml file from the server, fetch it through a single hard-coded URL, and dynamically configure my services by simply setting ServerConfig.xml to this value.

       

      I've tried to do this, but this doesn't seem to work. When I create new RemoteObject instances referencing destinations specified in the services-config.xml after setting the ServerConfig.xml property, they still have a null clientId and an empty destination. Am I misunderstanding the relationship between ServerConfig and RemoteObject instances? Or is there something else I need to do?