glassfish
  1. glassfish
  2. GLASSFISH-18920

Pick-up @ApplicationException from different deployment unit

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: future release
    • Component/s: deployment
    • Labels:
      None

      Description

      Use case:

      • have some Exceptions pre-defined and shared (e.g. for inheritance) while also pre-defining business logic semantics

      The concrete issue:

      • Create a plain-vanilla OSGi bundle containing service contracts as well as exceptions (annotate one of them)
      • Create a hybrid OSGi/JavaEE bundle containing an implementation and try to use the annotated exception

      Result:

      • defined behaviour of the @ApplicationException is not applied

      This is due to the fact that the BaseContainer does not find the exception in the list of application-exceptions.

      We know that there exists workarounds but that involves modifying probably a lot of artifacts, esp. in a multi-layered, highly modularised application setup where only one of a few very basic shared Exception classes are deemed to provide specific semantics for all implementations.

        Issue Links

          Activity

          Hide
          Hong Zhang added a comment -

          As the use cases are for OSGI bundles, I will let Sahoo do initial evaluation for this new feature request.

          Show
          Hong Zhang added a comment - As the use cases are for OSGI bundles, I will let Sahoo do initial evaluation for this new feature request.
          Hide
          Sanjeeb Sahoo added a comment -

          Changing it to a deployment type issue for reasons stated in GLASSFISH-18918.

          Show
          Sanjeeb Sahoo added a comment - Changing it to a deployment type issue for reasons stated in GLASSFISH-18918 .
          Hide
          Hong Zhang added a comment -

          We don't scan the classes outside of the application due to various considerations (for example, performance). We may revisit this in the future release if those concerns are no longer applicable or this use case has to be supported.

          Show
          Hong Zhang added a comment - We don't scan the classes outside of the application due to various considerations (for example, performance). We may revisit this in the future release if those concerns are no longer applicable or this use case has to be supported.

            People

            • Assignee:
              Hong Zhang
              Reporter:
              ancoron
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: