Why would you see that as a defect ?
Will your bundle work if you don't have the namespace handler present ? I
doubt it will ;-)
So your bundle actually requires those services to be present, even if you
as a user don't really know it.
Actually, you'll also notice that the bundle also import the
org.osgi.service.blueprint package, even if your bundle does not actually
require it.
Would there be a way to express the fact that the bundle needs to be
extended by blueprint, this should also be in the manifest.

On Thu, Mar 25, 2010 at 18:58, Joe Bohn <[email protected]> wrote:

> I've noticed that recently the maven-bundle-plugin has started to generate
> the following Import-Service entries for namespace extensions for JPA and
> declarative transactions.  For example, in AriesTrader there is a jpa
> persistence bundle that uses both of these features and therefore
> necessarily includes the following in the blueprint.xml:
>
> <blueprint xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0";
>           xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0";>
> ...
>
> <bean id="tradeServicesBeanJPA-CM"
> class="org.apache.aries.samples.ariestrader.persist.jpa.cm.TradeJpaCm"
> init-method="init">
>    <jpa:context property="entityManager" unitname="ariestrader-cm" />
>    <tx:transaction method="*" value="Required"/>
> </bean>
>
>
> This now results in the following import-service entries being generated in
> the MANIFEST.MF:
>
> Import-Service: org.apache.aries.blueprint.NamespaceHandler;filter="(o
>  sgi.service.blueprint.namespace=http://aries.apache.org/xmlns/transac
>  tions/v1.0.0)",org.apache.aries.blueprint.NamespaceHandler;filter="(o
>  sgi.service.blueprint.namespace=http://aries.apache.org/xmlns/jpa/v1.
>  0.0)"
>
> These just started appearing recently - perhaps due to some recent change
> in the maven-bundle-plugin?
>
> IIUC these services are really only used by the blueprint implementation.
>  They are not used directly by the application and so it seems to be
> inappropriate to include these in the MANIFEST for the application bundle.
>  Is this a defect for the maven-bundle-plugin?
>
> Regards,
> Joe
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to