2 Replies Latest reply on Dec 18, 2009 3:23 AM by Anonymous User

    Migrationproblems JBossESB 4.4 --> JBossESB 4.7

    Anonymous User Newbie

      Hello experts,

      I am just migrating our services from JBossESB 4.4 to JBossESB 4.7. Unfortunately some services don't work any more with JBossESB 4.7. So I had to migrate some code. Now I am stuck at migrating Smooks resources. The following code seems to be magic as it runs under JBossESB 4.4 but not under JBossESB 4.7:

      <resource-config selector="ORDER_HEAD">
       <resource>org.milyn.javabean.BeanPopulator</resource>
       <param name="beanId">OrderHead</param>
       <param name="beanClass">model.OrderHead</param>
       <param name="bindings">
       <binding property="orderNo" type="String" selector="EIH_NO" />
       <binding property="orderAmount" type="String" selector="EIH_ESPL_ID/@value" />
       <binding property="orderDate" type="ShortDate" selector="EIH_DAT" />
       <binding setterMethod="addPositionToList" selector="${OrderPos}" />
       </param>
       </resource-config>
      
      ...
      
       <resource-config selector="ORDER_POS">
       <resource>org.milyn.javabean.BeanPopulator</resource>
       <param name="beanId">OrderPos</param>
       <param name="beanClass">model.OrderPos</param>
       <param name="bindings">
       <binding property="orderCode" type="String" selector="ORDER_CODE"/>
       <binding property="orderHead" selector="${OrderHead}" />
       </resource-config>
      


      Under JBoss ESB 4.4 Smooks produces correct JavaResult bean entries. I am using the "reportPath" property to generate HTML reports. If I run the service under JBossESB 4.7, the setter method doesn't add any OrderPos to the OrderPos - Arraylist of OrderHead anymore. The strange thing is that OrderPos beans are correctly created, but not added.

      Any idea or similar problem during Migration from JBossESB 4.4 to JBossESB 4-7?

      Best regards,

      Dennis

        • 1. Re: Migrationproblems JBossESB 4.4 --> JBossESB 4.7
          Daniel Bevenius Master

          Hi Dennis,

           

          I can't see what is wrong just by looking at the config you posted but if you can modify one of our quickstart to reproduce this issue then I'd be happy to take a look.

           

          Another option might also be to update you Smooks configuration. There is a new feature for the configuration that uses schemas for the different configuration elements in Smooks.

          If you take a look at the transformation quickstarts, for example transform_XML2POJO, they have been updated with this new config. Take a look as I think it makes the configs more readable.

           

          Regards,

           

          /Daniel

          • 2. Re: Migrationproblems JBossESB 4.4 --> JBossESB 4.7
            Anonymous User Newbie

            Hello Daniel,

             

            thanks for your fast reply. I migrated my Smooks Resources to smooks-1.1.xsd resp. javabean-1.2.xsd. My mappings are working now. I additionally asserted the bean to be wired an extended life cyle.

             


            <jb:bean beanId="
            OrderHead" class = "model.OrderHead" createOnElement="ORDER_HEAD">
            ...
            <jb:wiring beanIdRef=
            "OrderPos" setterMethod="addPositionToList" />
            </
            jb:bean>

            ...

            <jb:bean beanId="OrderPos" class = "model.OrderPos" createOnElement="ORDER_POS" extendLifecycle="true">
            ...

            </
            jb:bean>

             

            Best regards,

             

            Dennis