1 2 Previous Next 23 Replies Latest reply on Dec 13, 2005 3:04 PM by starksm64 Go to original post
      • 15. Re: Annotations and holders
        aloubyansky

         

        "adrian@jboss.org" wrote:
        maybe fork a prototype (in the testsuite) in the process so I don't break JBossWS? :-)


        That means you are going to work in parallel on some issues that are not in my plan and then merge back? How are you going to manage/maintain this? Implementation details are not very stable currently and, actually, are going to change. So far, I don't like the idea and would prefer to discuss and create issues.

        • 16. Re: Annotations and holders
          aloubyansky

           

          "adrian@jboss.org" wrote:
          I was thinking of something like this?
           <xsd:complexType name="datasourceType">
           <xsd:appinfo>
           <!-- new DataSourceConfig() -->
           <jbxb:class impl="org.jboss.xxx.DataSourceConfig">
           <!-- DataSourceConfig.setPoolConfig(new PoolConfig()) -->
           <jbxb:holder name="pool" property="poolConfig" impl="org.jboss.xxx.PoolConfg"/>
           </jbxb:class>
           </xsd:appinfo>
           </xsd:annotation>
           <xsd:choice>
           <xsd:element name="maxsize">
           <xsd:annotation>
           <xsd:appinfo>
           <!-- poolConfig.setMaxSize(...) -->
           <jbxb:property holder="pool" name="maxSize"/>
           </xsd:appinfo>
           </xsd:annotation>
           </xsd:element>
           </xsd:choice>
           </xsd:complexType>
          


          Which could also be written like this?
           <xsd:element name="maxsize">
           <xsd:annotation>
           <xsd:appinfo>
           <!-- poolConfig.setMaxSize(...) -->
           <jbxb:property path="poolConfig.maxSize"/>
           </xsd:appinfo>
           </xsd:annotation>
           </xsd:element>
          


          I agree, maxsize could be set differently (in other words, the path could be different) based on the current object on the stack. That's what I was talking about a few posts ago about setting value on the parent in the parent's specific way.

          • 17. Re: Annotations and holders
            aloubyansky

            In that case, jbxb:property could also have a 'class' attribute and be applied only if the type of the current object on the stack is assignable from the one specified in the 'class' attribute.

            • 18. Re: Annotations and holders
              aloubyansky

               

              "adrian@jboss.org" wrote:
              It should be getting a StringValueMetaData. But it actually gets a can't load class "org.jboss.test.xml.pojoserver.metadata.ValueType"
              It shouldn't really try to instantiate something here because the type is going to
              come from the contained valueGroup (polymorphically).


              Check this out. It seems like the way to go.
              http://www.w3.org/TR/xmlschema-0/#abstract

              • 19. Re: Annotations and holders

                 

                "alex.loubyansky@jboss.com" wrote:
                Also some schema issues. You define entry type


                Yes. That is a mistake.

                • 20. Re: Annotations and holders

                   

                  "alex.loubyansky@jboss.com" wrote:
                  "adrian@jboss.org" wrote:
                  maybe fork a prototype (in the testsuite) in the process so I don't break JBossWS? :-)


                  That means you are going to work in parallel on some issues that are not in my plan and then merge back? How are you going to manage/maintain this? Implementation details are not very stable currently and, actually, are going to change. So far, I don't like the idea and would prefer to discuss and create issues.


                  Thats ok. I don't expect you to support it. I'm just playing with ideas.
                  See my other thread where I created a schema parser that can be more easily extended.
                  It also has the sideaffect that it doesn't depend on Xerces.

                  • 21. Re: Annotations and holders

                     

                    "alex.loubyansky@jboss.com" wrote:
                    In that case, jbxb:property could also have a 'class' attribute and be applied only if the type of the current object on the stack is assignable from the one specified in the 'class' attribute.


                    I think you missed the point here. The target object isn't necessarily on the stack.
                    Or it might be on the stack but further back.

                    The structure of the xml and classes are not in 1-1 correspondance.


                    • 22. Re: Annotations and holders

                       

                      "alex.loubyansky@jboss.com" wrote:
                      "adrian@jboss.org" wrote:
                      It should be getting a StringValueMetaData. But it actually gets a can't load class "org.jboss.test.xml.pojoserver.metadata.ValueType"
                      It shouldn't really try to instantiate something here because the type is going to
                      come from the contained valueGroup (polymorphically).


                      Check this out. It seems like the way to go.
                      http://www.w3.org/TR/xmlschema-0/#abstract


                      Agreed, we should use the XSD type system rather than using a predefined group.
                      This allows others to extend the schema and introduce their own subtype.

                      • 23. Re: Annotations and holders
                        starksm64
                        1 2 Previous Next