1 2 Previous Next 22 Replies Latest reply on Nov 14, 2006 1:05 PM by starksm64

    Update on metadata progress

      This is going a lot slower than I expected, I've not got very far
      into the problem despite working on it all week (including
      a couple of all nighters :-)

      It is very laborious work. At least, I've got a parser that
      can parse javaee_5.xsd, ejb-jar_2_1.xsd and ejb-jar_3.0.xsd
      and I can prove it works for all element (well except the webservices stuff. ;-)

      I'm basically in stage 2 of the following roadmap with
      (1) still incomplete for the jboss.xml stuff.

      1) Create a new set of more rational metadata classes
      that can be shared by javaee based deployers.

      2) Map the old the metadata classes as a facade over these
      classes.

      3) Rework the EJB2.1 deployer to use new metadata
      and expose the old metadata via the container
      for backwards compatibility (meaning the
      only part of the container I need to rewrite is the getBeanMetaData()
      hooks).

      4) Rework the metadata classes to share the same model
      as the javaee/ejb3 annotations allowing the org.jboss.metadata hierarchy
      to provide the mixing/overriding of class annotations and deployment/instance metadata (the model from 1)
      This will give hardwired deployment, class, instance contexts.

      5) Deal with the metadata collection merging for things like
      resource-refs.

      6) Plugin Bill's injector stuff, as discussed elsewhere.
      (Actually the current stuff is wrong, since it only copes with
      one injection target per Ref)

      7) Properly plugin in the metadata repository such that the
      metadata hierarchy is extensible and configurable.

      8) Write the code to expose the metadata context(s) via
      the ManagedObject abstraction to the profile service.
      Both the combined runtime view and the individual contexts.

      It was originally (8) that got me started on this, but trying to
      write a mapping for all the JavaEE metadata when
      * each deployer does it differently
      * the details needed are embedded in an arbitrary metadata object
      * there are even different models for EJB2 and EJB3

      But, with this approach, it will just be a case of creating the ManagedObject
      from the annotations/metadata of the metadata context,
      a much simpler task. Obviously, it is not quite that simple, but
      at least it will be a tractable problem. :-)

      There's also further steps:
      9) Do this for the other JavaEE deployers (rar, war, car, ejb3, etc.)
      10) Work out how to expose the managed object model for JMX and MC

      Issues still to work out:

      * What Bill is talking about when he says annotation fail as a
      metadata model
      * Which parts of the model should be promoted to annotations
      * The merging/hiding issue
      * A simple mechansim to populate deployment vs instance metadata
      e.g. assembly-descriptor stuff can be generic to the deployment
      or ejb specific

        • 1. Re: Update on metadata progress

          Once I figure out what the hell you are talking about, I can pick up the RAR work or take anything off your plate you want to give me (note, this doesn't mean 4-5 words of broken English, the Queen's or otherwise).

          • 2. Re: Update on metadata progress
            bill.burke

            BIll D can do any metadata parsing you want.

            • 3. Re: Update on metadata progress

               

              "bill.burke@jboss.com" wrote:
              BIll D can do any metadata parsing you want.


              No he can't (if you mean the ejb3 model) .
              I've already critiqued that code in a different thread. :-)

              Besides those, It lacks a number of other features that I'm looking for, like
              1) being able to map the model to the JSR88 xpath view (including changes
              see (3))
              2) the model being serializable and/or remarshallable as xml
              3) changes to the model easily/seamlessly updating into
              the management view so they don't get out of synch (this would probably
              always be true if it wasn't semi-automatic).

              You're probably not a regular reader of the JBossXB forums :-)
              http://www.jboss.com/index.html?module=bb&op=viewtopic&t=92129

              • 4. Re: Update on metadata progress

                 

                "wmprice" wrote:
                Once I figure out what the hell you are talking about, I can pick up the RAR work or take anything off your plate you want to give me (note, this doesn't mean 4-5 words of broken English, the Queen's or otherwise).


                Which part don't you understand? What I'm writing is the infrastructure
                to write metadata models with annotations so you can:

                1) build them from config files (most likely xml)

                2) they update into other views like jsr88/custom management views
                and can be changed by them

                3) they are hierarchical in terms of being overridable at
                server/deployment/class/instance level, etc.

                4) a user can create one programatically and then create a component
                without all the xml crap (pseudo code)
                SessionBeanMetaData sessionBean = ...
                ServiceMetaData service = EJBHelper.createService(sessionMBean);
                serviceController.install(service);
                


                5) It is relatively easy for the developer to add to the model
                and have it propogate throughout these usecases without
                writing extra code (which they almost certainly won't do :-).
                i.e. it will use default rules/conventions or you can add annotations to
                override the conventions.

                • 5. Re: Update on metadata progress

                  Ok, laid out like that...I see the light!

                  So, again, I am more than willing to do the RAR stuff, or any other 'grunt work' you want done. However, I am *not* getting you coffee or going through your junk mail!






                  • 6. Re: Update on metadata progress
                    bdecoste

                    Long live XB!

                    Bill, back in Westford we talked about migrating or supporting the old metadata model. I'm just starting new some tasks - do we still want to do that?

                    • 7. Re: Update on metadata progress
                      bill.burke

                       

                      "adrian@jboss.org" wrote:
                      Which part don't you understand? What I'm writing is the infrastructure
                      to write metadata models with annotations so you can:


                      You mean Schema annotations/JBossXB/JAXB? Right?



                      • 8. Re: Update on metadata progress
                        bill.burke

                         


                        Bill, back in Westford we talked about migrating or supporting the old metadata model. I'm just starting new some tasks - do we still want to do that?


                        Looks like Adrian is doing the work Bill.

                        • 9. Re: Update on metadata progress
                          bdecoste

                          Well, if I can help let me know.

                          • 10. Re: Update on metadata progress
                            starksm64

                             

                            "bdecoste" wrote:
                            Long live XB!

                            Bill, back in Westford we talked about migrating or supporting the old metadata model. I'm just starting new some tasks - do we still want to do that?

                            I have merged the web tier metadata parsing back into the org.jboss.metadata tree as part of the war deployer update. Its just a merge of the new ObjectModelFactory code into an ObjectModelFactory that encompasses the legacy XmlLoadable parsing. I'm checking this in today. The annotation processing and injection handling still needs to be refactored.


                            • 11. Re: Update on metadata progress

                              From what I understand there is to be a 'conclusive' metadata model that spans multiple EE domains (RAR, WAR, EAR). Is this correct? I am assuming that we will all use Adrian's framework and that previous code (see RARDeployer and prototype DSXML deployer) will be migrated to the new framework.

                              Basically an enormous, honking, parsing, marshalling/unmarshalling layer right?


                              • 12. Re: Update on metadata progress
                                bill.burke

                                yup. The reason? ENC refs/injection is one thing that is shared...

                                • 13. Where are metadata classes for JavaEE/EJB?
                                  bill.burke

                                  Are these metadata classes for ejb-jar.xml and javaee5.xsd in SVN yet? Where?

                                  Augmenting the metamodel with annotation information is something that the EJB team can definately do. As well as getting the metamodel to work with the current deployers.

                                  The way I envision it is:

                                  1) A parsing deployer for ejb-jar.xml and one for jboss.xml (I guess so we can deploy wls descriptors and such?)
                                  2) A javax annotation processor for ENC/injection annotations that augment any metadata created by ejb deployer or web deployer
                                  3) org.jboss annotation processor for same thing
                                  4) An EJB deployer that takes metamodel, creates EJB Containers, and deploys based on that metamodel.

                                  I or EJB team can take on any one of the tasks as long as the metamodel classes/API are complete. That way you can focus on things closer to the kernel rather than any EJB specific things and we can add in our help.

                                  • 14. Re: Update on metadata progress
                                    starksm64

                                    They have not been checked in yet according to the svn commit messages.

                                    1 2 Previous Next