3 Replies Latest reply on May 9, 2005 5:51 PM by adrian.brock

    AOP XML Configuration

    bill.burke

      How would I support XML fragments with the BeanXMLDeployer? It looks like the deployer requires a complete document. I want to do something like this:

      
      <aspect class="org.jboss.aspects.TransactionDemarcation">
       <constructor factoryMethod="createSimpleBean">
       <factory value="SimpleBeanFactory"/>
       <parameter type="org.jboss.test.kernel.xml.support.SimpleBean">
       <inject bean="SimpleBean2"/>
       </parameter>
       </constructor>
       <property name="stuff">1</property>
      </aspect>
      


      From this a GenericBeanFactory would be created with the above metadata. It doesn't look like BeanXMLDeployer/JBossXB could support this as it looks like it requires a full document.

      It looks like I'll need to have a JBossXB deployer for AOP and extend it. This would probably require refactoring BeanSchemaBinding so that I can reuse it within an AOP SchemaBinding. (Making it a concrete class with factory methods I can override and such).

      Ok, I think I know what to do...Let me know if you have any better ideas.

      Thanks





        • 1. Re: AOP XML Configuration

          http://jira.jboss.com/jira/browse/JBXB-11

          Link provided by the JBoss search engine, AKA Adrian Brock.

          • 2. Re: AOP XML Configuration
            bill.burke

            I could tell just by looking at the XB code that it didn't support fragments, hence my "looks like XB requires a full document" comment...

            I'll just make a full XSD and JBossXB deployer for AOP with hooks for MC integration (and reuse the BeanXMLDeployer after some refactoring of it). I can't wait for this stuff anymore unless it can be done in a day or so.

            • 3. Re: AOP XML Configuration

              Don't refactor BeanXMLDeployer. I'm currently working on it.
              It is a long way from being finished, I'm still trying to rework the code
              to more accuratley match what we are trying to achieve.

              In any (sic!) case. Refactoring is not the way it should be done. See the discussions
              in the JBossXB forum about the introduction of different schema mappings.