You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Gianluca Stivan <me...@yawnt.com> on 2015/09/08 15:55:02 UTC

CXF and Netty

Hi everyone,

Browsing through the code I saw there's an HTTP server transport based on
Netty . I was wondering how to use that without web.xml (something like
https://github.com/reta/jax-rs-2.0-cdi/blob/master/src/main/java/com/example/Starter.java
).

My use case is a very simple JAX-RS application and I would like to be able
to deploy it without relying on servlets and so on.

Can anyone help me by any chance? I tried googling but there's absolutely
zero informations available on it.

Thank you very much in advance,

Gianluca

Re: CXF and Netty

Posted by Sergey Beryozkin <sb...@gmail.com>.
You can use JAX-RS 2.0 AsyncResponse.
Willem did the Netty project, so I'm not sure about the details.
AsyncResponse should work on top of either frontend

Sergey
On 08/09/15 18:17, Benson Margulies wrote:
> I may want to follow this set of breadcrumbs.
>
> Here's the problem I'm thinking about: I want to handle spikes of
> requests without having a giant number of threads in jetty. So I
> wondered if CXF was integrated with the Netty reactor so that each
> request could go into the queue and free up the thread, and then get
> an async response when the workers get around to it.
>
>
> On Tue, Sep 8, 2015 at 12:34 PM, Sergey Beryozkin <sb...@gmail.com> wrote:
>> Hi
>>
>> Have a look at a jaxrs/basic demo in the distribution - README has the info
>> how to run it, "mvn -Pserver" runs the server, "mvn -Pclient" the client -
>> so try that first.
>> Next - replace a cxf-rt-transports-http-jetty with
>> cxf-rt-transports-http-netty-server in pom.xml and repeat - it will also
>> work.
>> The demo server code will also show how to set up the endpoint
>>
>> Sergey
>>
>> On 08/09/15 14:55, Gianluca Stivan wrote:
>>>
>>> Hi everyone,
>>>
>>> Browsing through the code I saw there's an HTTP server transport based on
>>> Netty . I was wondering how to use that without web.xml (something like
>>>
>>> https://github.com/reta/jax-rs-2.0-cdi/blob/master/src/main/java/com/example/Starter.java
>>> ).
>>>
>>> My use case is a very simple JAX-RS application and I would like to be
>>> able
>>> to deploy it without relying on servlets and so on.
>>>
>>> Can anyone help me by any chance? I tried googling but there's absolutely
>>> zero informations available on it.
>>>
>>> Thank you very much in advance,
>>>
>>> Gianluca
>>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: CXF and Netty

Posted by Benson Margulies <be...@basistech.com>.
I may want to follow this set of breadcrumbs.

Here's the problem I'm thinking about: I want to handle spikes of
requests without having a giant number of threads in jetty. So I
wondered if CXF was integrated with the Netty reactor so that each
request could go into the queue and free up the thread, and then get
an async response when the workers get around to it.


On Tue, Sep 8, 2015 at 12:34 PM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Hi
>
> Have a look at a jaxrs/basic demo in the distribution - README has the info
> how to run it, "mvn -Pserver" runs the server, "mvn -Pclient" the client -
> so try that first.
> Next - replace a cxf-rt-transports-http-jetty with
> cxf-rt-transports-http-netty-server in pom.xml and repeat - it will also
> work.
> The demo server code will also show how to set up the endpoint
>
> Sergey
>
> On 08/09/15 14:55, Gianluca Stivan wrote:
>>
>> Hi everyone,
>>
>> Browsing through the code I saw there's an HTTP server transport based on
>> Netty . I was wondering how to use that without web.xml (something like
>>
>> https://github.com/reta/jax-rs-2.0-cdi/blob/master/src/main/java/com/example/Starter.java
>> ).
>>
>> My use case is a very simple JAX-RS application and I would like to be
>> able
>> to deploy it without relying on servlets and so on.
>>
>> Can anyone help me by any chance? I tried googling but there's absolutely
>> zero informations available on it.
>>
>> Thank you very much in advance,
>>
>> Gianluca
>>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/

Re: CXF and Netty

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

Have a look at a jaxrs/basic demo in the distribution - README has the 
info how to run it, "mvn -Pserver" runs the server, "mvn -Pclient" the 
client - so try that first.
Next - replace a cxf-rt-transports-http-jetty with 
cxf-rt-transports-http-netty-server in pom.xml and repeat - it will also 
work.
The demo server code will also show how to set up the endpoint

Sergey
On 08/09/15 14:55, Gianluca Stivan wrote:
> Hi everyone,
>
> Browsing through the code I saw there's an HTTP server transport based on
> Netty . I was wondering how to use that without web.xml (something like
> https://github.com/reta/jax-rs-2.0-cdi/blob/master/src/main/java/com/example/Starter.java
> ).
>
> My use case is a very simple JAX-RS application and I would like to be able
> to deploy it without relying on servlets and so on.
>
> Can anyone help me by any chance? I tried googling but there's absolutely
> zero informations available on it.
>
> Thank you very much in advance,
>
> Gianluca
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/