You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2011/03/02 10:45:37 UTC

[jira] Issue Comment Edited: (CAMEL-3549) It should be possible to configure the CamelHttpTransportServlet using the spring ContextLoaderListener

    [ https://issues.apache.org/jira/browse/CAMEL-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001352#comment-13001352 ] 

Claus Ibsen edited comment on CAMEL-3549 at 3/2/11 9:45 AM:
------------------------------------------------------------

Christian I got most of the stuff going now. Now the ordering of whether the CamelServlet or the Spring listener starts first doesn't matter.

Also there was a gremlin in the unit tests, which forced the servlet to start first. So I had to remove that as well. I need to polish the code a bit, and make some code comments.

I have seen there is a OsgiServletRegisterer which I assume is for registering the servlet in OSGi Service Registry. Unfortunately it depends on Spring. I think we should do this the propert OSGi way. Then it should work for spring-dm, blueprint, or whatever you use. PS: In fact I think this is not really a service Camel should offer but the OSGi container itself. So you should be able to configure Apache Karaf to enlist Servlet, and maybe JMX/REST management as well. Then that's generic and not Camel specific.

What's your use case for this?

      was (Author: davsclaus):
    Christian I got most of the stuff going now. Not the ordering of whether the CamelServlet or the Spring listener starts first doesn't matter.

Also there was a gremlin in the unit tests, which forced the servlet to start first. So I had to remove that as well. I need to polish the code a bit, and make some code comments.

I have seen there is a OsgiServletRegisterer which I assume is for registering the servlet in OSGi Service Registry. Unfortunately it depends on Spring. I think we should do this the propert OSGi way. Then it should work for spring-dm, blueprint, or whatever you use. PS: In fact I think this is not really a service Camel should offer but the OSGi container itself. So you should be able to configure Apache Karaf to enlist Servlet, and maybe JMX/REST management as well. Then that's generic and not Camel specific.

What's your use case for this?
  
> 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: Claus Ibsen
>             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