Can I assume that we only want to support the co-existence of 1.x and 2.x in the same JVM under OSGi?

I agree that we need to filter out META-INF/services/... from 1.x bundles. There are a few options:

1) Based on a special header in the OSGi MF, such as:
SCA-Spec-Version: 1.0 (for osoa)
SCA-Spec-Version: 1.1 (for oasis)

2) Based on an attribute of each entry in the META-INF/services/..., such as
<className>;version=1.0
(Our 2.x ServiceDiscovery only supports LDAP style filtering)

1) Seems to be simpler and easier to control. We can always generate the header.

Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws" <simonsl...@googlemail.com>
Sent: Friday, November 20, 2009 6:31 AM
To: "tuscany-dev" <dev@tuscany.apache.org>
Subject: 1.x and 2.x runtime coexistence

I wanted to see if I could run the 1.x and 2.x runtimes in the same
JVM at the same time. Given that we have reused class and package
names in 2.x the only way I could think of doing it was by using OSGi.
So I built a single bundle out of (a subset of) the 1.x source and
installed it in OSGi alongside the 2.x bundles. I have a 1.x launcher
bundle and a 2.x launcher bundle in order to wire to appropriate
versions of the runtime. These are currently hardcoded to run the OSOA
and OASIS versions of the calculator sample in the 1.x and 2. runtimes
respectively.

Not quite sure where I'm going with this but it did point out a need
for a change in 2.x in order to stop 2.x processing 1.x
META-INF/services info. Anyhow the code is at [1]. I'd like to start
testing what level of integration we need between 1.x and 2.x by
working out how to submit an app and have the runtime decide whether
it is a 1.x or 2.x app.

Any thoughts most welcome.

Regards

Simon

[1] http://svn.apache.org/repos/asf/tuscany/sandbox/slaws/runtimecompat/

--
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Reply via email to