Here is the good code (I hope ;o)
/**
* Reference:
http://javaforge.com/sccShowFileRevision/CreatedBean.java?proj_id=220&tag=162&date=Mar+26%2C+2006+23%3A05&filename=tapestry-spring%2Ftrunk%2Fsrc%2Ftest%2Fjava%2Fcom%2Fjavaforge%2Ftapestry%2Fspring%2Fbeans%2FCreatedBean.java
*/
public class NanoBean
{
// nanoTime() has not enough precision ?...
private final long _nanos = System.nanoTime()+ new
Random().nextInt(1000);
public long getNanos()
{
return _nanos ;
}
}
Cyrille37 a écrit :
Sorry for that post.
It is a big and dirty mistake from me. Shure the following code is
stupid ...
I think I'm tired because of the complexity of all that framworks
discovering...
cyrille
Cyrille37 a écrit :
Hello,
I got Tapestry4.0.2+Spring2 running and when I've tried the
tapestry-spring, the result was not has expected.
So I've added a random value to the getNanos() method of CreatedBean
class and the example/testSuite run has expected.
public long getNanos()
{
Random rnd = new Random();
return _nanos + rnd.nextLong();
}
Reference:
http://javaforge.com/sccShowFileRevision/CreatedBean.java?proj_id=220&tag=162&date=Mar+26%2C+2006+23%3A05&filename=tapestry-spring%2Ftrunk%2Fsrc%2Ftest%2Fjava%2Fcom%2Fjavaforge%2Ftapestry%2Fspring%2Fbeans%2FCreatedBean.java
Cheers,
Cyrille.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]