Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 40762 invoked from network); 22 Feb 2011 09:04:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Feb 2011 09:04:03 -0000 Received: (qmail 19652 invoked by uid 500); 22 Feb 2011 09:04:03 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 19249 invoked by uid 500); 22 Feb 2011 09:04:00 -0000 Mailing-List: contact dev-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 dev@camel.apache.org Received: (qmail 19240 invoked by uid 99); 22 Feb 2011 09:03:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Feb 2011 09:03:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Feb 2011 09:03:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6C63A1B1AEB for ; Tue, 22 Feb 2011 09:03:38 +0000 (UTC) Date: Tue, 22 Feb 2011 09:03:38 +0000 (UTC) From: "Christian Schneider (JIRA)" To: dev@camel.apache.org Message-ID: <139903814.7820.1298365418428.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (CAMEL-3549) It should be possible to configure the CamelHttpTransportServlet using the spring ContextLoaderListener 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-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997701#comment-12997701 ] Christian Schneider commented on CAMEL-3549: -------------------------------------------- Hi Charles, for OSGi we have a nice solution already. The servlet can be registered using the OsgiServletRegisterer. As this happens in the spring context there is no need to wait. Additionally the servlet can be registered in OSGi using the interface CamelServletService so it can be refrerenced from other bundles which will then wait for it to go active like with any other OSGi service. I think we could make this even better using the whiteboard pattern. So every servlet endpoint could register itself as an OSGi service as well as every camel servlet. Then we could have an extender that listens for both and registers the endpoints with the correct servlets. This would nicely decouple endpoints from servlets. As we have a service registry in camel we could perhaps even do this style outside of OSGi. Christian > It should be possible to configure the CamelHttpTransportServlet using the spring ContextLoaderListener > ------------------------------------------------------------------------------------------------------- > > Key: CAMEL-3549 > URL: https://issues.apache.org/jira/browse/CAMEL-3549 > Project: Camel > Issue Type: Improvement > Components: camel-servlet > Affects Versions: 2.5.0 > Reporter: Christian Schneider > Assignee: Christian Schneider > Fix For: 2.7.0 > > > The spring security example uses two different spring contexts. > The first is pulled up using the spring ContextLoaderListener. It is used to hook spring security into a filter. > The second is pulled up by the CamelHttpTransportServlet. There is the main configuration includeing the camel context. > I think this is quite ugly and makes things more complicated than they need to be. Especially if you also need the camel context outside the camel servlet. > So I propose to change the code of the Camel Servlet component to simply use the spring context from the ContextLoaderListener. I can try to do the change myself but would be happy for any comments why this was designed so and where I have to be careful. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira