cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: [RT] OSGi based blocks
Date Wed, 15 Mar 2006 13:42:21 GMT
Sylvain Wallez wrote:

>>A bundle that provides a servlet, can register it as a service with a
>>declaration like [5]:
>>
>>  <scr:component name="cocoon.servlet3">
>>    <scr:implementation
>>class="org.apache.cocoon.blocks.osgi.TestServlet"/>
>>    <scr:service>
>>      <scr:provide interface="javax.servlet.Servlet"/>
>>    </scr:service>
>>    <scr:property name="path" value="/test3"/>
>>  </scr:component>
>>
>>compared to the whiteboard adapter we can see some new things, here we
>>provide a service to the framework and it can be refered to by the
>>name "cocoon.servlet3" (we should use a better naming scheme, I just
>>adapted some examples from the specification while implementing the
>>above).
>>
>>The declaration also contains a property: path=/test3, that is looked
>>up by the whiteboard adapter and used for mounting the servlet at that
>>URI context.
> 
> 
> I'm wondering about who's concern it is to define the path where a
> bundle is mounted. If it's in the bundle, it is totally self-contained,
> but that may lead to name clashes if two bundles have the same name
> built in. Isn't the path the responsibility of the hosting environment,
> i.e. defined by the people that assemble bundles to create an
> application (just like WARs actually)?

yes, you're right that this is another concern. IIUC all the values in the 
service declaration can be considered as default values and be overriden by some 
kind of configuration service. (... but I have to learn more about OSGi though 
to verify this statement)

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

	
		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Mime
View raw message