It could be an issue in the websocket component as its a bit more
special than a regular component.  And also configuring using endpoint
uri would usually assume host and port is being configured there, and
NOT from the component.



On Wed, Aug 21, 2013 at 4:13 AM, Willem jiang <willem.ji...@gmail.com> wrote:
> I think you need to setup the CamelContext on the appWebSocket bean.
> BTW, what's the exception that you get when using the appWebSocket.
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
> (English)
>           http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Saturday, August 17, 2013 at 4:35 AM, MichaelAtSAG wrote:
>
>> All,
>> I am trying to move endpoint properties into a bean, yet the endpoint is not
>> working this way. I think it is a simple typo but can't find it:
>>
>> ====
>> THIS WORKS
>> ====
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans
>> <camelContext>
>> <endpoint id="websocketEndpoint"
>> uri="websocket://{{wsHost}}:{{wsPort}}/nerv-tweet?staticResources=classpath:.&amp;sendToAll=true"
>> />
>> </camelContext>
>> </beans>
>>
>> ====
>> AND THIS DOES NOT WORK, YET FUNCTIONALLY THE SAME
>> ====
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans
>> <bean id="appWebSocket"
>> class="org.apache.camel.component.websocket.WebsocketComponent">
>> <property name="host" value="localhost" />
>> <property name="port" value="9090" />
>> <property name="staticResources" value="classpath:." />
>> </bean>
>> <camelContext>
>> <endpoint id="websocketEndpoint"
>> uri="appWebSocket://nerv-tweet?sendToAll=true" />
>> </camelContext>
>> </beans>
>>
>> Any help to see the problem would be most welcome!
>> Thanks,
>> Michael
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/Spring-Bean-represented-as-endpoint-tp5737433.html
>> Sent from the Camel - Users mailing list archive at Nabble.com 
>> (http://Nabble.com).
>
>
>



-- 
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

Reply via email to