Tuscany
  1. Tuscany
  2. TUSCANY-2296

SCADomain.newInstance() processes all composites in the contribution irrespective of the parameter passed

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Java-SCA-1.2
    • Fix Version/s: Java-SCA-1.x
    • Component/s: SCA Java Runtime
    • Labels:
      None

      Description

      I have two composites, namely "proper.composite" and "error.composite", in my test project. "proper.composite" is used to test proper contribution without any errors whereas "error.composite" is used to test a problematic contribution. But when I initialize a domain using SCADomain. newInstance("proper.composite"), I am getting an exception due to "error.composite". Though it looks as if the call SCADomain. newInstance("proper.composite") processes only "proper.composite", in reality it is processing all the .composite files present in the project irrespective of the parameter passed to SCADomain.newInstance().

        Activity

        Hide
        Vamsavardhana Reddy added a comment -

        TUSCANY-2296-recreate.patch: Helps better understand the problem I am facing.

        Show
        Vamsavardhana Reddy added a comment - TUSCANY-2296 -recreate.patch: Helps better understand the problem I am facing.
        Hide
        ant elder added a comment -

        I'm thinking about closing this as Working-As-Designed, but I'll just say this now and leave the JIRA open for a while to see if there are other comments.

        It does work as you've described and I agree that can seem unintuitive, but thats the way org.apache.tuscany.host.embedded.SCADomain works - the entire thing is treated as a contribution and all composites in that contribution get processed, the composite passed in on the newInstance call is the deployable composite not the sole composite to be processed.

        There is a SCADomain newInstance method that takes both a contribution location and list of deployable composites and I think there IS a bug in that which means the contribution location often gets ignored, but really to clean all this up properly requires sorting out what to do with all the new domain/node/node2 etc stuff.

        Show
        ant elder added a comment - I'm thinking about closing this as Working-As-Designed, but I'll just say this now and leave the JIRA open for a while to see if there are other comments. It does work as you've described and I agree that can seem unintuitive, but thats the way org.apache.tuscany.host.embedded.SCADomain works - the entire thing is treated as a contribution and all composites in that contribution get processed, the composite passed in on the newInstance call is the deployable composite not the sole composite to be processed. There is a SCADomain newInstance method that takes both a contribution location and list of deployable composites and I think there IS a bug in that which means the contribution location often gets ignored, but really to clean all this up properly requires sorting out what to do with all the new domain/node/node2 etc stuff.
        Hide
        tomas darbois added a comment -

        I'm facing the same problem, and I was hoping to see a solution or workaround , instead of reply with Work as Designed

        I ve several composite files that are used depending on the deployement (used by several applications, and in various servers that aren't identical) and I was starting to see a good way to design it in my application, grouping the composites in the same place so that I was having a quicker control on them.

        I will use some tricks to workaround that problem, but it's considered for me as a really bad point for future enhancements of my application.

        Show
        tomas darbois added a comment - I'm facing the same problem, and I was hoping to see a solution or workaround , instead of reply with Work as Designed I ve several composite files that are used depending on the deployement (used by several applications, and in various servers that aren't identical) and I was starting to see a good way to design it in my application, grouping the composites in the same place so that I was having a quicker control on them. I will use some tricks to workaround that problem, but it's considered for me as a really bad point for future enhancements of my application.
        Hide
        Luciano Resende added a comment -

        Let me try to give my 2c here :

        I tend to compare contribution process to how a development IDE would process a java project. You want the code that process your java project to tell you about compilation errros, etc then it needs to process all the files....

        In the SCA case, the contribution service would process all artifacts and most of the times only display warnings. This would still allow you to deploy and start components even tough your contribution is not all complete and correct and would also allow you to debug stuff ...

        So I think we should take a look at this... i might be able to help in a week or two.

        Show
        Luciano Resende added a comment - Let me try to give my 2c here : I tend to compare contribution process to how a development IDE would process a java project. You want the code that process your java project to tell you about compilation errros, etc then it needs to process all the files.... In the SCA case, the contribution service would process all artifacts and most of the times only display warnings. This would still allow you to deploy and start components even tough your contribution is not all complete and correct and would also allow you to debug stuff ... So I think we should take a look at this... i might be able to help in a week or two.
        Hide
        ant elder added a comment -

        FYI, additional comments on the dev list: http://apache.markmail.org/message/dj72oxzhfdofouae

        Show
        ant elder added a comment - FYI, additional comments on the dev list: http://apache.markmail.org/message/dj72oxzhfdofouae

          People

          • Assignee:
            Unassigned
            Reporter:
            Vamsavardhana Reddy
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development