Announcement Announcement Module
Collapse
No announcement yet.
Ordering with plan file only used with Repository ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ordering with plan file only used with Repository ?

    I have two bundles say BundleA and BundleB.

    BundleB depends upon BundleA.

    Now when deploying these bundle itself i have to follow the order .


    So now i assume plan file is solving my ordering issues

    For plan to solve ordering these bundles need to be deployed first then plan is just referring to these bundles.

    My question is if i have to deploy the bundles before deploying the plan and that too in order how is plan solving my ordering problem ?

    Also i do not want to use hosted repository .

  • #2
    Rather than deployed the two bundles, you should copy them to your dm Server's local repository. In 2.0 M5 this would be, by default, repository/usr. This is a watched repository which will automatically update itself when the bundles are copied into the directory that it is watching. You can configure how frequently it performs this check in the com.springsource.repository.properties file. Having copied the two bundles to the local repository, you can then deploy the plan file by copying it into the pickup directory. dm Server will find the two bundles which it references in its repository and then deploy them in the order specified in the plan.

    Comment


    • #3
      Thanks andy it solved my problem but yet another doubt i have is

      In previous version there was no support for atmic="false",
      Now does the dm version M5 support this

      Comment


      • #4
        Excellent, thanks for letting me know.

        Yes, M5 supports both scoped and unscoped plans.

        Comment


        • #5
          My scoped plan is not working

          MyPlan.plan

          Code:
          scoped="true" atomic="false"
          <artifact type="bundle" name="BundleOneForPlan" version="[1.0.0, 2.0.0)"/>
          <artifact type="bundle" name="BundleTwoForPlan" version="[1.0.0, 3.1.0)"/>


          MyPlanTwo.plan
          Code:
          scoped="true" atomic="false"
          <artifact type="bundle" name="BundleOneForPlan" version="[1.0.0, 2.0.0)"/>
          <artifact type="bundle" name="BundleTwoTwoForPlan" version="[1.0.0, 3.1.0)"/>
          BundleOneForPlan is exposing an OSGi -service other two bundles are referring to the same service

          the deployment of second plan was not successful

          Code:
          [2009-10-19 06:15:07.420] fs-watcher                   <HD0001I> Processing 'CREATED' event for file 'MyPlan.plan'. 
          
          [2009-10-19 06:15:07.575] fs-watcher                   <DE0056I> Installing plan 'multi-artifact.plan' version '1.0.0'. 
          
          [2009-10-19 06:15:07.755] fs-watcher                   <DE0057I> Installed bundle 'BundleOneForPlan' version '1.0.0'. 
          
          [2009-10-19 06:15:07.782] fs-watcher                   <DE0057I> Installed bundle 'BundleTwoForPlan' version '1.0.0'. 
          
          [2009-10-19 06:15:07.808] fs-watcher                   <DE0057I> Installed plan 'multi-artifact.plan' version '1.0.0'. 
          
          [2009-10-19 06:15:07.912] fs-watcher                   <DE0059I> Starting plan 'multi-artifact.plan' version '1.0.0'. 
          
          [2009-10-19 06:15:07.934] fs-watcher                   <DE0059I> Starting bundle 'BundleOneForPlan' version '1.0.0'. 
          
          [2009-10-19 06:15:07.993] fs-watcher                   <DE0059I> Starting bundle 'BundleTwoForPlan' version '1.0.0'. 
          
          Activator Called
          
          [2009-10-19 06:15:08.663] Thread-3                     <DE0060I> Started bundle 'BundleOneForPlan' version '1.0.0'. 
          
          COMMON BEANS STATIC MESSAGE null
          
          Service Message null
          
          HELLO VISHAL
          
          [2009-10-19 06:15:08.719] Thread-3                     <DE0060I> Started bundle 'BundleTwoForPlan' version '1.0.0'. 
          
          [2009-10-19 06:15:08.744] Thread-3                     <DE0060I> Started plan 'multi-artifact.plan' version '1.0.0'. 
          
          [2009-10-19 06:15:18.272] fs-watcher                   <HD0001I> Processing 'CREATED' event for file 'MyPlanTwo.plan'. 
          
          [2009-10-19 06:15:18.433] fs-watcher                   <DE0056I> Installing plan 'multi-artifact-two.plan' version '1.0.0'. 
          
          [2009-10-19 06:15:18.633] fs-watcher                   <DE0057I> Installed bundle 'BundleOneForPlan' version '1.0.0'. 
          
          [2009-10-19 06:15:18.664] fs-watcher                   <DE0057I> Installed bundle 'BundleTwoTwoForPlan' version '1.0.0'. 
          
          [2009-10-19 06:15:18.710] fs-watcher                   <DE0057I> Installed bundle 'multi-artifact-two.plan-synthetic.context' version '1.0.0'. 
          
          [2009-10-19 06:15:18.727] fs-watcher                   <DE0057I> Installed plan 'multi-artifact-two.plan' version '1.0.0'. 
          
          [2009-10-19 06:15:18.857] fs-watcher                   <DE0059I> Starting plan 'multi-artifact-two.plan' version '1.0.0'. 
          
          [2009-10-19 06:15:18.886] fs-watcher                   <DE0059I> Starting bundle 'BundleTwoTwoForPlan' version '1.0.0'. 
          
          Activator Called
          
          [2009-10-19 06:15:18.944] fs-watcher                   <DE0059I> Starting bundle 'multi-artifact-two.plan-synthetic.context' version '1.0.0'. 
          
          [2009-10-19 06:15:18.989] fs-watcher                   <DE0060I> Started bundle 'multi-artifact-two.plan-synthetic.context' version '1.0.0'. 
          
          [2009-10-19 06:15:19.034] fs-watcher                   <DE0060I> Started bundle 'BundleOneForPlan' version '1.0.0'. 
          
          [2009-10-19 06:15:24.169] service-monitor-thread-1     <KE0010W> Mandatory reference '&myService' in bundle 'multi-artifact-two.plan-1-BundleTwoTwoForPlan' version '1.0.0' is waiting for service with filter '(objectClass=com.xyz.api.IService)'. 
          
          [2009-10-19 06:15:39.180] service-monitor-thread-1     <KE0010W> Mandatory reference '&myService' in bundle 'multi-artifact-two.plan-1-BundleTwoTwoForPlan' version '1.0.0' is waiting for service with filter '(objectClass=com.xyz.api.IService)'.
          Last edited by vishalj; Oct 19th, 2009, 07:32 AM.

          Comment


          • #6
            In the plan definitions listed above, both are scoped. Is that right, or should MyPlan have scoped=false?

            Comment


            • #7
              both are scoped only .

              Comment


              • #8
                Ok, so it looks like you have one scoped plan that works (MyPlan), and one that does not (MyPlanTwo).

                From the output you've posted above, MyPlanTwo is failing because BundleTwoTwoForPlan cannot find a service that's been registered under the class com.xyz.api.IService. It's worth double-checking that BundleOneForPlan in MyPlanTwo is publishing a service under this class.

                If that doesn't show what the problem is, please open a JIRA attaching the relevant plans and bundles so that we can investigate.

                Comment


                • #9
                  Hi Andy ,The BundleOneForPlan is fine.
                  When i give scope="false" in both of my plans they work fine .

                  Have raised a jira issue for this .

                  https://issuetracker.springsource.com/browse/DMS-1763

                  Comment

                  Working...
                  X