cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: endless loop in ComponentSelector building Sitemap
Date Mon, 25 Mar 2002 19:40:56 GMT
This seems like Avalon question to me. If you won't get answer on this
list, try Avalon lists.

Regards,
Vadim

> From: volker.schmitt@basf-it-services.com
[mailto:volker.schmitt@basf-it-
> 
> 
> 
> 
> I have written a Poolable Transformer which does a lookup to the
Sitemap
> TransformerSelector (in the compose method).
> 
> public void compose(ComponentManager manager)
> throws ComponentException
> {
>     this.manager = manager;
>     transformerSelector = (ComponentSelector)
>         manager.lookup(Transformer.ROLE + "Selector");
> }
> 
> The TransformerSelector is needed, because this transformer uses other
> Transformers at runtime. If I add this Transformer to the Sitemap, the
> ComponentSelector runs in a endless loop (see Stacktrace).
> The reason is, that the ComponentPool is initialized before the
> ComponentSelector itself is initialized. This mean, that the lookup to
the
> ComponentSelector is called before the ComponentSelector itself is
> initialized.
> For me, it looks like a design problem handling pooled components.
> What is your opinion? I am not sure if this is a bug or a feature ;-)
> 
> A workaround is, setting pool-min="0", because the instance
(Transformer) is
> created by the first request and then the ComponentSelector is
initialized.
> 
> Thanks for your response
> 
> Volker
> 
> 
> 
> The Stacktrace:
> Thread [HttpProcessor[8080][4]] (Suspended (breakpoint at line 127 in
> TagTransformer))
>      TagTransformer.compose(ComponentManager) line: 127
>      DefaultComponentFactory.newInstance() line: 157
>      DefaultComponentPool(AbstractPool).newPoolable() line: 82
>      DefaultComponentPool(AbstractPool).internalGrow(int) line: 126
>      DefaultComponentPool(SoftResourceLimitingPool).grow(int) line: 91
>      DefaultComponentPool(SoftResourceLimitingPool).initialize() line:
80
>      PoolableComponentHandler.initialize() line: 88
>      ComponentsSelector(ExcaliburComponentSelector).initialize() line:
163
>      ComponentsSelector.initialize() line: 238
>      DefaultComponentFactory.newInstance() line: 183
>      ThreadSafeComponentHandler.initialize() line: 84
>      CocoonComponentManager(ExcaliburComponentManager).lookup(String)
line:
> 331
>      CocoonComponentManager.lookup(String) line: 188
>      TagTransformer.compose(ComponentManager) line: 129
>      DefaultComponentFactory.newInstance() line: 157
>      DefaultComponentPool(AbstractPool).newPoolable() line: 82
>      DefaultComponentPool(AbstractPool).internalGrow(int) line: 126
>      DefaultComponentPool(SoftResourceLimitingPool).grow(int) line: 91
>      DefaultComponentPool(SoftResourceLimitingPool).initialize() line:
80
>      PoolableComponentHandler.initialize() line: 88
>      ComponentsSelector(ExcaliburComponentSelector).initialize() line:
163
>      ComponentsSelector.initialize() line: 238
>      DefaultComponentFactory.newInstance() line: 183
>      ThreadSafeComponentHandler.initialize() line: 84
>      CocoonComponentManager(ExcaliburComponentManager).initialize()
line: 167
>      LifecycleHelper.setupComponent(Object, Logger, Context,
ComponentManager,
> RoleManager, LogKitManager, Configuration, boolean) line: 275
>      LifecycleHelper.setupComponent(Object, Logger, Context,
ComponentManager,
> RoleManager, LogKitManager, Configuration) line: 190
>      SitemapLanguage.createComponentManager(Configuration) line: 109
>      SitemapLanguage(TreeBuilder).build(Configuration) line: 382
>      TreeProcessor.setupRootNode(Environment) line: 409
>      TreeProcessor.process(Environment, InvokeContext) line: 357
>      TreeProcessor.process(Environment) line: 329
>      Cocoon.process(Environment) line: 575
>      CocoonServlet.service(HttpServletRequest, HttpServletResponse)
line: 989
>      CocoonServlet(HttpServlet).service(ServletRequest,
ServletResponse) line:
> 853



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


Mime
View raw message