On 27.05.2004 08:03, Enrico Migliore wrote:
Cocoon 2.1.5 --------------
I modified the CalculatorFlow example and noticed that:
1. if Cocoon is restarded, CalculatorFlow.class is loaded and the java code executed.
1. if Cocoon is NOT restarded, CalculatorFlow.class is never reloaded and the java
code is NOT executed.
I do not really understand. Where is this class placed? Why do you expect it being updated?
fact ----
Cocoon places the class "CalculatorFlow.class" in the following directory:
webapp/WEB-INF/classes/org/apache/cocoon/samples/flow/java
I wonder why it does that. Are you using the CompilingClassLoader?
what I did ----------
I slightly modified the original "CalculatorFlow.java" and copied my version
of "CalculatorFlow.class" in that directory. In order to see my changes,
then I reloaded the following URI:
http://localhost:8888/samples/blocks/javaflow/calculator.do
---oOo---
what I noticed --------------
I noticed that Cocoon doesn't reload the new class. If I restart Cocoon, instead, the new class is correctly loaded and I can see the changes.
---oOo---
what I guess -------------
It seems that Cocoon caches the class "CalculatorFlow.class" and doens't reload even if I modify it.
I guess, it's not a caching, but a "problem" with the class loader. Probably it's just a missing feature.
While thinking about it I don't think you use the CompilingClassLoader (you copied the class file by hand), but all samples end in WEB-INF/classes. This means it is normal behaviour to not reload a changed class. You probably should simply use CompilingClassLoader. This would make also the copying of the class file superfluous.
http://cocoon.apache.org/2.1/userdocs/flow/java.html#Dynamic+Compilation
Joerg
Hi Joerg
thanks a lot for the suggestion and for your time. I followed the link you sent me:
the problem here is that I want Cocoon to reload a compiled class file. I don't want my application to load a source file in order for the JVM compiler to compile it.
The Apples example works perfect: I deploy a compiled class file (i.e. foo.class),
press the RELOAD button of the browser and Cocoon reloads the class.
Right now I'm using the flowscript for the logic of my application, but I have to move fast to java. What do you think if I contact the authors of the javaflow block, and then post the solution of this problem?
thanks Enrico
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
