[jira] Commented: (COCOON-1819) No support for creation of Bookmarks from JavaFlow

2006-04-04 Thread Simone Gianni (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1819?page=comments#action_12373077 
] 

Simone Gianni commented on COCOON-1819:
---

Harlan, did you tried the patches? which one worked for you?

 No support for creation of Bookmarks from JavaFlow
 --

  Key: COCOON-1819
  URL: http://issues.apache.org/jira/browse/COCOON-1819
  Project: Cocoon
 Type: Improvement

   Components: Blocks: Java Flow
 Reporter: Harlan Iverson
  Attachments: javaflow-bookmarks-1.diff, javaflow-bookmarks-2.diff, 
 javaflow-bookmarks-sample.diff

 There is no JavaFlow equivalent of createWebContinuation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1819) No support for creation of Bookmarks from JavaFlow

2006-04-03 Thread Harlan Iverson (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1819?page=comments#action_12372966 
] 

Harlan Iverson commented on COCOON-1819:


thanks!

 No support for creation of Bookmarks from JavaFlow
 --

  Key: COCOON-1819
  URL: http://issues.apache.org/jira/browse/COCOON-1819
  Project: Cocoon
 Type: Improvement

   Components: Blocks: Java Flow
 Reporter: Harlan Iverson
  Attachments: javaflow-bookmarks-1.diff, javaflow-bookmarks-2.diff, 
 javaflow-bookmarks-sample.diff

 There is no JavaFlow equivalent of createWebContinuation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1819) No support for creation of Bookmarks from JavaFlow

2006-04-02 Thread Simone Gianni (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1819?page=comments#action_12372872 
] 

Simone Gianni commented on COCOON-1819:
---

This was not an easy task. I first started trying to emulate what flowscript 
does :
- Add a method in AbstractContinuable
- From there get the continuation
- Create a new continuation
- Set the new continuation as the current one
- Modify the JavaInterpreter a bit to get the current continuation after 
invoking the method since it could be changed.

But unfortunately it was not so easy, i ended up with a certain number of stack 
exception since the ContinuationClassLoader was rewriting that method too, and 
managing continuation from a method that has been rewritten to work with 
continuations was not correct.

Afterall, making a bookmark is nothing more than calling the next continuation, 
so this is a good workaround :

  // I want a bookmark here 
  sendPageAndWait(mycontinuationid + .cont);

(Obviously this means that there is a *.conf going to the continuations, it's a 
hack but it's a workaround).

But, after testing this was true, maybe the problem could be solved this way :
- The method createWebContinuation in AbstractContinuable should set a flag.
- The interpreter checks that flag
- If the flag is set calls the handleContinuation on the new continuation 
directly.

Again it's not so easy, since due to class loader issues it's not possible to 
call a AbstractContinuable.getFlag() from the JavaInterpeter (if not with 
reflection). So I unfortunately had to push these methods (actually getState 
and resetState) up to Continuable, which seems to be the the only join point 
between JavaInterpreter and AbstractContinuable.

This, unfortunately, changed Continuable from a marker only interface to an 
interface with two methods, thus breaking code compatibility with other 
implementations of Continuable (BTW, AbstractContinuable is the only 
implementation in cocoon, and implementing it directly is quite an uncommon 
practice).

BUT, it works.

I also added the code to invalidate the continuation, which is quite handy to 
avoid the infamous back button and subseguent resubmissions.

Other possible solutions would be :
1) Placing the code to create a new continuation somewhere else accessible from 
AbstractContinuable.
2) Keep this code but call the getState and resetState thru reflection, so that 
Continuable is not affected, but having an impact on performance and code 
readability.


 No support for creation of Bookmarks from JavaFlow
 --

  Key: COCOON-1819
  URL: http://issues.apache.org/jira/browse/COCOON-1819
  Project: Cocoon
 Type: Improvement

   Components: Blocks: Java Flow
 Reporter: Harlan Iverson


 There is no JavaFlow equivalent of createWebContinuation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1819) No support for creation of Bookmarks from JavaFlow

2006-04-02 Thread Simone Gianni (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1819?page=comments#action_12372876 
] 

Simone Gianni commented on COCOON-1819:
---

The first solution (doing everything from inside the Continuation system, not 
involving JavaInterpreter) is really hard to work out:
- Continuation has a two step system based on isRestoring and isCapturing
- The ContinuationClassLoader inserts some checks, and if isCapturing = true it 
captures the current execution stack.
- Unfortunately it then inserts a return null.
- This means that there seems to be no (easy) way of capturing the stack in the 
current continuation and then continue creating a new continuation.

The only way of doing this seems to be adding another boolean, like 
isBookmarking, and have the generated bytecode check for this one before 
inserting a return null .. and I'm afraid this would only be the first step.

The provided patch simply ignores all this problems, stops the current 
continuation in the normal way and then starts it again in the normal way.

 No support for creation of Bookmarks from JavaFlow
 --

  Key: COCOON-1819
  URL: http://issues.apache.org/jira/browse/COCOON-1819
  Project: Cocoon
 Type: Improvement

   Components: Blocks: Java Flow
 Reporter: Harlan Iverson
  Attachments: javaflow-bookmarks-1.diff

 There is no JavaFlow equivalent of createWebContinuation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira