sanity check: changing MACHII_CONFIG_PATH in App.cfc

19 views
Skip to first unread message

Brian FitzGerald

unread,
Sep 1, 2010, 8:41:49 PM9/1/10
to Mach-II for CFML
For some reason I'm having to restart my local CF server in order for
it to pick up changes to MACHII_CONFIG_PATH in Application.cfc. I
just want to understand what is going on because it picks up other
changes to Application.cfc, but doesn't seem to be picking up my Mach-
II settings.

I tried clearing the template & component cache's in the
administrator, etc., but nothing seems to allow the new settings to be
recognized apart from restarting the server.

Has anyone come across this before? Is there a way for me to dump out
what my Mach-II application settings are somehow (MACHII_CONFIG_MODE,
MACHII_CONFIG_PATH, etc)? Perhaps,
getPropertyManager().getApplicationSettings() or something? (though I
know it's not that)

Anyway, thanks for the help, this one is sort of driving me batty.

Best,
Brian

Daniel

unread,
Sep 2, 2010, 2:57:15 PM9/2/10
to Mach-II for CFML
Brian, I have been needing to restart my local CF server for nearly
ALL changes I make to CF components. Like you, I tried clearing the
template & component cache but it usually doesn't work. My pattern is
to close CF Builder, restart the CF App Server service, go to my local
web server, and test my page. If I need to make more changes to my
CFC: open CF Builder, make changes, close CF Builder, restart CF App
Server, rinse and repeat. It's a total pain in the ass to be sure,
and I'm positive there's a better way, but I just haven't been able to
research it enough to identify the source of the problem. I'm
wondering if the solution is to use a different web server such as IIS
or Tomcat?

Dan

Matthew Woodward

unread,
Sep 2, 2010, 3:55:23 PM9/2/10
to mach-ii-for...@googlegroups.com
On Thu, Sep 2, 2010 at 11:57 AM, Daniel <daniel....@gmail.com> wrote:
Brian, I have been needing to restart my local CF server for nearly
ALL changes I make to CF components.

That's strange--I've never had to go to these lengths.
 
I'm
wondering if the solution is to use a different web server such as IIS
or Tomcat?

Just because I can't let this go without commenting ... ;-) IIS vs. Tomcat is apples and oranges. IIS is a web server, and Tomcat is a Java servlet container. The equivalent to Tomcat on the CF side of things would be JRun, which is the JEE server that ships with CF. (As an aside, JRun is ancient, inefficient, and has been abandoned by Adobe, so here's hoping CF 10 ships with a decent servlet container like Tomcat.)

I probably breezed over the initial email too quickly, but what's the setup again? If this is all related to CF Builder have you tried NOT using CF Builder to see if the behavior is the same?
--
Matthew Woodward
ma...@mattwoodward.com
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint, etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

Brian FitzGerald

unread,
Sep 2, 2010, 5:19:32 PM9/2/10
to Mach-II for CFML
Hey Matt,

The original question/statement was actually mine and was essentially,
"I don't understand why my Mach-II app is not picking up changes to
Mach-II config variables in App.cfc unless I restart the server"

Where this all came from is I am putting together a new app, and
before deployment I went to change mach-ii.xml to mach-ii.xml.cfm. In
order for this to work, however, I needed to override the default
MACHII_CONFIG_PATH variable in App.cfc. However, I discovered that
the only way I could get Mach-II to recognize my updated config path
variable was to restart the CF server. So actually there were two
questions, one was "Has anyone seen this behavior or does anyone
understand why this may be happening?", and the second one was (for
the sake of further troubleshooting), "Does anyone know if there is a
way to programmatically get the Mach-II app settings for the current
app?" I checked for this in the framework API docs but didn't see
anything. I was thinking this would help me if there was a way to
call getAppManager().getAppSettings() or something and get a struct
just to confirm visually that indeed none of the app settings
variables were updating without a restart. For what it's worth, I was
able to change other variable values such as anything in the
"variables" scope in App.cfc and see those updated, so I at least know
the component was being updated.

Thanks for any insight,
Brian




On Sep 2, 2:55 pm, Matthew Woodward <m...@mattwoodward.com> wrote:
> On Thu, Sep 2, 2010 at 11:57 AM, Daniel <daniel.knowl...@gmail.com> wrote:
> > Brian, I have been needing to restart my local CF server for nearly
> > ALL changes I make to CF components.
>
> That's strange--I've never had to go to these lengths.
>
> > I'm
> > wondering if the solution is to use a different web server such as IIS
> > or Tomcat?
>
> Just because I can't let this go without commenting ... ;-) IIS vs. Tomcat
> is apples and oranges. IIS is a web server, and Tomcat is a Java servlet
> container. The equivalent to Tomcat on the CF side of things would be JRun,
> which is the JEE server that ships with CF. (As an aside, JRun is ancient,
> inefficient, and has been abandoned by Adobe, so here's hoping CF 10 ships
> with a decent servlet container like Tomcat.)
>
> I probably breezed over the initial email too quickly, but what's the setup
> again? If this is all related to CF Builder have you tried NOT using CF
> Builder to see if the behavior is the same?
> --
> Matthew Woodward
> m...@mattwoodward.comhttp://blog.mattwoodward.com
Reply all
Reply to author
Forward
0 new messages