[jira] Created: (CAMEL-1910) CamelHttpTransportServlet need to support init the camel context itself

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-1910) CamelHttpTransportServlet need to support init the camel context itself

JIRA jira@apache.org
CamelHttpTransportServlet need to support init the camel context itself
-----------------------------------------------------------------------

                 Key: CAMEL-1910
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1910
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-servlet
    Affects Versions: 2.0-M3
            Reporter: Willem Jiang
            Assignee: Willem Jiang
             Fix For: 2.0.0


Since current servlet component need to deploy the servlet first then it can create the servlet endpoint for using.
Here is the mail thread which discusses about the servlet component creation issue.
http://www.nabble.com/How-to-create-a-Servlet-component--td24909157.html

So CamelHttpTransportServlet need to support init the camel context itself after the servlet is initialized.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1910) CamelHttpTransportServlet need to support init the camel context itself

JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-1910:
------------------------------------

Hmm can this be avoid and init lazy as Spring should really be in control when CamelContext is initialized.

I kinda want Spring to be 100% in control when and how CamelContext is initialized. Had a bad experience with Mule where you had to use a special context listener in web.xml to init mule. That caused all sorts of trouble for us.

> CamelHttpTransportServlet need to support init the camel context itself
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-1910
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1910
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-servlet
>    Affects Versions: 2.0-M3
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>
> Since current servlet component need to deploy the servlet first then it can create the servlet endpoint for using.
> Here is the mail thread which discusses about the servlet component creation issue.
> http://www.nabble.com/How-to-create-a-Servlet-component--td24909157.html
> So CamelHttpTransportServlet need to support init the camel context itself after the servlet is initialized.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1910) CamelHttpTransportServlet need to support init the camel context itself

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-1910:
------------------------------------

Willem can you try to avid loading and starting spring yourself

Try to lazy init what you need.

See more here:
http://andykayley.blogspot.com/2007/11/how-to-inject-spring-beans-into.html

Where there is a spring helper method to get access to SpringApplicationContext from the servlet request.

Then Camel does *not* impose any problems like Mule did.

> CamelHttpTransportServlet need to support init the camel context itself
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-1910
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1910
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-servlet
>    Affects Versions: 2.0-M3
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>
> Since current servlet component need to deploy the servlet first then it can create the servlet endpoint for using.
> Here is the mail thread which discusses about the servlet component creation issue.
> http://www.nabble.com/How-to-create-a-Servlet-component--td24909157.html
> So CamelHttpTransportServlet need to support init the camel context itself after the servlet is initialized.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1910) CamelHttpTransportServlet need to support init the camel context itself

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-1910:
------------------------------------

And a servlet have a init() callback that should be used for such code anyway

> CamelHttpTransportServlet need to support init the camel context itself
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-1910
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1910
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-servlet
>    Affects Versions: 2.0-M3
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>
> Since current servlet component need to deploy the servlet first then it can create the servlet endpoint for using.
> Here is the mail thread which discusses about the servlet component creation issue.
> http://www.nabble.com/How-to-create-a-Servlet-component--td24909157.html
> So CamelHttpTransportServlet need to support init the camel context itself after the servlet is initialized.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1910) CamelHttpTransportServlet need to support init the camel context itself

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Willem Jiang commented on CAMEL-1910:
-------------------------------------

@Claus,

Current CamelServletComponent need to be injected the servlet and then bind the consumers to to servlet.
If we inject the consumers into the servlet, the CamelServletComponent can't see servlet anymore, that will cause some trouble when we want to start or stop the servlet consumer. Since CamelServletComponent doesn't know if the servlet is initialized or not.




> CamelHttpTransportServlet need to support init the camel context itself
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-1910
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1910
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-servlet
>    Affects Versions: 2.0-M3
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>
> Since current servlet component need to deploy the servlet first then it can create the servlet endpoint for using.
> Here is the mail thread which discusses about the servlet component creation issue.
> http://www.nabble.com/How-to-create-a-Servlet-component--td24909157.html
> So CamelHttpTransportServlet need to support init the camel context itself after the servlet is initialized.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-1910) CamelHttpTransportServlet need to support init the camel context itself

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-1910.
---------------------------------

    Resolution: Fixed

trunk
http://svn.apache.org/viewvc?rev=803805&view=rev

BTW, we can revisit this issue after Camel 2.0 released.

> CamelHttpTransportServlet need to support init the camel context itself
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-1910
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1910
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-servlet
>    Affects Versions: 2.0-M3
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>
> Since current servlet component need to deploy the servlet first then it can create the servlet endpoint for using.
> Here is the mail thread which discusses about the servlet component creation issue.
> http://www.nabble.com/How-to-create-a-Servlet-component--td24909157.html
> So CamelHttpTransportServlet need to support init the camel context itself after the servlet is initialized.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.