Hi,
Can anyone tell me how can I use RemoteServiceMixClient instead of JMSClient on
LoanBroker example.
I'm trying this...
RemoteServiceMixClient client = new
RemoteServiceMixClient();
client.start();
QName service = new
QName("http://servicemix.org/demos/loan-broker", "loan-broker");
inOut.setService(service);
InOut inOut = client.createInOutExchange();
inOut.setService(service);
NormalizedMessage message = inOut.createMessage();
message.setProperty("amount", new Double(50));
client.sendSync(inOut);
I've changed brokerURL for peer://org.servicemix...
My SM conf is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0">
<!-- the JBI container -->
<sm:container id="jbi"
rootDir="./wdir"
MBeanServer="#mbeanServer"
installationDirPath="./install"
deploymentDirPath="./deploy"
dumpStats="true"
statsInterval="10"
flowName="jms"
transactionManager="#transactionManager">
<sm:activationSpecs>
</sm:activationSpecs>
</sm:container>
<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
<bean id="transactionManager"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
[JMX configuration removed ...]
<!-- message broker -->
<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean"
depends-on="mbeanServer">
<property name="config" value="classpath:activemq.xml"/>
</bean>
<bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="peer://org.servicemix"/>
</bean>
</property>
</bean>
</beans>
With that code snippet and this conf I obtain this stack trace:
Exception in thread "main" javax.jbi.messaging.MessagingException: Could not
find route for exchange: [EMAIL PROTECTED] for service:
{http://servicemix.org/demos/loan-broker}loan-broker and interface: null
at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:303)
at
org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:567)
at
org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:347)
at
org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:422)
at
org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:398)
at
org.servicemix.client.DefaultServiceMixClient.sendSync(DefaultServiceMixClient.java:141)
at TestRemoteClient.main(TestRemoteClient.java:60)
Thanks in advance
Joao