From: Adam R. <ad...@ex...> - 2013-08-15 21:50:01
|
Otherwise you could use Java binding from XQuert to read a properties file, or even the file module (although you would have to manually parse the text from the properties file... Actually not so hard). On 15 Aug 2013 22:48, "Adam Retter" <ad...@ex...> wrote: > Out of interest would you be able to determine by the hostname/up address > of the sever you are running on? If so I could easily add a net module, e.g > net:host-name() net:host-address() > On 15 Aug 2013 22:44, "Joe Wicentowski" <jo...@gm...> wrote: > >> Hi Wolfgang and Dmitriy, >> >> > I think Dmitriy is right: the error message indicates you are trying to >> access the server's HTTP request context (request:get-parameter, >> request:get-uri and friends), which will not be available within a >> scheduled query. HTTP client calls are independent and should be ok. >> >> I see! Now I'm starting to understand. In fact, in my earlier email >> I had simplified the code I pasted in where I defined $url:admin-pw. >> (Note to self: simplifying is often a bad idea.) The actual line >> reads: >> >> declare variable $url:admin-pw := if (request:get-server-port() = >> (80, 443)) then 'my-password' else ''; >> >> This get-server-port() call is there because in development I use port >> 8080 and a blank admin password, but in production I use port 80 and a >> non-blank admin password. I was using port to determine the >> environment. And I introduced this code around the same timeframe as >> the scheduler stopped working. >> >> Removing request:get-server-port() will solve the immediate problem. >> >> Does anyone have a suggestion for an alternate approach for >> determining my system's setup from within XQuery? For example, if I >> have an ant-style .properties file (server.properties) with a >> "deployment" property which is either set to "development" or >> "production", can I read this property from an XQuery in eXist-db? >> >> Thanks, >> Joe >> >> >> ------------------------------------------------------------------------------ >> Get 100% visibility into Java/.NET code with AppDynamics Lite! >> It's a free troubleshooting tool designed for production. >> Get down to code-level detail for bottlenecks, with <2% overhead. >> Download for free and get started troubleshooting in minutes. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk >> _______________________________________________ >> Exist-open mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-open >> > |