Hi Peter,
I created a similar project, called RIFE/Workflow. You can check it
out from SVN:
http://svn.rifers.org/rife-workflow/trunk/
It uses continuations for a workflow engine and also has renamed
'call' to 'waitForEvent', which makes more sense.
In your case, "CallAnswerTest$Sequence" is not a valid classname in
the Java language. Inner classes are also referenced with a dot, hence
I think that "CallAnswerTest.Sequence" should work.
Hope this helps,
Geert
On 14 Nov 2007, at 17:58, peter wrote:
>
> I am exploring rife continuations for use in an embedded event driven
> environment (J2ME, foundation profile, which is java 1.3 based). I can
> now run a small app using just pause() but have problems doing call-
> answer.
>
> The purpose is to perform a sequence of blocking calls:
>
> public static class Sequence extends AbstractContinuableObject
> {
> public void execute()
> {
> String reply = (String) call(CallTarget.class);
> System.out.println("reply=" + reply);
>
> reply = (String) call(CallTarget.class);
> System.out.println("reply=" + reply);
>
> reply = (String) call(CallTarget.class);
> System.out.println("reply=" + reply);
> }
> }
>
> where CallTarget (which does the blocking call) looks like this:
>
> public static class CallTarget extends AbstractContinuableObject
> {
> static int count = 0;
>
> public void execute()
> {
> pause();
> answer("hello " + count++);
> }
> }
>
> The Sequence is started like this:
>
> MyContinuableRunner runner = new MyContinuableRunner();
> String id = runner.start("CallAnswerTest$Sequence"/
> *Sequence.class.getName()*/);
>
>
> I wrote an URLContinuableClassloader derrived from URLClassloader and
> which does about the same thing as BasicContinuableClassLoader. The
> jvm uses URLContinuableClassloader as application class loader so it
> will load all my application classes.
>
> When attempting to load Sequence I get following stacktrace:
>
> transforming CallAnswerTest$Sequence
> Exception in thread "main" java.lang.ClassNotFoundException:
> CallAnswerTest$Sequence
> java.util.EmptyStackException
> at java.util.Stack.pop(Stack.java:77)
> at
> com
> .uwyn
> .rife
> .continuations
> .instrument
> .ResumableMethodAdapter.visitMethodInsn(ResumableMethodAdapter.java:
> 378)
> at com.uwyn.rife.asm.ClassReader.accept(ClassReader.java:1340)
> at com.uwyn.rife.asm.ClassReader.accept(ClassReader.java:395)
> at
> com
> .uwyn
> .rife
> .continuations
> .instrument
> .ContinuationsBytecodeTransformer
> .transformIntoResumableBytes(ContinuationsBytecodeTransformer.java:
> 68)
> at
> com
> .uwyn
> .rife
> .continuations
> .basic
> .URLContinuableClassLoader.loadClass(URLContinuableClassLoader.java:
> 195)
> at
> com
> .uwyn
> .rife
> .continuations
> .basic.BasicContinuableRunner.run(BasicContinuableRunner.java:
> 171)
> at
> com
> .uwyn
> .rife
> .continuations
> .basic.BasicContinuableRunner.start(BasicContinuableRunner.java:
> 85)
> at CallAnswerTest.go(CallAnswerTest.java:59)
> at CallAnswerTest.main(CallAnswerTest.java:50)
>
> I guess I am missing something basic regarding the use of call-answer.
> Who can give me some pointers on how to use call-answer outide the
> domain of web apps?
>
>
> >
--
Geert Bevin
Terracotta - http://www.terracotta.org
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---