RE: Avoid a class to be garbage collected

2009-06-08 Thread Perez Guerrero, Antonio Javier
copes-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'

Avoid a class to be garbage collected

2009-06-07 Thread Perez Guerrero, Antonio Javier
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 th

RE: Cocoon Configuration API usage - how to get running mode?

2008-10-27 Thread Perez Guerrero, Antonio Javier
API usage - how to get running mode? > > Perez Guerrero, Antonio Javier wrote: > > Hi Robin, > > > > I found that using RunningModeHelper.determineRunningMode(null) does the > > same thing :) > > > > My problem now is that my Settings object: > >

RE: Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Perez Guerrero, Antonio Javier
e this: > > String mode = ((Settings) > WebAppContextUtils.getCurrentWebApplicationContext().getBean > (Settings.ROLE)).getProperty("org.apache.cocoon.mode"); > > Not pretty, but it works :) > > Cheers, > > Robin > > > On 10 Oct 2008, at 08:18, Per

RE: Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Perez Guerrero, Antonio Javier
quite new to Spring and Cocoon 2.2 > -Mensaje original- > De: Alexander Daniel [mailto:[EMAIL PROTECTED] > Enviado el: viernes, 10 de octubre de 2008 9:38 > Para: users@cocoon.apache.org > Asunto: Re: Cocoon Configuration API usage - how to get running mode? > > On 10.10.2008,

Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Perez Guerrero, Antonio Javier
Hi, How can I read spring managed properties from Java, without defining my classes as beans? I've tried using org.apache.cocoon.configuration.MutableSettings, which has all the methods that I need... But I cannot instantiate it because I don't know how to determine the current running mode. Any

RE: [2.2] No bean named org.apache.cocoon.servletservice.spring.BlockServletMap is defined

2008-10-03 Thread Perez Guerrero, Antonio Javier
Thanks Alex I had already read that documentation, it was very helpful to understand how the Spring Configurator works :). However, that's not what I was looking for... what I need is something like a "write your own cocoon.xconf and core.xml" guide, or some example files. Regards > > Is there

RE: [2.2] No bean named org.apache.cocoon.servletservice.spring.BlockServletMap is defined

2008-10-02 Thread Perez Guerrero, Antonio Javier
> > > id="org.apache.cocoon.servletservice.spring.BlockServletMap" > > type="javax.servlet.Servlet" > > has-properties="mountPath" > > key-property="mountPath"/> > > But this bean should be defined in the first place by cocoon-servlet-service- > impl. Don't you have > some problems with your con

RE: [2.2] No bean named org.apache.cocoon.servletservice.spring.BlockServletMap is defined

2008-10-02 Thread Perez Guerrero, Antonio Javier
[SOLVED] Finally I managed to solve the problem, thanks to this [1] page. My cocoon/spring/core.xml file was missing just one line: [1] http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurat or/2.0/1400_1_1.html _ Hi, I'm trying

[2.2] No bean named org.apache.cocoon.servletservice.spring.BlockServletMap is defined

2008-10-01 Thread Perez Guerrero, Antonio Javier
Hi, I'm trying to migrate a Cocoon 2.1 webapp into 2.2. I created a webapp from archetype and modified it following the "Cocoon 2.2 without tears" guide [1]. With that, I was able to run a simple 2.2 webapp with just one page. Then, I merged it with my old Cocoon 2.1 blockless webapp. For the coc