Announcement Announcement Module
Collapse
No announcement yet.
two PAR files sharing one datasource Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • two PAR files sharing one datasource

    Hi!

    I'm still working with the greenpages sample, this time I created a little test project called yellowpages and I would like to reference from the yellowpages.jpa (similar to greenpages.jpa) to the datasource published to the OSGi service register in the greenpages.db bundle. The structure of these projects looks something like that:

    greenpages (PAR file) containing
    - greenpages.db (datasource)
    - greenpages.app (domain model)
    - greenpages.jpa (data access objects)
    - greenpages.web (web interface)

    yellowpages (PAR file) containing
    - yellowpages.app (domain model)
    - yellowpages.jpa (data access objects) <-- It references a service published in greenpages.db
    - yellowpages.web (web interface)

    The problem is that yellowpages.jpa can't find the datasource published by greenpages.db
    How could I indicate to the dmServer to find this datasource in the bundle greenpages.db from the greenpages PAR file?


    Thank you very much.

    Best regards,
    Victor

  • #2
    Services published by bundles packaged within a PAR are scoped, so that the exported greenpages datasource will not "visible" outside of that PAR. With dm Server 2.0 you can use plans instead of PAR's and enable/disable scoping (with the latest snapshot of 2.0 disabling scoping seems not to function yet).

    Comment


    • #3
      Hi horombo,

      thank you for your answer.

      Regards,
      Victor

      Comment


      • #4
        Unscoped (non-atomic) plans are supported for the first time in the latest 2.0 CI build.

        Here's the console log from a test I just ran on that build of an unscoped, atomic plan referring to a couple of bundles in repository/bundles/usr:
        Code:
        [2009-07-14 08:36:44.987] fs-watcher               <SPDE0048I> Processing 'INITIAL' event for file 'testunscopednonatomic.plan'.
        [2009-07-14 08:36:45.137] fs-watcher               <SPDE0056I> Installing plan 'test.plan' version '1.0.0'.
        [2009-07-14 08:36:45.138] fs-watcher               <SPDE0056I> Installing bundle 'simple.bundle.one' version '1.0.0.BUILD-20090326114035'.
        [2009-07-14 08:36:45.140] fs-watcher               <SPDE0056I> Installing bundle 'simple.bundle.two' version '1.0.0.BUILD-20090326114046'.
        [2009-07-14 08:36:45.170] fs-watcher               <SPDE0057I> Installed bundle 'simple.bundle.one' version '1.0.0.BUILD-20090326114035'.
        [2009-07-14 08:36:45.172] fs-watcher               <SPDE0057I> Installed bundle 'simple.bundle.two' version '1.0.0.BUILD-20090326114046'.
        [2009-07-14 08:36:45.182] fs-watcher               <SPDE0057I> Installed plan 'test.plan' version '1.0.0'.
        [2009-07-14 08:36:45.207] fs-watcher               <SPDE0059I> Starting plan 'test.plan' version '1.0.0'.
        [2009-07-14 08:36:45.210] fs-watcher               <SPDE0059I> Starting bundle 'simple.bundle.one' version '1.0.0.BUILD-20090326114035'.
        [2009-07-14 08:36:45.212] fs-watcher               <SPDE0060I> Started bundle 'simple.bundle.one' version '1.0.0.BUILD-20090326114035'.
        [2009-07-14 08:36:45.216] fs-watcher               <SPDE0059I> Starting bundle 'simple.bundle.two' version '1.0.0.BUILD-20090326114046'.
        [2009-07-14 08:36:45.219] fs-watcher               <SPDE0060I> Started bundle 'simple.bundle.two' version '1.0.0.BUILD-20090326114046'.
        [2009-07-14 08:36:45.229] fs-watcher               <SPDE0060I> Started plan 'test.plan' version '1.0.0'.
        [2009-07-14 08:36:46.359] Thread-19                <SPWE0001I> Started web bundle '/com.springsource.server.repository'.
        [2009-07-14 08:37:07.245] fs-watcher               <SPDE0048I> Processing 'DELETED' event for file 'testunscopednonatomic.plan'.
        [2009-07-14 08:37:07.246] fs-watcher               <SPDE0062I> Stopping plan 'test.plan' version '1.0.0'.
        [2009-07-14 08:37:07.247] fs-watcher               <SPDE0062I> Stopping bundle 'simple.bundle.one' version '1.0.0.BUILD-20090326114035'.
        [2009-07-14 08:37:07.249] fs-watcher               <SPDE0063I> Stopped bundle 'simple.bundle.one' version '1.0.0.BUILD-20090326114035'.
        [2009-07-14 08:37:07.255] fs-watcher               <SPDE0062I> Stopping bundle 'simple.bundle.two' version '1.0.0.BUILD-20090326114046'.
        [2009-07-14 08:37:07.256] fs-watcher               <SPDE0063I> Stopped bundle 'simple.bundle.two' version '1.0.0.BUILD-20090326114046'.
        [2009-07-14 08:37:07.267] fs-watcher               <SPDE0063I> Stopped plan 'test.plan' version '1.0.0'.
        [2009-07-14 08:37:07.268] fs-watcher               <SPDE0065I> Uninstalling plan 'test.plan' version '1.0.0'.
        [2009-07-14 08:37:07.269] fs-watcher               <SPDE0065I> Uninstalling bundle 'simple.bundle.one' version '1.0.0.BUILD-20090326114035'.
        [2009-07-14 08:37:07.295] fs-watcher               <SPDE0066I> Uninstalled bundle 'simple.bundle.one' version '1.0.0.BUILD-20090326114035'.
        [2009-07-14 08:37:07.297] fs-watcher               <SPDE0065I> Uninstalling bundle 'simple.bundle.two' version '1.0.0.BUILD-20090326114046'.
        [2009-07-14 08:37:07.341] fs-watcher               <SPDE0066I> Uninstalled bundle 'simple.bundle.two' version '1.0.0.BUILD-20090326114046'.
        [2009-07-14 08:37:07.342] fs-watcher               <SPDE0066I> Uninstalled plan 'test.plan' version '1.0.0'.

        Comment

        Working...
        X