New to group

View: New views
2 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Re: New to group

by bonehead :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,

Just tried the code on another JDK 1.4 and it worked in both classic and non-classic mode, so you were right it must be my jvm.

thanks for all the help - I will move to another system with a different jvm and try it there or just continue in class mode :-)

cheers

On 11/26/07, Geert Bevin <gbevin@...> wrote:

Hi,

this is normal since the basic continuations runner uses the default
constructor to create a new instance of each continuation class. If
this is a non static inner class, this can't be done.

HTH,

Geert

> Sorry I didn't mean to gie the impression that the execute method
> was static. I meant to ask if the inner class which contains the
> execute method is required to be static. If not I get the exception
>
> java.lang.InstantiationException: TestPause$innerPauseInWhile
>         at java.lang.Class.newInstance0(Class.java:291)
>         at java.lang.Class.newInstance(Class.java:259)
>         at
> com
> .uwyn
> .rife
> .continuations
> .basic.BasicContinuableRunner.run(BasicContinuableRunner.java :172)
>         at
> com
> .uwyn
> .rife
> .continuations
> .basic.BasicContinuableRunner.start(BasicContinuableRunner.java:85)
>         at TestPause.testPause(TestPause.java:23)
>         at mainTest.main(mainTest.java:17)
>
> I am including the example which is the simplest case I can give
> you. The jar has both the .java and .class files as created by my
> compiler.
>
> Thanks very much for all your help and thanks for the advice I will
> try to build an example that takes parameters.
>
> Cheers
>
>
>
>
>
>
> On 11/21/07, Geert Bevin <gbevin@...> wrote:
> Hi Frederick,
>
> > I have determined that it only works if I run under 1.4 with the -
> > classic option, otherwise it crashes the jvm and forces a core
> > dumped which is stopped in an infinite loop. Bug in the jvm or some
> > other problem? I didn't experience this under the earlier rife 1.4
> > always run with JDK1.4 hotspot no problems.
>
> This is certainly a JDK bug, core dumps always are. However, it could
> be that some byte-code instructions causes this bug to create a
> segfault instead of having proper error messages for this. There are

> several ways to track this down, the easiest is to try to run the same
> code on another JDK or even a later version, just to see if that
> works. you can also try to reproduce the segfault with the smallest
> possible class. If you send me that, I can look at the byte code to
> see what could be the cause and maybe figure out a workaround.
>
> >  How can the execute method of the class with the continuation be
> > made anything other than static. It seems to throw an exception if
> > this is the case.
>
> What is the exception? The execute method should actually not be
> static.
>
> > Can the execute method be passed parameters?
>
> Yes it can, set this up with the http://rifers.org/docs/api/com/uwyn/rife/continuations/ContinuationConfigInstrument.htmlclass
> . You'll have to write the proper runner logic to provide the
> arguments to the entry method. The easiest way to do this is by
> extending BasicContinuableRunner and overridding the
> executeContinuable method.
>
> Hope this helps,
>
> Geert
>
> --
> 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
>
>
>
> >
> <simple_example.jar>

--
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-dev" group.
To post to this group, send email to rife-dev@...
To unsubscribe from this group, send email to rife-dev-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rife-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: New to group

by bonehead :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi Geert,
 
I moved to a Solaris 10.2 and moved up to JDK 1.5 and the newer version of the continuations package.
 
If you remember I was attempting to use recursion and am still running into stack overflow problems even with the new version.
 
the problem seems to be in calling recursively after the pause() it re-enters the execute after the pause() and not at the start of the function which means that the basis is never evaluated.
 
Hope you have some time to help me out with this one.
 
Happy New Year and Cheers
 


 
On 11/26/07, Frederick Isaac <freddyisaac@...> wrote:
hi,

Just tried the code on another JDK 1.4 and it worked in both classic and non-classic mode, so you were right it must be my jvm.

thanks for all the help - I will move to another system with a different jvm and try it there or just continue in class mode :-)

cheers


On 11/26/07, Geert Bevin <gbevin@...> wrote:

Hi,

this is normal since the basic continuations runner uses the default
constructor to create a new instance of each continuation class. If
this is a non static inner class, this can't be done.

HTH,

Geert

> Sorry I didn't mean to gie the impression that the execute method
> was static. I meant to ask if the inner class which contains the
> execute method is required to be static. If not I get the exception
>
> java.lang.InstantiationException: TestPause$innerPauseInWhile
>         at java.lang.Class.newInstance0(Class.java:291)
>         at java.lang.Class.newInstance(Class.java:259)
>         at
> com
> .uwyn
> .rife
> .continuations
> .basic.BasicContinuableRunner.run(BasicContinuableRunner.java :172)
>         at

> com
> .uwyn
> .rife
> .continuations
> .basic.BasicContinuableRunner.start(BasicContinuableRunner.java:85)
>         at TestPause.testPause(TestPause.java:23)
>         at mainTest.main(mainTest.java:17)
>
> I am including the example which is the simplest case I can give
> you. The jar has both the .java and .class files as created by my
> compiler.
>
> Thanks very much for all your help and thanks for the advice I will
> try to build an example that takes parameters.
>
> Cheers
>
>
>
>
>
>
> On 11/21/07, Geert Bevin <gbevin@...> wrote:
> Hi Frederick,
>
> > I have determined that it only works if I run under 1.4 with the -
> > classic option, otherwise it crashes the jvm and forces a core
> > dumped which is stopped in an infinite loop. Bug in the jvm or some
> > other problem? I didn't experience this under the earlier rife 1.4
> > always run with JDK1.4 hotspot no problems.
>
> This is certainly a JDK bug, core dumps always are. However, it could
> be that some byte-code instructions causes this bug to create a
> segfault instead of having proper error messages for this. There are
> several ways to track this down, the easiest is to try to run the same
> code on another JDK or even a later version, just to see if that
> works. you can also try to reproduce the segfault with the smallest
> possible class. If you send me that, I can look at the byte code to
> see what could be the cause and maybe figure out a workaround.
>
> >  How can the execute method of the class with the continuation be
> > made anything other than static. It seems to throw an exception if
> > this is the case.
>
> What is the exception? The execute method should actually not be
> static.
>
> > Can the execute method be passed parameters?
>
> Yes it can, set this up with the http://rifers.org/docs/api/com/uwyn/rife/continuations/ContinuationConfigInstrument.htmlclass
> . You'll have to write the proper runner logic to provide the
> arguments to the entry method. The easiest way to do this is by
> extending BasicContinuableRunner and overridding the
> executeContinuable method.
>
> Hope this helps,
>
> Geert
>
> --
> 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
>
>
>
> >
> <simple_example.jar>

--
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-dev" group.
To post to this group, send email to rife-dev@...
To unsubscribe from this group, send email to rife-dev-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rife-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

< Prev | 1 - 2 | Next >
LightInTheBox - Buy quality products at wholesale price