Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-5212

JRE-provided services are not available to deployments

XMLWordPrintable

    • Hide

      1) Deploy an application that uses javax.print.PrintServiceLookup
      2) Notice it never finds any printers.

      Show
      1) Deploy an application that uses javax.print.PrintServiceLookup 2) Notice it never finds any printers.
    • Workaround Exists
    • Hide

      Copy the META-INF/services files from the JRE (e.g. resources.jar) into modules/sun/jdk/main/service-loader-resources/

      Show
      Copy the META-INF/services files from the JRE (e.g. resources.jar) into modules/sun/jdk/main/service-loader-resources/

      JBoss Modules does not currently support exporting META-INF/services from a system dependency as it does for module dependencies. As a result, any services provided by the JRE cannot be seen from other modules.

      This results in deployments not being able to use javax.print.PrintServiceLookup and other API, since they will not find any implementations.

      The modules/sun/jdk/main/service-loader-resources/ exists purely to work around this problem. It is not the best solution since the contents are JRE-specific.

              dlloyd@redhat.com David Lloyd
              rhn-support-jlivings James Livingston (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: