camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] Commented: (CAMEL-3549) It should be possible to configure the CamelHttpTransportServlet using the spring ContextLoaderListener
Date Tue, 22 Feb 2011 09:03:38 GMT


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.


> It should be possible to configure the CamelHttpTransportServlet using the spring ContextLoaderListener
> -------------------------------------------------------------------------------------------------------
>                 Key: CAMEL-3549
>                 URL:
>             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:


View raw message