As Tim says you only need that service if you use the Apache Aries
blueprint. If you use the bluprint RI you need something different.
Another blueprint impl might not use services for adding in new
namespaces to the XML. I do not think the maven bundle plugin should
generate metadata that ties you to an implementation of blueprint.
Also given the metadata is there if it were used to provision
dependancies you would end up provisioning things you either don't
need, or don't want. Having two blueprint runtimes is one such don't
want.
I do understand you are trying to solve a real problem here, but I
think doing it this way is wrong and therefore a bug.
On the subject of importing org.osgi.service.blueprint I think that is
reasonable as the spec says you should import that package and I do
not see the two as being related.
Alasdair
On 25 Mar 2010, at 19:20, Guillaume Nodet <[email protected]> wrote:
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