Skip to main content
Inspiring
September 16, 2008
Question

How to reload a Java CFX without restarting Coldfusion?

  • September 16, 2008
  • 4 replies
  • 1328 views
All-

I apologize if this is an FAQ, but I have searched the forums without success.

During the development phase of a Java CFX tag in Coldfusion 8, is there any way to reload a Java CFX tag (after making code changes) without restarting Coldfusion? I have found reference to a reload attribute that existed at one point, but I cannot find reference to it in Coldfusion 8 and it doesn't seem to work if I try it anyway.

Any guidance would be appreciated. Thanks.

-Josh
This topic has been closed for replies.

4 replies

Participant
October 3, 2008
Just to throw in my pennies, this isn't possible.

I've worked a lot with Java CFX tags, and I've spoken to Adobe support reps and they say there is no other way to do it. I've been complaining about it for some time.

When you restart the server, the class loader does its magic. As of now, there's no way to hot swap a loaded class.

I've kind of got a system down. Make changes. Compile. Restart. Refresh. It's tedious but it's the only way right now. :-/

Maybe if more people bug Adobe, they'll implement something like this soon to make writing powerful CFX tags easier.
August 26, 2009

Hi there,

Is this still the case?  I am a Java programmer and installed CF yesterday and the first thing I wanted to do was figure out how I am going to hook into my existing code base.  The developers guide doesn't seem to mention it but just about every other document you could google says that CF supports this ... but am I looking at documentation for an earlier version (just noticed the one i was following seems to be v6)?  Suprised this feature disappeared ... what a pity.

Cheers,

Andy

Inspiring
September 17, 2008
A typical example would be this,

Normally we face these issues while consuming the webservices because of the older stubs that exists in the memory and yield us old errors we faced earlier. In those scenarios we used to do this (or) we will do some programatical webservice refresh.

Where as in your case, it might be a good thing to have a version as CFSearching suggests, (just to make sure that the correct class is being executed).

Inspiring
September 17, 2008
Daverms wrote:
> Try deleting your older classes and stubs residing at your
> "WEB-INF/classes" directory, before re-compiling your java
> program after making the required changes in it.

I do not know if that would work. My guess would be that CF would continue to use the class files in memory. Even after you deleted the class files. But it is worth a shot. I would add a version number to the class, so you can tell definitely which version is loaded.

Inspiring
September 16, 2008
I seem to recall reading that it was possible in earlier versions, but not with recent versions like ColdFusion 8. However, I am not 100% certain about this.
Inspiring
September 17, 2008
Hi,

Try deleting your older classes and stubs residing at your "WEB-INF/classes" directory, before re-compiling your java program after making the required changes in it.

jgolubAuthor
Inspiring
September 17, 2008
To be clear: your suggestion is to delete the .class files and then re-create them during compilation, rather than simply overwriting them during compilation (which is what I am doing now)?