On 5/10/08, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

> Rajini Sivaram wrote:
>
> > On 5/5/08, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
> >
> > Rajini Sivaram wrote:
> > >
> > > At the moment, I am creating a single virtual 3rd party bundle. For
> > > > the
> > > > longer term, if there are use-cases where different Tuscany
> > > > extensions
> > > > require different versions of 3rd party libs, we may want to split
> > > > this
> > > > into
> > > > multiple virtual bundles.
> > > >
> > > >
> > > > How about having one virtual bundle per 3rd party JAR?
> > >
> > > Isn't that what we'll need to really leverage the OSGi classloader
> > > isolation and versioning capabilities?
> > >
> > > Isn't that also what these 3rd parties will do once they OSGi-enable
> > > their
> > > own JARs?
> > >
> >
> >
> >
> > Yes, you are absolutely right.
> >
> > I started with the assumption that to leverage versioning of 3rd party
> > libraries, we will need explicit versioned import/export statements in
> > all
> > 3rd party bundles. I preferred to generate these offline during the
> > build process, and the generated manifest file is added to
> > tuscany-sca-manifest.jar (not as a manifest, but as a plain resource).
> >
> > The code which generates virtual bundles at the moment looks for .mf
> > files
> > corresponding to the 3rd party jars. If a file (eg. stax-api-1.0-2.mf)
> > is
> > found in tuscany-sca-manifest.jar, a separate virtual bundle is
> > generated
> > for it (ie, stax-api-1.0-2 becomes a separate bundle). All the remaining
> > jars without specific .mf files and bundled together into a single
> > virtual
> > bundle.
> >
>
> OK, the idea of .mf looks good to me, but I can't really use
> tuscany-sca-manifest.jar as it doesn't work in Eclipse, and out of Eclipse
> it drags all the Tuscany JARs which I don't always need.
>
> Could you put the .mf files in another JAR that I can use in an OSGi
> environment?


At the moment, itest/osgi-tuscany generates a manifest jar file called
tuscany-sca-manifest.jar  using a copy of the pom in distribution. I was
hoping that we could use a single jar for both OSGi and non-OSGi. The list
of virtual 3rd party bundles to be installed and the location of their plain
jar files is based on the Class-Path entry in this tuscany-sca-manifest.jar.
I do understand that this jar doesn't work in Eclipse, but I am not sure
what we gain by having an additional jar for OSGi rather than reuse the jar
which is already in distribution. Are we planning to get rid of
tuscany-sca-manifest.jar in distribution?



> At the moment, the build generates only a single combined manifest entry,
> > and hence a single virtual bundle is used.
> >
>
> I'm confused, can you point me to that single manifest entry and the code
> or build that generates it?


The code is in itest/osgi-tuscany. It is not part of the main build at the
moment. It still contains the older 5-bundle version, so the directory
structure may be a bit confusing. It is not a particularly efficient build -
I have just done enough to get Tuscany running under OSGi with bundle-ized
modules and virtual 3rd party libs. The build itself could be tidied up a
lot.


   - tuscany-3rdparty-manifest - The 3rd party manifest entries for OSGi
   (generates org/apache/tuscany/manifest/MANIFEST.MF)
   - tuscany-manifest  - Generates  tuscany-sca-manifest.jar (similar to
   the manifest jar in distribution, but in addition to its standard manifest,
   this jar contains a bundle activator that installs 3rd party libs as virtual
   bundles, and the manifest file above).
   - test-bundles - Generates two bundle-ized tests (one simple
   implementation.java sample, and a second webservice sample) for sniff
   testing Tuscany under OSGi
   - osgi-tuscany-test - Testcases for OSGi-based Tuscany (runs the two
   sniff tests from test-bundles, and a bunch of samples directly from the
   samples build)


The following correspond to the old 5-bundle version of Tuscany that are not
used anymore.

   - sca-api
   - tuscany-spi
   - tuscany-runtime
   - tuscany-extensions
   - tuscany-3rdparty




> Thanks!
> --
> Jean-Sebastien
>



-- 
Thank you...

Regards,

Rajini

Reply via email to