Re: Using shared Netty configuration with Rest DSL

2015-07-31 Thread arnaudeprez
Hi Claus,

I confirm there is a glitch here when we use componentProperty instead of
endpointProperty for netty4-http component.
I suppose it's more related to the new rest dsl than the component itself.

I'm not able to find an issue for that. Is that taken into account ? 
Otherwise I can log a new issue for that.

Rgds,

A.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-shared-Netty-configuration-with-Rest-DSL-tp5767400p5770147.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using shared Netty configuration with Rest DSL

2015-05-26 Thread Claus Ibsen
Hi

componentProperty is for setting options on the component level.

It becomes clearer in the future when the component docs is auto
generated based on the source code, so all options is listed and up to
date. Today its a manual process in wiki for the docs.



On Tue, May 26, 2015 at 2:34 PM, Alex Soto  wrote:
> Hi,
>
> It appears to be working with the following:
>
>  SSL configuration Notice we read the certificate file from 
> the user
> home directory. {{env:HOME}} is expanded to the current 
> user's home directory.
>  -->
> 
> 
>  password="changeit" type="JKS" provider="SUN" 
> />
> 
> 
>  password="changeit" type="JKS" provider="SUN" 
> />
> 
> 
>
> 
>  class="org.apache.camel.component.netty4.http.NettySharedHttpServerBootstrapConfiguration">
> 
> 
> 
> 
> 
> 
>
> 
>  
> class="org.apache.camel.component.netty4.http.DefaultNettySharedHttpServer"
> init-method="start"
> destroy-method="stop">
>
>  ref="configuration" />
> 
>
> http://camel.apache.org/schema/spring";>
> 
>  value="#sharedNettyHttpServer" />
> 
>
> 
> 
> 
> Return list of known 
> visitors
> 
> 
> 
> …
>
>
> However, it is not clear from the documentation the difference between 
> “componentProperty”  and “endpointProperty” and when to use each, so please 
> let me know if I am misusing this in any way.
>
> Best regards,
> Alex soto
>
>> On May 26, 2015, at 5:42 AM, Claus Ibsen  wrote:
>>
>> Hi
>>
>> Ah maybe there is a glitch configuring those on the component level?
>>
>> You are welcome to log a JIRA so we wont forget. On the component
>> level makes it configurable once for end users, when they eg use it
>> with regular Camel routes, and not as much the rest-dsl.
>>
>>
>> On Fri, May 22, 2015 at 2:47 PM, Alex Soto  wrote:
>>> It is working now.  Thanks!
>>>
>>> Best regards,
>>> Alex soto
>>>
 On May 22, 2015, at 3:53 AM, Willem Jiang  wrote:

 You can setup the endpoint property just like this

 
 >>> value="#sharedNettyHttpServer"/>
 >>> value=“#securityConfiguration"/>
 

 BTW, you need to create the securityConfiguration yourself.



 --
 Willem Jiang

 Red Hat, Inc.
 Web: http://www.redhat.com
 Blog: http://willemjiang.blogspot.com (English)
 http://jnn.iteye.com (Chinese)
 Twitter: willemjiang
 Weibo: 姜宁willem



 On May 22, 2015 at 3:06:20 AM, Alex Soto (alex.s...@envieta.com) wrote:
> I would like to reuse the same Netty Service that is configured outside 
> of the Rest DSL.
> For example I have the Netty and SSL configuration:
>
>
>
>
>> type="JKS" provider="SUN"/>
>
>
>> type="JKS" provider="SUN"/>
>
>
>
>
>
>
>
>
>
>
>
>> init-method="start" destroy-method="stop">
>
>
>
>
> Now in my Camel Context I declare the Rest DSL:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> However, it does not seem to be picking up the shared configuration. Log 
> file shows:
>
> BootstrapFactory on port 0 is using bootstrap configuration: 
> [NettyServerBootstrapConfiguration{protocol='tcp',
> host=‘X.local', port=0, broadcast=false, sendBufferSize=65536, 
> receiveBufferSize=65536,
> receiveBufferSizePredictor=0, workerCount=0, bossCount=1, keepAlive=true, 
> tcpNoDelay=true,
> reuseAddress=true, connectTimeout=1, backlog=0, 
> serverInitializerFactory=org.apache.camel.component.netty4.http.HttpServerInitializerFactory@2db0d008,
> nettyServerBootstrapFactory=null, options=null, ssl=false, 
> sslHandler=null,
> sslContextParameters='null', needClientAuth=false, 
> enabledProtocols='TLSv1,TLSv1.1,TLSv1.2,
> keyStoreFile=null, trustStoreFile=null, keyStoreResource='null', 
> trustStoreResource='null',
> keyStoreFormat='JKS', securityProvider='SunX509', passphrase='null', 
> bossGroup=null,
> workerGroup=null, networkInterface='null’}]
>
> I could not find any examples of how to accomplish this. Any hints?
>
> Best regards,
> Alex soto

>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> Email: cib...@redhat.com
>> Twitter: davsclaus
>> Blog: htt

Re: Using shared Netty configuration with Rest DSL

2015-05-26 Thread Alex Soto
Hi,

It appears to be working with the following:


























http://camel.apache.org/schema/spring";>







Return list of known 
visitors



…


However, it is not clear from the documentation the difference between 
“componentProperty”  and “endpointProperty” and when to use each, so please let 
me know if I am misusing this in any way.

Best regards,
Alex soto

> On May 26, 2015, at 5:42 AM, Claus Ibsen  wrote:
> 
> Hi
> 
> Ah maybe there is a glitch configuring those on the component level?
> 
> You are welcome to log a JIRA so we wont forget. On the component
> level makes it configurable once for end users, when they eg use it
> with regular Camel routes, and not as much the rest-dsl.
> 
> 
> On Fri, May 22, 2015 at 2:47 PM, Alex Soto  wrote:
>> It is working now.  Thanks!
>> 
>> Best regards,
>> Alex soto
>> 
>>> On May 22, 2015, at 3:53 AM, Willem Jiang  wrote:
>>> 
>>> You can setup the endpoint property just like this
>>> 
>>> 
>>> >> value="#sharedNettyHttpServer"/>
>>> >> value=“#securityConfiguration"/>
>>> 
>>> 
>>> BTW, you need to create the securityConfiguration yourself.
>>> 
>>> 
>>> 
>>> --
>>> Willem Jiang
>>> 
>>> Red Hat, Inc.
>>> Web: http://www.redhat.com
>>> Blog: http://willemjiang.blogspot.com (English)
>>> http://jnn.iteye.com (Chinese)
>>> Twitter: willemjiang
>>> Weibo: 姜宁willem
>>> 
>>> 
>>> 
>>> On May 22, 2015 at 3:06:20 AM, Alex Soto (alex.s...@envieta.com) wrote:
 I would like to reuse the same Netty Service that is configured outside of 
 the Rest DSL.
 For example I have the Netty and SSL configuration:
 
 
 
 
> type="JKS" provider="SUN"/>
 
 
> type="JKS" provider="SUN"/>
 
 
 
 
 
 
 
 
 
 
 
> init-method="start" destroy-method="stop">
 
 
 
 
 Now in my Camel Context I declare the Rest DSL:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 However, it does not seem to be picking up the shared configuration. Log 
 file shows:
 
 BootstrapFactory on port 0 is using bootstrap configuration: 
 [NettyServerBootstrapConfiguration{protocol='tcp',
 host=‘X.local', port=0, broadcast=false, sendBufferSize=65536, 
 receiveBufferSize=65536,
 receiveBufferSizePredictor=0, workerCount=0, bossCount=1, keepAlive=true, 
 tcpNoDelay=true,
 reuseAddress=true, connectTimeout=1, backlog=0, 
 serverInitializerFactory=org.apache.camel.component.netty4.http.HttpServerInitializerFactory@2db0d008,
 nettyServerBootstrapFactory=null, options=null, ssl=false, sslHandler=null,
 sslContextParameters='null', needClientAuth=false, 
 enabledProtocols='TLSv1,TLSv1.1,TLSv1.2,
 keyStoreFile=null, trustStoreFile=null, keyStoreResource='null', 
 trustStoreResource='null',
 keyStoreFormat='JKS', securityProvider='SunX509', passphrase='null', 
 bossGroup=null,
 workerGroup=null, networkInterface='null’}]
 
 I could not find any examples of how to accomplish this. Any hints?
 
 Best regards,
 Alex soto
>>> 
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> -
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/



Re: Using shared Netty configuration with Rest DSL

2015-05-26 Thread Claus Ibsen
Hi

Ah maybe there is a glitch configuring those on the component level?

You are welcome to log a JIRA so we wont forget. On the component
level makes it configurable once for end users, when they eg use it
with regular Camel routes, and not as much the rest-dsl.


On Fri, May 22, 2015 at 2:47 PM, Alex Soto  wrote:
> It is working now.  Thanks!
>
> Best regards,
> Alex soto
>
>> On May 22, 2015, at 3:53 AM, Willem Jiang  wrote:
>>
>> You can setup the endpoint property just like this
>>
>> 
>> > value="#sharedNettyHttpServer"/>
>> > value=“#securityConfiguration"/>
>> 
>>
>> BTW, you need to create the securityConfiguration yourself.
>>
>>
>>
>> --
>> Willem Jiang
>>
>> Red Hat, Inc.
>> Web: http://www.redhat.com
>> Blog: http://willemjiang.blogspot.com (English)
>> http://jnn.iteye.com (Chinese)
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>>
>>
>> On May 22, 2015 at 3:06:20 AM, Alex Soto (alex.s...@envieta.com) wrote:
>>> I would like to reuse the same Netty Service that is configured outside of 
>>> the Rest DSL.
>>> For example I have the Netty and SSL configuration:
>>>
>>>
>>>
>>>
 type="JKS" provider="SUN"/>
>>>
>>>
 type="JKS" provider="SUN"/>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
 init-method="start" destroy-method="stop">
>>>
>>>
>>>
>>>
>>> Now in my Camel Context I declare the Rest DSL:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> However, it does not seem to be picking up the shared configuration. Log 
>>> file shows:
>>>
>>> BootstrapFactory on port 0 is using bootstrap configuration: 
>>> [NettyServerBootstrapConfiguration{protocol='tcp',
>>> host=‘X.local', port=0, broadcast=false, sendBufferSize=65536, 
>>> receiveBufferSize=65536,
>>> receiveBufferSizePredictor=0, workerCount=0, bossCount=1, keepAlive=true, 
>>> tcpNoDelay=true,
>>> reuseAddress=true, connectTimeout=1, backlog=0, 
>>> serverInitializerFactory=org.apache.camel.component.netty4.http.HttpServerInitializerFactory@2db0d008,
>>> nettyServerBootstrapFactory=null, options=null, ssl=false, sslHandler=null,
>>> sslContextParameters='null', needClientAuth=false, 
>>> enabledProtocols='TLSv1,TLSv1.1,TLSv1.2,
>>> keyStoreFile=null, trustStoreFile=null, keyStoreResource='null', 
>>> trustStoreResource='null',
>>> keyStoreFormat='JKS', securityProvider='SunX509', passphrase='null', 
>>> bossGroup=null,
>>> workerGroup=null, networkInterface='null’}]
>>>
>>> I could not find any examples of how to accomplish this. Any hints?
>>>
>>> Best regards,
>>> Alex soto
>>
>



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Using shared Netty configuration with Rest DSL

2015-05-22 Thread Alex Soto
It is working now.  Thanks!

Best regards,
Alex soto

> On May 22, 2015, at 3:53 AM, Willem Jiang  wrote:
> 
> You can setup the endpoint property just like this
> 
>  
>  value="#sharedNettyHttpServer"/>
>  value=“#securityConfiguration"/> 
>  
> 
> BTW, you need to create the securityConfiguration yourself.
> 
> 
> 
> --  
> Willem Jiang
> 
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang  
> Weibo: 姜宁willem
> 
> 
> 
> On May 22, 2015 at 3:06:20 AM, Alex Soto (alex.s...@envieta.com) wrote:
>> I would like to reuse the same Netty Service that is configured outside of 
>> the Rest DSL.  
>> For example I have the Netty and SSL configuration:
>> 
>> 
>> 
>> 
>>> type="JKS" provider="SUN"/>
>> 
>> 
>>> type="JKS" provider="SUN"/>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> init-method="start" destroy-method="stop">
>> 
>> 
>> 
>> 
>> Now in my Camel Context I declare the Rest DSL:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> However, it does not seem to be picking up the shared configuration. Log 
>> file shows:
>> 
>> BootstrapFactory on port 0 is using bootstrap configuration: 
>> [NettyServerBootstrapConfiguration{protocol='tcp',  
>> host=‘X.local', port=0, broadcast=false, sendBufferSize=65536, 
>> receiveBufferSize=65536,  
>> receiveBufferSizePredictor=0, workerCount=0, bossCount=1, keepAlive=true, 
>> tcpNoDelay=true,  
>> reuseAddress=true, connectTimeout=1, backlog=0, 
>> serverInitializerFactory=org.apache.camel.component.netty4.http.HttpServerInitializerFactory@2db0d008,
>>   
>> nettyServerBootstrapFactory=null, options=null, ssl=false, sslHandler=null,  
>> sslContextParameters='null', needClientAuth=false, 
>> enabledProtocols='TLSv1,TLSv1.1,TLSv1.2,  
>> keyStoreFile=null, trustStoreFile=null, keyStoreResource='null', 
>> trustStoreResource='null',  
>> keyStoreFormat='JKS', securityProvider='SunX509', passphrase='null', 
>> bossGroup=null,  
>> workerGroup=null, networkInterface='null’}]
>> 
>> I could not find any examples of how to accomplish this. Any hints?
>> 
>> Best regards,
>> Alex soto
> 



Re: Using shared Netty configuration with Rest DSL

2015-05-22 Thread Willem Jiang
You can setup the endpoint property just like this

 

 
 

BTW, you need to create the securityConfiguration yourself.



--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On May 22, 2015 at 3:06:20 AM, Alex Soto (alex.s...@envieta.com) wrote:
> I would like to reuse the same Netty Service that is configured outside of 
> the Rest DSL.  
> For example I have the Netty and SSL configuration:
>  
>  
>  
>  
> > type="JKS" provider="SUN"/>
>  
>  
> > type="JKS" provider="SUN"/>
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> > init-method="start" destroy-method="stop">
>  
>  
>  
>  
> Now in my Camel Context I declare the Rest DSL:
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> However, it does not seem to be picking up the shared configuration. Log file 
> shows:
>  
> BootstrapFactory on port 0 is using bootstrap configuration: 
> [NettyServerBootstrapConfiguration{protocol='tcp',  
> host=‘X.local', port=0, broadcast=false, sendBufferSize=65536, 
> receiveBufferSize=65536,  
> receiveBufferSizePredictor=0, workerCount=0, bossCount=1, keepAlive=true, 
> tcpNoDelay=true,  
> reuseAddress=true, connectTimeout=1, backlog=0, 
> serverInitializerFactory=org.apache.camel.component.netty4.http.HttpServerInitializerFactory@2db0d008,
>   
> nettyServerBootstrapFactory=null, options=null, ssl=false, sslHandler=null,  
> sslContextParameters='null', needClientAuth=false, 
> enabledProtocols='TLSv1,TLSv1.1,TLSv1.2,  
> keyStoreFile=null, trustStoreFile=null, keyStoreResource='null', 
> trustStoreResource='null',  
> keyStoreFormat='JKS', securityProvider='SunX509', passphrase='null', 
> bossGroup=null,  
> workerGroup=null, networkInterface='null’}]
>  
> I could not find any examples of how to accomplish this. Any hints?
>  
> Best regards,
> Alex soto



Using shared Netty configuration with Rest DSL

2015-05-21 Thread Alex Soto
I would like to reuse the same Netty Service that is configured outside of the 
Rest DSL.  For example I have the Netty and SSL configuration:



 
   
 
 
   
 



   
   
   
   
   



   



Now in my Camel Context I declare the Rest DSL:


http://camel.apache.org/schema/spring 
">

  
  
  
  
 
  
 












However, it does not seem to be picking up the shared configuration.  Log file 
shows:

BootstrapFactory on port 0 is using bootstrap configuration: 
[NettyServerBootstrapConfiguration{protocol='tcp', host=‘X.local', port=0, 
broadcast=false, sendBufferSize=65536, receiveBufferSize=65536, 
receiveBufferSizePredictor=0, workerCount=0, bossCount=1, keepAlive=true, 
tcpNoDelay=true, reuseAddress=true, connectTimeout=1, backlog=0, 
serverInitializerFactory=org.apache.camel.component.netty4.http.HttpServerInitializerFactory@2db0d008,
 nettyServerBootstrapFactory=null, options=null, ssl=false, sslHandler=null, 
sslContextParameters='null', needClientAuth=false, 
enabledProtocols='TLSv1,TLSv1.1,TLSv1.2, keyStoreFile=null, 
trustStoreFile=null, keyStoreResource='null', trustStoreResource='null', 
keyStoreFormat='JKS', securityProvider='SunX509', passphrase='null', 
bossGroup=null, workerGroup=null, networkInterface='null’}]

I could not find any examples of how to accomplish this.  Any hints?

Best regards,
Alex soto