Carsten Ziegeler wrote:
Leszek Gawron wrote:
Now I am using service-apples which for

<map:call function="fetchDiscount"/> performs a call
serviceManager.lookup( "fetchDiscount" )

Now I see that 'fetchDiscount' bean is shown in cocoon log (pre-instantiating singletons yada yada yada) but I get the exception anyway:

Message: Component with 'fetchDiscount' is not defined in this service manager. (Key='AvalonServiceManager')

A simple test shows that ApplesProcessor is not properly contextualized: If I move the file from COB-INF/config/spring/applicationContext-apples.xml to META-INF/spring/applicationContext-apples.xml (so that this file ends up in WEB-INF/cocoon/spring/) everything starts working just fine.

I guess that this is the typical problem with hierarchical containers.
The apples processor is defined in the root application context and has
no access to any component in a child context. Moving your own
components to WEB-INF/cocoon/spring/ adds them in the root context and
therefore they are visible to apples.
Is it possible to redefine the apples processor at subsitemap level? Would it work then?

--
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Reply via email to