JBoss development,
A new message was posted in the thread "Camel integration input requested":
http://community.jboss.org/message/530162#530162
Author : Hans Wolffenbuttel
Profile :
http://community.jboss.org/people/h.wolffenbuttel
Message:
--------------------------------------------------------------
Hi Edgar,
The gateway/listener is placed inside a service right? Why not use the internal parameters
for the destination instead of configured parameters?
so instead of:
<listener name="ApacheCamel" busidref="ApacheCamel"
is-gateway="true">
<property name="gatewayClass"
value="org.jboss.soa.esb.listeners.gateway.camel.ApacheCamelListener"></property>
<property name="protocol-uri"
value="irc:breakingwoods@irc.freenode.net/#esbtest"></property>
<property name="destination-category"
value="sample-apachecamelESBService"></property>
<property name="destination-name"
value="sample-apachecamelESBServiceListener"></property>
</listener>
this would be:
<listener name="ApacheCamel" busidref="ApacheCamel"
is-gateway="true">
<property name="gatewayClass"
value="org.jboss.soa.esb.listeners.gateway.camel.ApacheCamelListener"></property>
<property name="protocol-uri"
value="irc:breakingwoods@irc.freenode.net/#esbtest"></property>
</listener>
where as the retrieval of the parameters would be changed from:
String serviceCategory =
listenerConfig.getRequiredAttribute(DESTINATION_CATEGORYNAME_TAG);
String serviceName = listenerConfig.getRequiredAttribute(DESTINATION_SERVICENAME_TAG);
to:
String serviceCategory = ListenerUtil.getValue(config,
ListenerTagNames.SERVICE_CATEGORY_NAME_TAG) ;if (Util.isNullString(serviceCategory)){
throw new ConfigurationException("No service category defined!") ;}String
serviceName = ListenerUtil.getValue(config, ListenerTagNames.SERVICE_NAME_TAG) ;
if (Util.isNullString(serviceName)){ throw new ConfigurationException("No service
name defined!") ;}
Or am I missing something here?
Regards,
Hans
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/530162#530162