4 Replies Latest reply on Nov 19, 2012 6:37 PM by bwallis42

    Direct support for CDI (JSR-299)?

    rhauch

      In the Seam.Next Announcement blog post, Shane talks about how the Seam community has encouraged projects to own their own CDI extensions:

       

      "By enabling CDI support in as many places as possible, our goal is to make developer productivity stronger than ever. To that end, we have been encouraging and assisting other project teams to provide CDI integration directly from their own projects."

       

      Since neither the Jackrabbit nor ModeShape projects have directly provided CDI extensions, the Seam community created the Seam JCR module do do this.

       

      Should ModeShape 3.0 natively provide CDI extensions for JCR? It seems like this is certainly possible and straightforward, but it also raises a number of questions.

       

      1. If we do this, what happens to Seam JCR (or to the corresponding module in the proposed Apache DeltaSpike project), especially if Jackrabbit does not provide their own CDI injection?
      2. Do the benefits of a single CDI extension for multiple JCR implementations outweigh those of ModeShape-specific CDI extension?
      3. If both ModeShape and Jackrabbit were to provide their own CDI extensions, what's the impact of the two CDI extensions diverging? (After all, even with Seam JCR they extensions for ModeShape and Jackrabbit do have some differences.)
      4. Should we instead push the JSR-333 (aka "JCR 2.1") effort to include standard CDI extensions, and is that even possible given the varied implementations?

       

      I've created MODE-1316 as a placeholder. If the outcome of this discussion is that ModeShape 3 should provide CDI extensions, then we'll flesh out the work under that issue. On the other hand, if the outcome is that Seam JCR (or DeltaSpike JCR) is the better approach, then we'll document this on the issue and close it.

       

      So, what are your thoughts?

       

      BTW, George Gastaldi and John Ament are contributors to ModeShape and the creators of Seam JCR, so I thought this might be a useful location for this discussion.

        • 1. Re: Direct support for CDI (JSR-299)?
          hchiorean

          What if we:

          1. pull Seam JCR into ModeShape 3.x first
          2. at the same time try to make the extensions standard, by pushing them into JSR-333 ?

           

          Overall I think it's a great idea which would ease development.

          • 2. Re: Direct support for CDI (JSR-299)?
            bwallis42

            I was wondering if this went anywhere in either modeshape 3 or seam? The seam documentation for 3.1.0.Final only seems to support modeshape 2.

            • 3. Re: Direct support for CDI (JSR-299)?
              rhauch

              We've not yet finished MODE-1574. We can probably merge the code pretty quickly, but I'm not convinced that the object mapping capability is something we should encourage.

              • 4. Re: Direct support for CDI (JSR-299)?
                bwallis42

                I posted an extra requirement on the CDI stuff to the ticket for support for multi-tenancy, I think the way this works for hibernate 4 can be mapped reasonably cleanly into modeshape via the CDI injection.

                 

                At the moment I don't have any interest in the object mapping. Interesting idea but haven't had the time to have a good think about that.