Am Di, den 06.04.2004 schrieb Antonio Gallardo um 13:12: > Hi: > > Stephan Michels dijo: > > Uhmm, yes, you know that you C&P the uri of an POST request? So in this > > case all request parameters get lost, and you got a > > NullPointerException. > > Yes it can look weird the idea of C&P this URI, but in the real life we > can find similar cases. Suppose I need to send the URI to someone to view > the same as me. i.e.: Desk support. In this case they will not see the > same as you.
Hmm, yes, but this problem has nothing to do with the NPE. And the javascript flow has the same problem. The problem can be solve by sending a redirect to a new continuation id. And in this new continuation you store the execution after processing the request parameter of the previuos request. > BTW, I was following the the discussion between Christopher Oliver and > you. It is very interesting an remember us the need to know deep inside > the used programming languages. :-D Yes, I learned a lot by writing the javaflow. > Are you trying to make Groovy continuations? I also want to see them work. > I need here help in this. AFAIK, you are one of the people good know the > Java continuation code. No, I'm not writing Groovy continuations. I will not replace one script language by an other script language. The reason to write the javaflow was to use java instead of javascript. > I am trying to make Groovy Flow Engine inside the JavaFlow Block. Because > thy are too close and I think they can share the same continuation base. I > already configured the Groovy calculator sample. Not sure if it will work, > but it is just a initial draft. If you want, I can post the code to the > CVS. Hmm, why not, but then you should add another directory like org/apache/cocoon/components/flow/groovy > I also copied the JavaInterpreted to GroovyInterpreted and changed some > little things inside, nothing important, but work needed to be done too > :-D > > I was reviewing the continuation code to identify the insertion point once > the Groovy class was compiled and loaded in memory. My idea is to write > additional method in "ContinuationClassLoader" to load the requiered > Groovy class. I try to assemble a different concept in my head. Something I call ClassLoaderPipelines. So, you can conect different ClassLoader for example: ReloadingClassLoader -> CompilingClassLoader -> GroovyClassLoader -> ContinuationClassLoader To make this possible you must replace findResource() instead of loadClass(), because you can't uncompile classes, change them, define them. > 1-"Classes" - Classes are defined in Groovy similarly to Java. > 2-"Scripts" - Groovy support plain scripts (as the Javascript case). > > Not sure how it will work under both, but I think we need to support both. > Maybe I am breaking my head with this without a valid reason, but this is > the price for not not know the internals of JavaFlow block. :-( The instrumention of the classes by the ContinuationClassLoader should be interesting. The instrumented classes should also work without that any Continuation is registered for the current Thread. > Are you willing to give me a hand? :-D Yes, will help you as much as I can. Stephan.