cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <andre.juf...@oulu.fi>
Subject Re: Avoid a class to be garbage collected
Date Mon, 08 Jun 2009 07:58:51 GMT
Hi,

if you rely on Cocoon 2.2, then creating classes with Spring would be 
the way to go:

Spring 3.*
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/ch04s04.html#beans-factory-scopes-singleton

Spring 2.5.*
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-scopes-singleton

While most developers with Spring would prefer XML to define their 
beans, one can also do so by annotation.

Cheers,
Andre


Perez Guerrero, Antonio Javier wrote:
> Hi,
>  
> Is there any way I can "bind" a class with Cocoon, or make it 
> persistent, so it's never destroyed by the garbage collector?
>  
> I've a singleton class containing some data structures (basically 
> Maps), which need to be shared between users (so, I can't store them 
> in session). I could write the data to a XML file, but I'd really 
> prefer to avoid it, because the data is going to change very frecuently.
>  
> Thanks


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat                   | WWW: www.strubiocat.oulu.fi
NordProt                     | WWW: www.nordprot.org
Triacle Biocomputing         | WWW: www.triacle-bc.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message