Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B55FBDA92 for ; Sat, 27 Oct 2012 17:07:14 +0000 (UTC) Received: (qmail 68845 invoked by uid 500); 27 Oct 2012 17:07:14 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 68799 invoked by uid 500); 27 Oct 2012 17:07:13 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 68785 invoked by uid 99); 27 Oct 2012 17:07:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Oct 2012 17:07:12 +0000 Date: Sat, 27 Oct 2012 17:07:12 +0000 (UTC) From: "Raul Kripalani (JIRA)" To: issues@camel.apache.org Message-ID: <2054382730.35379.1351357632829.JavaMail.jiratomcat@arcas> In-Reply-To: <1363449652.5638.1350749052329.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CAMEL-5722) Classloader mixup when consumers across bundles share the same camel-jetty port MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-5722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485473#comment-13485473 ] Raul Kripalani commented on CAMEL-5722: --------------------------------------- I think this can also be a problem in the Direct VM component, if a new Exchange is not created at the consumer side... I'll check. > Classloader mixup when consumers across bundles share the same camel-jetty port > ------------------------------------------------------------------------------- > > Key: CAMEL-5722 > URL: https://issues.apache.org/jira/browse/CAMEL-5722 > Project: Camel > Issue Type: Bug > Components: camel-jetty > Affects Versions: 2.8.0 > Environment: OSGi environment, Karaf 2.2.2. > Reporter: Raul Kripalani > Assignee: Raul Kripalani > Priority: Critical > > Happens in an OSGi environment; but it is also applicable in modular servers that build dynamic classloaders (e.g. JBoss AS) per deployed artifacts (WAR, module, EAR, etc.). > If bundles A and B are both creating camel-jetty consumers on the same TCP port, the consumers will share the underlying Jetty connector. Moreover, the Jetty connector is indeed created by the first consumer that initialises on that TCP port. > Since the Camel route executes on the Jetty Connector thread, all class resolutions will happen against the classloader of the bundle that initialises first. > This makes class resolution absolutely undeterministic and erratic. Quite a nasty bug IMHO. > Perhaps this can be fixed by adding a call to {{Thread.setContextClassLoader()}} passing the classloader of the JettyHttpEndpoint, as soon as a request comes in? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira