Uploaded image for project: 'FUSE ESB'
  1. FUSE ESB
  2. ESB-801

servicemix-camel classloader problem

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.4.0.3-fuse
    • Fix Version/s: 3.4.0.4-fuse
    • Component/s: servicemix-camel
    • Labels:
      None
    • Environment:

      FUSE-ESB-3.4.0.3

      Description

      When a camel RouteBuilder recieves a message exchange, the initial classloader is the SU classloader as expected. After sending an exchange to another jbi:endpoint, the context classloader is now set to the Camel Component and the jars in the SU lib are no longer available.

      For example:

      public class MyRouteBuilder extends RouteBuilder {
       
      public class PrintClassLoader implements Processor {
      public void process(Exchange exchange) throws Exception {
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      System.out.println("ClassLoader: " + cl);
      }
      }
       
      public void configure() {
       
      // receives a message to a JBI endpoint...
      from("jbi:endpoint:urn:foo:bar:MyService:MyEndpoint")
      .process(new PrintClassLoader()) // this will be the SU classloader "camel-context"
       
      .to(jbi:endpoint:urn:foo:bar:MyService:MyOtherEndpoint")
      .process(new PrintClassLoader()) // this will be the Component classloader
      }
      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                willem.jiang Willem Jiang
                Reporter:
                pedroneveu Pedro Neveu
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: