Do you know of a good resource to working with blocks? I've found a couple 
tutorials but they seem very basic and I'm still having trouble understanding 
how the application I've got is organized. Could you help me how to modify the 
block to do what you described?
 
In looking at the one of the block.xml that I've got, I see something like this:
 
<container name="c">
   <services>
     <service type="a.b.c.Service">
       <source>service</source>
     </service>
   </services>
 
   <component name="service" class="a.b.c.ServiceImpl" activa
tion="lazy"/>
   <component name="c2" class="a.b.c.c2Impl" activa
tion="lazy"/>
...
</container>
 
I turns out that the only component that I need to modify is "c2", not the one 
that is named in the service definition. Will what you describe still work even 
if the component is not directly the service?
 
Also, the application I've got seems to have a number of block.xml files but 
none of them seem to be in the main directory? How do I figgure out how they 
are tied together and which is the "main" one?
 
Thank you for your help.

Niclas Hedhman <[EMAIL PROTECTED]> wrote:
On Saturday 20 November 2004 09:26, ixxus nexxus wrote:

> Is it possible, for example to have two implementations of the same service
> and have both of them be called. My block.xml has lines like this:

Yes, but one of two things is required;
Either you have to modify the caller to lookup both services (of the same 
type, but with different keys and manual assembly of which implementation is 
looked up with which key), OR
assemble the application so that the 'original caller' looks up your 'new 
extension' and that the 'new extension' looks up the 'original service impl', 
and calls it for each call made by the 'original caller'.

The second choice, should give you zero changes to the original Java source 
code, and only need to work on the blocks.

Cheers
Niclas
-- 
+------//-------------------+
/ http://www.bali.ac /
/ http://niclas.hedhman.org / 
+------//-------------------+


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


                
---------------------------------
Do you Yahoo!?
 Meet the all-new My Yahoo! – Try it today! 

Reply via email to