ServiceMix 4
  1. ServiceMix 4
  2. SMX4-579

extract common used classes for itests

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      this avoid put same classes in different bundles, which can cause ClassCastException

        Activity

        Show
        Freeman Fang added a comment - commit fix http://svn.apache.org/viewvc?rev=986579&view=rev
        Hide
        Geert Schuring added a comment - - edited

        This is why every bundle should have package-import statements covering all packages it exports. That way, if 2 bundles offer the same code (which happens frequently) the OSGi classloaders make sure that only 1 version is used throughout the JVM.

        This is the maven-bundle-plugin' s default behaviour. See http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

        Extract:
        "<Import-Package> is assumed to be "*", which imports everything referred to by the bundle content, but not contained in the bundle.
        Any exported packages are also imported by default, to ensure a consistent class space."

        Show
        Geert Schuring added a comment - - edited This is why every bundle should have package-import statements covering all packages it exports. That way, if 2 bundles offer the same code (which happens frequently) the OSGi classloaders make sure that only 1 version is used throughout the JVM. This is the maven-bundle-plugin' s default behaviour. See http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html Extract: "<Import-Package> is assumed to be "*", which imports everything referred to by the bundle content, but not contained in the bundle. Any exported packages are also imported by default, to ensure a consistent class space."

          People

          • Assignee:
            Freeman Fang
            Reporter:
            Freeman Fang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development