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

Claus Ibsen commented on CAMEL-3549:
------------------------------------

Thanks for committing your work.

I spotted these

[03/04/2011 -:- 05:30:52 PM] <cibsen> cschneide nice patch - we usually use 
DefaultXXX for the default impl of our interfaces instead of xxxImpl
[03/04/2011 -:- 05:31:19 PM] <cibsen> i wonder if a serial version uid is 
needed on a servlet? can you really serialize it and send it accross the wire?
[03/04/2011 -:- 05:31:52 PM] <cibsen> and prefer to use final modifier for 
memebers if possible
[03/04/2011 -:- 05:32:02 PM] <cibsen> eg the consumers map on the servlet
[03/04/2011 -:- 05:32:15 PM] <cibsen> eg the compiler helps catch if something 
by mistake reassign it
[03/04/2011 -:- 05:34:01 PM] <cibsen> i wonder if setServletName should be 
removed
[03/04/2011 -:- 05:34:06 PM] <cibsen> the name is set during the ctr
[03/04/2011 -:- 05:34:24 PM] <cibsen> and you send it 2x times CamelServlet and 
the CamelHttpTransport again
[03/04/2011 -:- 05:34:56 PM] <cibsen> and in this code
[03/04/2011 -:- 05:34:56 PM] <cibsen> throw new RuntimeException("Invalid 
consumer type. Must be ServletEndpoint");
[03/04/2011 -:- 05:35:13 PM] <cibsen> maybe add the consumer type so you know 
what type it was when it failed
[03/04/2011 -:- 05:36:28 PM] <cibsen> the log debug style is wrong
[03/04/2011 -:- 05:36:29 PM] <cibsen>     LOG.debug("Registering consumer for 
path" + consumer.getPath() + " providers present: " + providers.size());
[03/04/2011 -:- 05:36:35 PM] <cibsen> you should not concat strings
[03/04/2011 -:- 05:36:44 PM] <cibsen> either use isDebugEnabled as guard
[03/04/2011 -:- 05:36:52 PM] <cibsen> or use the {} placeholders that slf4j 
offers
[03/04/2011 -:- 05:36:59 PM] <cibsen> although you can only use at most 2 
placeholders

> 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
>
>         Attachments: camel-servlet-3549.patch
>
>
> 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

        

Reply via email to