Dariusz Łuksza wrote:
> On Mon, Jun 1, 2009 at 11:54 AM, Reinhard Pötz<[email protected]> wrote:
>> You should be able to collect all Servlet-Services by using the Spring
>> Configurator's bean-map:
>> http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/1.0/1400_1_1.html
>>
>
> It is exactly what I was looking for, thanks :)
>
>>> The main idea is to have separate configuration for monitoring beans
>>> that don't interfere in other parts of Cocoon 3. That "magic
>>> configuration" should made new instance of ServiceServletMonitoring
>>> MBean for each initialized Service-Servlet.
>> yes, I agree
>>
>>> Have you Any ideas how to achieve that ?
>> Every servlet-service implements the javax.servlet.Servlet interface.
>> You can create a bean-map that filters by that type.
>>
>
> Whole week I try to get somehow list of available Service-Servlets and
> mount points for them. For now I think that there aren't any
> possibility of getting that information using existing API.
>
> IMHO simplest way of getting list of avialiable Servlet-Services would
> be parse sitemap.xmap but I don't know how to distiguish with pipeline
> use s-s and with isn't.
>
> It would be werry nice if somebody could gave me some hits how move on
> with this ;)
IIRC each servlet-service has a special servlet context
o.a.c.servletservice.ServletServiceContext (cocoon-servlet-service-impl
module) which contains all necessary information (connections,
mount-points) but it doesn't expose them. If you can cast the
ServletContext to ServletServiceContext, you can safely assume that the
bean is a servlet-service.
I suggest that you expose the necessary methods, or just for now, use a
private accessor.
HTH
--
Reinhard Pötz Managing Director, {Indoqa} GmbH
http://www.indoqa.com/en/people/reinhard.poetz/
Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member [email protected]
________________________________________________________________________