Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-789

Bean Endpoint does not properly handle CGLIB enhanced beans (Crosscutting issue)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • servicemix-bean-2008.01, servicemix-bean-2009.01, servicemix-bean-2009.02, servicemix-bean-2010.01
    • 2013.02
    • servicemix-bean
    • None

    Description

      If I pass to the bean endpoint a bean that is enhanced by cglib (e.g. a bean annotated with spring's @Transactional annotation), then the Delivery Channel is not properly injected to the bean.

      After digging a lot I realized that the root of the problem is in the combination of CGLIB & Reflection, which can cause tons of issues and apparently that have not been taken into consideration on the bean endpoint.

      This issue probably affects other service mix components too (I've also encountered similar behavior in camel). I think that either a global solution needs to be applied or a section needs to be added in the documentation.

      I am attaching a patch that contains a unit test that reproduces this issue.

      Attachments

        1. cglib-bean-issue.txt
          8 kB
          Ioannis Canellos

        Activity

          People

            Unassigned Unassigned
            iocanel Ioannis Canellos
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: