Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-195

Clarify serializability requirements for extension-provided metadata

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: Portable Extensions
    • Labels:
      None
    • Affects:
      Release Notes

      Description

      The spec never requires an extension-provided implementation of the Bean, Interceptor, Decorator or InjectionPoint to be serializable. The implementation indicates, whether the underlying bean is passivation capable by implementing PassivationCapable, but the implementation itself does not have to be serializable.

      For both the InjectionPoint bean and Bean metadata bean the spec says: "The built-in implementation must be a passivation capable dependency". However, this is hard to guarantee if an extension provides a non-serializable implementation of a Bean/InjectionPoint interface, e.g. the following code would cause problems at passivation:

      public class Bar implements Serializable {
         @Inject
         private InjectionPoint ip;
      }
      

      If the metadata of the Bar bean (Bean<Bar>) is not serializable, Bar cannot be passivated.

        Attachments

          Activity

            People

            Assignee:
            pmuiratbleepbleep Pete Muir
            Reporter:
            rhn-engineering-jharting Jozef Hartinger
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: