Hello,
I've got a general question because I recognised that more than one time
now:
I've installed my own JBI component to servicemix. This component
listens to the nmr via
exchange = channel.accept(5000);
in a never ending loop and receives messages that are sent to its
activated endpoint/service.
So far everything is ok. Now my component sends another message to an
endpoint/service that is registered in servicemix.xml by
<activation-spec>. There is no mistake but after some seconds MY
COMPONENT receives the message that was addressed to a completely
different service. Even the namespaces of the two services are
completely different. How can this be?
I attach some code snippets.
Thanks for your help
Sandra
servicemix.xml snippet:
------------------------------------------------------
<sm:activationSpec componentName="myJmsSender"
service="off:myJmsSender">
<sm:component>
<bean class="org.apache.servicemix.components.jms.JmsSenderComponent">
<property name="template">
<bean class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<ref local="jmsFactory"/>
</property>
<property name="defaultDestinationName"
value="test.org.apache.servicemix.components.xslt.result"/>
<property name="pubSubDomain" value="true"/>
</bean>
</property>
</bean></sm:component>
</sm:activationSpec>
myComponent snippet:
-----------------------------------------------------
QName service2 = new QName("http://servicemix.apache.org/services",
"myJmsSender");
exchange.setService(service2);
exchange.setEndpoint(context.getEndpoint(service2, "myJmsSender"));
channel.send(exchange);