You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by alexey-s <al...@mail.ru> on 2015/11/18 16:05:16 UTC

OSGi CamelHttpTransportServlet error

I use two different OSGi component.
Each writing

I see an error

It turns out that the two OSGi components must not only be different version
of the component, but also the name of the servlet.
This is clearly a mistake.


The second error

I give unique names to each servlet.

I see an error





--
View this message in context: http://camel.465427.n5.nabble.com/OSGi-CamelHttpTransportServlet-error-tp5774062.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: OSGi CamelHttpTransportServlet error

Posted by alexey-s <al...@mail.ru>.
Clause, did not help the registration system component "servlet 2".
The system still will take a component called "servlet".

I think it is necessary to replace

In this case bothers me a little higher in the condition statement "if".

I found a solution:

Call method endpointProperty.

You're correct registration of servlets names in different OSGi bundle.



--
View this message in context: http://camel.465427.n5.nabble.com/OSGi-CamelHttpTransportServlet-error-tp5774062p5774101.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: OSGi CamelHttpTransportServlet error

Posted by alexey-s <al...@mail.ru>.
Thank you, Claus Ibsen-2.
I will try to register the component Servlet Component with the new name
"servlet2".
The fact that I use only one servlet in one CamelRoute.

I think it will be interesting. Make several restConfiguration for different
servlet.
The idea is that you can make a few RouteBuilder within one CamelContext.
Each is only one restConfiguration.
For proper operation, we need to specify servletName.



--
View this message in context: http://camel.465427.n5.nabble.com/OSGi-CamelHttpTransportServlet-error-tp5774062p5774098.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: OSGi CamelHttpTransportServlet error

Posted by Claus Ibsen <cl...@gmail.com>.
Configure it on the camel servlet component, and give it a new name
like servlet2 if you need to use different names

On Thu, Nov 19, 2015 at 8:34 AM, alexey-s <al...@mail.ru> wrote:
> From route builder
>
> component("servlet") use ServletComponent.
>
> How to specify the correct servletName?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/OSGi-CamelHttpTransportServlet-error-tp5774062p5774094.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: OSGi CamelHttpTransportServlet error

Posted by alexey-s <al...@mail.ru>.
>From route builder

component("servlet") use ServletComponent.

How to specify the correct servletName?



--
View this message in context: http://camel.465427.n5.nabble.com/OSGi-CamelHttpTransportServlet-error-tp5774062p5774094.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: OSGi CamelHttpTransportServlet error

Posted by alexey-s <al...@mail.ru>.
One OSGi bundle can be regarded as a WAR or EAR module in the JavaEE server.
I'm talking about the fact that in different modules can not use servlets
with the same name.
The fact that the component camel-servlet comprises a static cache

And he's one for all the modules.
Something similar can be created or JBossAS WindFly, if the Apache Camel
modules put to directory $JBOSS_HOME/modules.

Next, I point out different names servlets. I get a second mistake. In Java
DSL Rest API I do not see a method that determines the name of the servlet.



--
View this message in context: http://camel.465427.n5.nabble.com/OSGi-CamelHttpTransportServlet-error-tp5774062p5774091.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: OSGi CamelHttpTransportServlet error

Posted by yogu13 <yo...@gmail.com>.
Hello!

>From what I understand the code written to register servlets registers
servlet with the OSGI's Web container at runtime. Since there is only one
instance of the webcontainer available within the container you are ending
up wiring different servlet instances against the same servlet name which
causes the conflict and raises the error (very similar to have 2 servlets
having same name in a web.xml), This behaviour I feel is correct.

I cannot help you much with the second error that you are facing as the
information provided is very less.

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/OSGi-CamelHttpTransportServlet-error-tp5774062p5774078.html
Sent from the Camel - Users mailing list archive at Nabble.com.