cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: Cocoon Maven plugin - Merging deployer & rcl
Date Thu, 03 May 2007 11:23:17 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Reinhard Poetz wrote:
> Giacomo Pati wrote:
>> Reinhard Poetz wrote:

>>> I've had some more thoughts about this and I believe that we don't need
>>> to go that far. We only have to make sure that all servlets, filters and
>>> listeners that we inject are being rewritten so that they get wrapped by
>>> their "Reloading*" equivalents, e.g. see the dispatcher servlet:
>>>
>>>       <servlet>
>>>         <servlet-name>DispatcherServlet</servlet-name>
>>>         <display-name>DispatcherServlet</display-name>
>>>         <description>Cocoon blocks dispatcher</description>
>>>
>>> <servlet-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet</servlet-class>
>>>
>>>
>>>         <init-param>
>>>           <param-name>servlet-class</param-name>
>>>
>>> <param-value>org.apache.cocoon.servletservice.DispatcherServlet</param-value>
>>>
>>>
>>>         </init-param>
>>>         <load-on-startup>1</load-on-startup>
>>>       </servlet>
>>>
>>>
>>> Carsten added the code that rewrites a web.xml in order to use the
>>> shielding stuff, see
>>> org.apache.cocoon.maven.deployer.WebApplicationRewriter.shieldWebapp.
>>>  It shouldn't be too difficult to use it for our purpose too.
>>
>> To be honest, I don't get most of what you're saying. Do you propose
>> to write a wrapper for each and
>> every Filter one intend to use?
> 
> No, we already have those wrappers and we need only _one_ of them per
> type (servlet, filters, listeners). See the example above: The
> DispatcherServlet isn't loaded directly. Instead,
> org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet gets the
> parameter servlet-class with the value of the "wrapped" servlet passed.
> This way the classloader is injected.
> 
> I *believe* (though I'm not 100% sure) that the problem you are facing
> now is that your acegi filter isn't wrapped and bypasses the reloading
> stuff.

Was a nice try :-( I've wrapped the Acegi-Filter as the other filter in the web.xml but still
getting:

java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh'
before accessing beans via the ApplicationContext
        at
org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:120)
        at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:687)
        at org.acegisecurity.util.FilterChainProxy.obtainAllDefinedFilters(FilterChainProxy.java:220)
        at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:135)
        at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
        at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:50)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)

As you can see it still happens with the ReloadingServletFilter :-(

_I'm stuck now!_
_There is nothing working for me anymore_
_I cannot run any of my blocks anyhow_

Ciao

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (GNU/Linux)

iD8DBQFGOcYlLNdJvZjjVZARAgs4AJ0ZCn/cGC0PxF448J3qksBEes6VGACfU+53
QcgiL9VdocW5IdpgVf45jMY=
=B9Ys
-----END PGP SIGNATURE-----

Mime
View raw message