Looks like a bug to me. Could someone who uses ECM confirm this? And fix it 
preferrably ;)

On Tue, 2 Apr 2002 19:44, [EMAIL PROTECTED] wrote:
> let me explain my problem with this testcase:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <testcase>
>     <components>
>       <component role="selector"
> class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">
>         <component-instance name="pooledTestClass1"
> class="MyPooledComponent1" />
>         <component-instance name="pooledTestClass2"
> class="MyPooledComponent2" />
>       </component>
>     </components>
>  </testcase>
>
> this testcase runs in a endlessloop if one of the the component-instance
> implements the following compose method:
>
> public void compose(ComponentManager componentManager)
> throws ComponentException
> {
>      this.selector =
>         (ComponentSelector) componentManager.lookup("selector");
> }
>
> If the component-instance itself does a lookup to it's own
> ComponentSelector then this testcase run in a loop. The reason is, that the
> pooled components are created before the ComponentSelector itself is marked
> initialized. If I set pool-min="0" it works.
>
> Is this a bug, feature or a design problem ? ;-)
> I know, I can do the lookup of the selector outside of the compose method,
> but then I need to check every time if the lookup is already done.
>
> I run in this problem using Cocoon where I have implemented a Transformer
> which need another Transformer at runtime. I have add the Stacktrace of
> this loop.
>
> 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

-- 
Cheers,

Pete

          Sleep.
Those little slices of Death.
     How I loathe them.
    --Edgar Allen Poe

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to