• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to reload a Java CFX without restarting Coldfusion?

Explorer ,
Sep 16, 2008 Sep 16, 2008

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Sep 16, 2008 Sep 16, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 17, 2008 Sep 17, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 17, 2008 Sep 17, 2008

Copy link to clipboard

Copied

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)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Sep 17, 2008 Sep 17, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 17, 2008 Sep 17, 2008

Copy link to clipboard

Copied

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).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 03, 2008 Oct 03, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 26, 2009 Aug 26, 2009

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation