Bundlor
  1. Bundlor
  2. BNDLR-318

Bundlor and Spring-Context Not Working

    Details

    • Type: Defect Defect
    • Status: Done Done
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: 1.0.0.M6
    • Fix Version/s: Sprint 9, 1.0.0.RC1, 1.0.0.RELEASE
    • Labels:
      None
    • Environment:

      2.2.0.200910210131-RELEASE

      Description

      It does not appear that Bundlor checks the Spring-Context in the template.mf to determine where to scan for spring context XML files.

      We are converting a legacy WAR, and deploying to Spring dm Server 1, so we're using the web-module format. Our project therefore has under src/main/resources only a META-INF folder (containing the MANIFEST.MF) and a MODULE-INF folder.

      MODULE-INF also contains a META-INF/company/spring folder which contains my spring context files.

      (In web.xml, we specify for the contextConfigLocation context-param the value of classpath*:META-INF/plateau/spring/*/.xml, and this works great at runtime.)

      In the project's template.mf, if I specify any of the following, I see the Spring-Context appear in the MANIFEST.MF but the imports are not being augmented with classes specified in our spring context files.

      • Spring-Context: MODULE-INF/META-INF/company/spring/*/.xml
      • Spring-Context: MODULE-INF/META-INF/company/spring/*.xml

      (Of course at runtime we will get an error that we're adding multiple contexts b/c of our web.xml also having a context listener - we'd take this out as part of our conversion process of the WAR. I mention this in case it is confusing Bundlor, however.)

        Activity

        Hide
        Ben Hale (c) added a comment -

        For various reasons we've stopped observing the Spring-Context header. We now scan the entire bundle for any XML file that is a spring configuration. We still observe the Bundle-Context header for Blueprint Service configuration.

        The latest snapshot should eliminate any issues you're having.

        Show
        Ben Hale (c) added a comment - For various reasons we've stopped observing the Spring-Context header. We now scan the entire bundle for any XML file that is a spring configuration. We still observe the Bundle-Context header for Blueprint Service configuration. The latest snapshot should eliminate any issues you're having.

          People

          • Assignee:
            Unassigned
            Reporter:
            Scott Hamilton
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: