This content has been marked as final. Show 15 replies
Thanks cf_dev2, I might've seen that one while I was searching around, but didn't try it because the poster said it didn't work. Now I've tried it too, and it doesn't work for me either.
I did find some dtd info for that jrun-web.xml file here: http://livedocs.adobe.com/jrun/4/descriptordocs/jrun-web/jrun-web.htm It seems to apply more to servlets and jsp helper classes than to a plain old java object like I'm trying to work with.
At any rate, the auto-reload is supposed to be the default behavior, according to the documentation. Is this one of those bugs that everyone just works around rather than spending $500 on an Adobe support incident? Maybe there aren't that many people trying to develop with Java and CF together.
It doesn't work for me either, but I don't know if its a bug or a simple misconfiguration. I think a number of people are using java and CF together but its often a matter of the right person seeing your question at the right time. If you don't get an answer here you might try asking on the list at houseoffusion.com. Someone there might know.
I know of no way to make that happen. If you think about it, even our 'hotfix' process requires you to restart the appserver for the hotfix/classes/jar to be seen.
IIRC previous versions did use the <reload>TRUE</reload> setting for dynamic class reloading. It is in one of the release or tech notes. Is this now broken?
This is only for servlet/jsp reloading. It does not pertain to java classes in the jrun & cf classpaths.
Not broken, it just does not apply here. Again, think back to our hotfix procedure. If it were not required, we would not make you restart CF.
Yes, I understand. But if I'm reading it correctly, what you're saying seems to contradict the documentation
ColdFusion dynamically loads classes that are either .class files in the web_root/WEB-INF/classes directory or in JAR files in the web_root/WEB-INF/lib directory. ColdFusion checks the time stamp on the file when it creates an object that is defined in either directory, even when the class is already in memory. If the file that contains the class is newer than the class in memory, ColdFusion loads the class from that directory.
Dynamic class reloading for Java servlets classes and forcfobject (sic) Java classes is disabled by default in ColdFusion MX. To enable dynamic class reloading, do the following: ...
Also, I seem to recall that setting worked in a prior version. Though I would have to test it again on another machine to be certain.
You learn something every day. cf_dev2 is correct. The CF8 documents also document this.
So, per the documentation is the class also in the JVM classpath or inside coldfusion/lib. Classes here will NOT dynamically reload.
I will test this further when time allows.
Thanks for looking into it . Please let us know what you discover.
I wanted to see if my recollection about this setting was correct. So I tried it with MX6.1 and 7. It worked perfectly with 6.1 but didn't work at all with MX7. The test classes were placed in web_root/WEB-INF/classes which should be okay. Here are the results from MX7 for the curious
Yes, cf_dev2, that's essentially the same thing I was doing. CF doesn't pick up updates to the .class file. You can also delete the .class file, and it'll happily continue using the class. Yesterday I did a fresh install of CF 7.0.2 on a machine that never had it before, and it does the same thing.
Hope Ken can get it sorted out...
OK, clearly CFMX7 and CF8 documentation states that this should work and it does not. Clearly there is a bug here.
I know the coldfusion classloader was updated in CFMX7. This led to the coldfusion classpath, the new hot fix procedure and other changes. So, it appears the dynamic classloading also may have changed here. The real issue is whether this is a documentation bug meaning this documentation was just moved forward from CFMX6 without the functionality being moved forward. Or, if this behavior was really expected to move forward, also. In the latter case that would be a technical bug.
I have opened this issue with development and will let you know what I hear. One way or another we will figure out what the bug is.
Excellent. Thank you.
OK, the word from development is that this was never expected to work in CFMX7 or CF8. A comment was posted at the bottom of the CFMX7 livedocs page. But, clearly there was a disconnect between documentation and development on this feature in CFMX7 & CF8.
JRun has dynamic classloading from WEB-INF/lib for servlets & JSPs. ColdFusion does not have this behavior in CFMX7 and CF8.
I have opened a documentation bug (71020) to get this updated in our documentation. I have also opened an enhancement request (71021) to see if dynamic classloading in some form can be added back into ColdFusion. The enhancement will not be part of the upcoming CF8.1 update.
Thanks for the follow up and entering an enhancement request. If it is possible/feasible to add it back, well .. its definitely got my vote.