camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAMEL-3490) camel-servlet should register on the OSGi HTTP service if deployed in OSGi
Date Mon, 10 Jan 2011 13:47:46 GMT

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

Willem Jiang edited comment on CAMEL-3490 at 1/10/11 8:47 AM:
--------------------------------------------------------------

camel-sevlet can't know the aliens, servlet name and http context before it registers the
servlet into the OSGi http service.
It should be done in the customer bundle like the Web.xml does.

In CAMEL-3485 you can bind the CamelServlet with the Camel-Servlet component easily, if the
customer bundle activator export the Servlet as a CamelServletService like this.
{code}
<osgi:reference id="camelHttpTransportServlet"    interface="org.apache.camel.component.servlet.CamelServletService"/>
        
   <bean id="servlet" class="org.apache.camel.component.servlet.ServletComponent">
      <property name = "camelServletService" ref="camelHttpTransportServlet" />
   </bean>

   <bean id="servletProcessor" class="org.apache.camel.itest.osgi.servlet.ServletProcessor"
/>
  
   <camelContext xmlns="http://camel.apache.org/schema/spring">
     <camel:route>
       <camel:from uri="servlet:///hello"/>
       <camel:process ref="servletProcessor"/>
     </camel:route>
   </camelContext>
{code}


      was (Author: njiang):
    camel-sevlet can't know the aliens, servlet name and http context before it registers
the servlet into the OSGi http service.
It should be done in the customer bundle like the Web.xml does.

In CAMEL-3485 you can bind the CamelServlet with the Camel-Servlet component easily, if the
customer bundle activator export the Servlet as a CamelServletService like this.
<code>
<osgi:reference id="camelHttpTransportServlet"    interface="org.apache.camel.component.servlet.CamelServletService"/>
        
   <bean id="servlet" class="org.apache.camel.component.servlet.ServletComponent">
      <property name = "camelServletService" ref="camelHttpTransportServlet" />
   </bean>

   <bean id="servletProcessor" class="org.apache.camel.itest.osgi.servlet.ServletProcessor"
/>
  
   <camelContext xmlns="http://camel.apache.org/schema/spring">
     <camel:route>
       <camel:from uri="servlet:///hello"/>
       <camel:process ref="servletProcessor"/>
     </camel:route>
   </camelContext>
<code>

  
> camel-servlet should register on the OSGi HTTP service if deployed in OSGi
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-3490
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3490
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-servlet, osgi
>    Affects Versions: 2.5.0
>            Reporter: Guillaume Nodet
>            Assignee: Willem Jiang
>             Fix For: 2.7.0
>
>


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


Mime
View raw message