You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com> on 2002/10/07 00:57:58 UTC

Random generator

Hi Folks!

Is in Cocoon support for generating random database keys? Or a function that 
can return a random number?

I know that in Java is support for the Random class. This class generate a 
sequence based on a seed (like always).

The point is: I need generator of random numbers that will live all the 
run-time to return for every request a new random number lets said: 2^32.

Maybe this generator of random numbers can be called inside an action or in a 
xsp fashion.

Thanks in advance

Antonio Gallardo.

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Random generator

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 06.Oct.2002 -- 04:57 PM, Antonio Gallardo Rivera wrote:
> Hi Folks!
> 
> Is in Cocoon support for generating random database keys? Or a function that 
> can return a random number?
> 
> I know that in Java is support for the Random class. This class generate a 
> sequence based on a seed (like always).
> 
> The point is: I need generator of random numbers that will live all the 
> run-time to return for every request a new random number lets said: 2^32.

There's an InputModule for that. It might not fulfill all your needs
but could be a starting point. You can simply specify it in the mod-db
descriptor to be used for a column.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>