1 2 3 Previous Next 35 Replies Latest reply on Mar 4, 2008 3:51 PM by kabirkhan Go to original post
      • 15. Re: MC + JAXB (JBossXB Builder)

         

        "alesj" wrote:

        Is install callbacks even legit for beanfactory?


        It applies to the factory not the beans constructed.

        In fact, that could be a way to do things like the AspectFactory registration
        with AOP if we wanted (we dont currently).

        • 16. Re: MC + JAXB (JBossXB Builder)
          aloubyansky

           

          "adrian@jboss.org" wrote:
          I've been speaking with Alexey and we'll probably add support for
          some kind of @JBossXMLMap annotation.


          I've created an issue for this
          http://jira.jboss.com/jira/browse/JBXB-117
          and here we can discuss how it should be implemented
          http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118655

          • 17. Re: MC + JAXB (JBossXB Builder)
            alesj

             

            "adrian@jboss.org" wrote:

            It applies to the factory not the beans constructed.

            In fact, that could be a way to do things like the AspectFactory registration
            with AOP if we wanted (we dont currently).

            OK, I'll enable/add this for the beanfactory once the Map issue is resolved.

            • 18. Re: MC + JAXB (JBossXB Builder)
              alesj

              Btw: is there an obvious way to bind this in-memory schema with IDEs?
              We'll probably need some simple tool/util which will export us the schema generated from metadata into file?

              • 19. Re: MC + JAXB (JBossXB Builder)
                alesj

                Or writing plugins for all known IDEs. :-)

                • 20. Re: MC + JAXB (JBossXB Builder)

                  I already started one.

                  It solves a more general problem which is to dump an xsd schema from a
                  JBossXB SchemaBinding, although its not complete:

                  http://viewvc.jboss.org/cgi-bin/viewvc.cgi/common/jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/SchemaPrinter.java?revision=2555&view=markup

                  • 21. Re: MC + JAXB (JBossXB Builder)

                    This thread has brought up the issue that the new JBoss MC xml parsing
                    is not declaring all its root element and types properly with the correct annotations.

                    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132601#4132601

                    Also we need to find out from Alex what we need to get the maps to work.

                    • 22. Re: MC + JAXB (JBossXB Builder)
                      alesj

                       

                      "adrian@jboss.org" wrote:

                      Also we need to find out from Alex what we need to get the maps to work.

                      "alex@jboss.org" wrote:

                      There is an issue with the Xerces version used currently. See the jboss-dev list. There no other issue. Once this is clarified I can release.

                      > Ales Justin wrote:
                      >> Hey,
                      >>
                      >> what's the plan/status of JBossXB.CR6 then?
                      >> Can you do the release and I'll fix the MC usage to fit the changes.
                      >> So that we can close that JAXB+MC task.


                      • 23. Re: MC + JAXB (JBossXB Builder)
                        alesj

                        This is now commited, and all the jaxb tests pass.

                        • 24. Re: MC + JAXB (JBossXB Builder)

                          You obviously missed my point about the generated SchemaBInding not matching the xsd. I've fixed all this.

                          I've also made it so there are top level schemas for javabean 1.0, 2.0 and the MC 1.0 and 2.0
                          the 2.0 and 1.0 respectively were completely missing. For the javabean 1.0 i've disabled
                          the constructor element as per schema. It would be too much effort to
                          retrofit the MC classes such that we can generate a proper 1.0 schema that matches the xsd
                          (although I did do it for the top level deploymen element).
                          For 3.0 we need to properly control how these metadata classes evolve.

                          Anyway, I re-opened the issue.
                          This work isn't complete until we use it (rather than just testing :-).

                          Work still to do:
                          0) Do the same thing to the PolicyMetaData/parsing
                          1) Get a jbossxb release that includes these schemas in the factory settings
                          (see the singleton schema resolver bootstrap code)
                          2) Remove the old SchemaBindingInitializer
                          3) Co-ordinate with Kabir for the aop parsing and update the Spring parsing.

                          • 25. Re: MC + JAXB (JBossXB Builder)

                            I also moved the GenericBeanFactoryMetaData2 into the spi and
                            called it GenericBeanFactoryMetaData.
                            Kabir wants to reuse it for AOP.

                            We need to double check with Kabir that he isn't forced to ues the classes
                            from metadata.plugins directly. This may require adding new features to
                            the BeanMetaDataBuilder.

                            • 26. Re: MC + JAXB (JBossXB Builder)
                              alesj

                               

                              "adrian@jboss.org" wrote:

                              We need to double check with Kabir that he isn't forced to ues the classes
                              from metadata.plugins directly. This may require adding new features to
                              the BeanMetaDataBuilder.

                              He already did add some new stuff.
                              And I forced him to write the tests for it. :-)

                              • 27. Re: MC + JAXB (JBossXB Builder)

                                I also spoke to Alex about getting two new features related to schema config.

                                1) Lazy initialization of schema bindings.

                                Currently when you configure a class in the bootstrap, it has to exist
                                at startup to be included. e.g. the aop and spring schemas aren't included in JBossAS
                                because they aren't in the bootstrap classes.
                                So you have to configure them manually.

                                It would be better if this was done "on-demand".

                                2) Allow specification of config in the top level element (similar to the way
                                schema locations are handled) which doesn't require the "2 phase"
                                configuration that is currently done.

                                <deployment xmlns:jbxb="urn:jbossxb:2.0" jbxb:schemabinding="urn:jbossjms:5.0 org.jboss.jms.Whatever"/>
                                


                                It would be good if Alex can include these, so they are available for our RC1 release
                                and JBoss5

                                • 28. Re: MC + JAXB (JBossXB Builder)
                                  alesj

                                   

                                  "adrian@jboss.org" wrote:

                                  3) ... update the Spring parsing.

                                  Do we really want to also re-write Spring schema into JBossXB Builder annotated metadata, hence removing the .xsd file?

                                  I don't really want to modify/remove anything that exists in Spring.
                                  But on the other hand, we're already doing that by shipping slightly modified schema file (due to that fix with infinity * infinity).

                                  Doing that also defeats the purpose of having single metadata to handle both schemas, MC and Spring's.
                                  Since the functionality is almost the same, it's the attribute and element names that differ.


                                  • 29. Re: MC + JAXB (JBossXB Builder)

                                     

                                    "alesj" wrote:
                                    "adrian@jboss.org" wrote:

                                    3) ... update the Spring parsing.

                                    Do we really want to also re-write Spring schema into JBossXB Builder annotated metadata, hence removing the .xsd file?


                                    It's not removed. Its just used for validation during parsing.
                                    In princple we could also map the same classes to the spring namespace
                                    or the unqualified namespace (and use the Spring schema)
                                    if that is what Spring actually uses.


                                    I don't really want to modify/remove anything that exists in Spring.
                                    But on the other hand, we're already doing that by shipping slightly modified schema file (due to that fix with infinity * infinity).

                                    Doing that also defeats the purpose of having single metadata to handle both schemas, MC and Spring's.
                                    Since the functionality is almost the same, it's the attribute and element names that differ.


                                    I'm not going to maintain two sets of xml parsing going forwards.

                                    If you want to copy the schema initialzier into the Spring project
                                    and try to keep it in step that's fine. But don't come crying to me
                                    when it breaks. ;-)

                                    You should at least change it to use the BeanMetaDataBuilder. ;-)