3 Replies Latest reply on Nov 24, 2009 8:07 AM by Stuart Douglas

    XML Exensions

    Stuart Douglas Master

      I have created a portable extension to allow configuration of beans via XML. The first pre-alpha release can be downloaded from https://launchpad.net/jbraze. This is still very early days, but any feedback would be appreciated.


      The readme contains instructions, and the tests contain example XML code. The file syntax looks like:


         <test:OtherQualifier>
              <Qualifier/>
          </test:OtherQualifier>
           
          <test:QualifiedBean1>
              <test:OtherQualifier value1="AA" value2="1">A</test:OtherQualifier>
          </test:QualifiedBean1>
          
          <test:QualifiedBean2>
              <test:OtherQualifier value1="BB" value2="2" value="B" />
          </test:QualifiedBean2>
          
          <test:QualifierTestBean>
              <test:bean1>
                  <test:OtherQualifier value1="AA" value2="1" value="A" />
                  <Inject/>
              </test:bean1>
              <test:bean2>
                  <test:OtherQualifier value1="BB" value2="2">B</test:OtherQualifier>
                  <Inject/>
              </test:bean2>
          </test:QualifierTestBean>
      
          <test:InterceptorBinding1>
              <InterceptorBinding/>
           </test:InterceptorBinding1>
         
          <test:InterceptorBean1>
              <Interceptor/>
              <test:InterceptorBinding1/>
              <test:myMethod>
                  <!-- AroundInvoke does not actually work due to what appears to be a weld bug, the annotation must be physically present -->
                  <AroundInvoke/>
              </test:myMethod>
          </test:InterceptorBean1>
      
          <test:InterceptedBean>
              <test:method>
                  <test:InterceptorBinding1/>
              </test:method>
          </test:InterceptedBean>