cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perez Guerrero, Antonio Javier" <>
Subject RE: Avoid a class to be garbage collected
Date Mon, 08 Jun 2009 08:17:58 GMT
Then the only thing I have to do is to define the class as a bean in my core.xml (which is
loaded from applicationContext.xml). Nice!
Thanks a lot Andre
PS: I'm using Cocoon 2.2 and Spring 2.5, I forgot to say it.


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

Spring 3.*

Spring 2.5.*

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


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:
University of Oulu, Finland  | WWW:
StruBioCat                   | WWW:
NordProt                     | WWW:
Triacle Biocomputing         | WWW:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message