4 Replies Latest reply on May 27, 2011 4:47 AM by Magesh Bojan

    transforms.xml in AS7

    Daniel Bevenius Master

      I'm adding a transformer to the Camel component and noticed an issue when deploying to AS7. I'm currently building using the AS7 trunk which is the version beta4.

      I've added a transforms.xml to the Camel component module. The problem is that upon deployment, when the TransformerRegistry tries to load the out of the box transformers the transforms.xml in the camel module will not be found since the transform module does not know about it and neither does the current deployment (my camel app).

      To get this to work I needed to specify a dependency in the transform module upon 'org.switchyard.component.camel' like this: 

       

       

      <module xmlns="urn:jboss:module:1.0" name="org.switchyard.transform">
      
          <resources>
              <resource-root path="switchyard-transform-0.1.0-SNAPSHOT.jar"/>
          </resources>
      
          <dependencies>
              <module name="javax.api"/>
              <module name="org.apache.log4j"/>
              <module name="org.switchyard.api"/>
              <module name="org.switchyard.common"/>
              <module name="org.switchyard.config"/>
              <module name="org.milyn"/>
      
              <module name="org.switchyard.component.camel">
                  <imports>
                      <include-set>
                          <path name="META-INF/switchyard"/>
                      </include-set>
                  </imports>
              </module>
      
          </dependencies>
      </module>
      
      

       

      This is not really a problem do to manually but is still an extra burden on the users.

      Any suggestions to other options here?

       

      Regards,

       

      /Daniel

        • 1. Re: transforms.xml in AS7
          Keith Babo Master

          I'm not super hot on adding a hard dependency on camel component in the transform module.  If it was an optional dependency, then it wouldn't be quite so bad, but still not as modular as we could be.  The transform module is defined as part of the switchyard subsystem, right?  IINM, the other components are also included there as well.  I wonder if we could do something fancy where the transform component imports META-INF/switchyard from a subsystem of modules.

          • 2. Re: transforms.xml in AS7
            Daniel Bevenius Master

            If it was an optional dependency, then it wouldn't be quite so bad, but still not as modular as we could be.

             

            I've actually changed this to be an optional dependency.  So this now looks like this:

             

            <module name="org.switchyard.component.camel" optional="true">
                        <imports>
                            <include-set>
                                <path name="META-INF/switchyard"/>
                            </include-set>
                       </imports>
            </module>
            
            
            

             

             

            The transform module is defined as part of the switchyard subsystem, right?

            Yeah, it's a module like the camel component and other components.

             

             

            I wonder if we could do something fancy where the transform component imports META-INF/switchyard from a subsystem of modules.

            Sounds interesting and it would be nice if there was no need to configure this manually.

            • 3. Re: transforms.xml in AS7
              Magesh Bojan Master

              I wonder if we could do something fancy where the transform component imports META-INF/switchyard from a subsystem of modules.

              I think this should be possible in the component itself. Let me check.