You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by foram <gf...@gmail.com> on 2006/08/17 20:20:40 UTC
error trying to implement simple static recceipient list
I am trying to implement static receipient list pattern.
The servicemix.xml as as follows
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
xmlns:my="http://servicemix.apache.org/demo/"
xmlns:eip="http://servicemix.apache.org/eip/1.0"
xmlns:test="http://test">
<!-- we are going to use embedded servicemix initially so the transaction
manager will be provided by jboss -->
<!-- the JBI container -->
<sm:container id="jbi"
useMBeanServer="true"
createMBeanServer="true"
dumpStats="true"
statsInterval="10"
transactionManager="#transactionManager">
<sm:listeners>
<sm:dotViewFlowListener />
</sm:listeners>
<sm:activationSpecs>
<!-- Subscribe to a JMS destination -->
<sm:activationSpec componentName="inputReceiver"
service="my:inputReceiver"
destinationService="my:outputSender">
<sm:component>
<bean
class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
<property name="jcaContainer" ref="jencks"/>
<property name="activationSpec">
<bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
<property name="destination" value="inputLayout"/>
<property name="destinationType" value="javax.jms.Queue"/>
</bean>
</property>
</bean>
</sm:component>
</sm:activationSpec>
<!-- send http messages -->
<sm:activationSpec>
<sm:component>
<eip:component>
<eip:endpoints>
<eip:static-recipient-list service="my:outputSender"
endpoint="endpoint">
<eip:recipients>
<eip:exchange-target service="test:test1" />
<eip:exchange-target service="test:test2" />
</eip:recipients>
</eip:static-recipient-list>
</eip:endpoints>
</eip:component>
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:container>
<sm:activationSpec componentName="test1" service="test:test1">
<sm:component><bean class="org.apache.servicemix.tck.ReceiverComponent"
/></sm:component>
</sm:activationSpec>
<sm:activationSpec componentName="test2" service="test:test2">
<sm:component><bean class="org.apache.servicemix.tck.ReceiverComponent"
/></sm:component>
</sm:activationSpec>
<!-- the JCA container -->
<bean id="jencks" class="org.jencks.JCAContainer" singleton="true">
<!-- lets use the default configuration of work manager and
transaction manager-->
<property name="bootstrapContext">
<bean class="org.jencks.factory.BootstrapContextFactoryBean">
<property name="threadPoolSize" value="25"/>
</bean>
</property>
<!-- the JCA Resource Adapter -->
<property name="resourceAdapter">
<bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
<property name="serverUrl" value="tcp://localhost:61616"/>
</bean>
</property>
</bean>
<!-- message broker -->
<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
<property name="config" value="classpath:activemq.xml"/>
</bean>
<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
<bean id="transactionManager"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
<bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>tcp://localhost:61616</value>
</property>
</bean>
</property>
</bean>
</beans>
this is giving me error as follows
INFO - JBIContainer - Activating component for:
[container=Se
rviceMix,name=ID:foram-2947-1155837318096-0:0] with service: null component:
org
.apache.servicemix.eip.EIPSpringComponent@1df3d59
INFO - ComponentMBeanImpl - Initializing component:
ID:foram-2947-1
155837318096-0:0
WARN - DefaultBroker - ServiceName ({http://test}test1)
specif
ied for routing, but can't find it registered
ERROR - EIPSpringComponent - Error processing exchange
MessageExchan
ge[
id: ID:foram-2946-1155837314955-4:0
status: Active
role: provider
service: {http://servicemix.apache.org/demo/}outputSender
endpoint: endpoint
in: <?xml version="1.0" encoding="UTF-8"?><layout>LayoutName</layout>
]
javax.jbi.messaging.MessagingException: Could not find route for exchange:
Messa
geExchange[
id: ID:foram-2946-1155837314955-5:0
status: Active
role: provider
service: {http://test}test1
in: <?xml version="1.0" encoding="UTF-8"?><layout>LayoutName</layout>
] for service: {http://test}test1 and interface: null
at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(Defaul
tBroker.java:311)
at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
ainer.java:713)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
ryChannelImpl.java:374)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
ChannelImpl.java:410)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.sendConsumerExchange(
AsyncBaseLifeCycle.java:447)
at org.apache.servicemix.eip.EIPEndpoint.send(EIPEndpoint.java:202)
at
org.apache.servicemix.eip.patterns.StaticRecipientList.processAsync(S
taticRecipientList.java:155)
at
org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:238)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:397)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:42)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:622)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:168)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:176)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:226)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
at java.lang.Thread.run(Thread.java:595)
ERROR - MulticastDiscoveryAgent - failed to process packet:
java.net.Sock
What am i doing wrong here?
--
View this message in context: http://www.nabble.com/error-trying-to-implement-simple-static-recceipient-list-tf2123108.html#a5856889
Sent from the ServiceMix - User forum at Nabble.com.
Re: error trying to implement simple static recceipient list
Posted by foram <gf...@gmail.com>.
I realized the error. the test1 and test2 are outside the activation specs
and container tags.
foram wrote:
>
> I am trying to implement static receipient list pattern.
> The servicemix.xml as as follows
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
> xmlns:my="http://servicemix.apache.org/demo/"
> xmlns:eip="http://servicemix.apache.org/eip/1.0"
> xmlns:test="http://test">
> <!-- we are going to use embedded servicemix initially so the
> transaction manager will be provided by jboss -->
> <!-- the JBI container -->
> <sm:container id="jbi"
> useMBeanServer="true"
> createMBeanServer="true"
> dumpStats="true"
> statsInterval="10"
> transactionManager="#transactionManager">
>
> <sm:listeners>
> <sm:dotViewFlowListener />
> </sm:listeners>
> <sm:activationSpecs>
>
> <!-- Subscribe to a JMS destination -->
> <sm:activationSpec componentName="inputReceiver"
> service="my:inputReceiver"
> destinationService="my:outputSender">
> <sm:component>
> <bean
> class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
> <property name="jcaContainer" ref="jencks"/>
> <property name="activationSpec">
> <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
> <property name="destination" value="inputLayout"/>
> <property name="destinationType" value="javax.jms.Queue"/>
> </bean>
> </property>
> </bean>
> </sm:component>
> </sm:activationSpec>
>
> <!-- send http messages -->
> <sm:activationSpec>
> <sm:component>
> <eip:component>
> <eip:endpoints>
> <eip:static-recipient-list service="my:outputSender"
> endpoint="endpoint">
> <eip:recipients>
> <eip:exchange-target service="test:test1" />
> <eip:exchange-target service="test:test2" />
> </eip:recipients>
> </eip:static-recipient-list>
> </eip:endpoints>
> </eip:component>
> </sm:component>
> </sm:activationSpec>
>
> </sm:activationSpecs>
> </sm:container>
>
> <sm:activationSpec componentName="test1" service="test:test1">
> <sm:component><bean class="org.apache.servicemix.tck.ReceiverComponent"
> /></sm:component>
> </sm:activationSpec>
>
> <sm:activationSpec componentName="test2" service="test:test2">
> <sm:component><bean
> class="org.apache.servicemix.tck.ReceiverComponent" /></sm:component>
> </sm:activationSpec>
>
> <!-- the JCA container -->
> <bean id="jencks" class="org.jencks.JCAContainer" singleton="true">
>
> <!-- lets use the default configuration of work manager and
> transaction manager-->
> <property name="bootstrapContext">
> <bean class="org.jencks.factory.BootstrapContextFactoryBean">
> <property name="threadPoolSize" value="25"/>
> </bean>
> </property>
>
> <!-- the JCA Resource Adapter -->
> <property name="resourceAdapter">
> <bean id="activeMQResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
> <property name="serverUrl" value="tcp://localhost:61616"/>
> </bean>
> </property>
> </bean>
>
> <!-- message broker -->
> <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
> <property name="config" value="classpath:activemq.xml"/>
> </bean>
>
> <bean id="transactionContextManager"
> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
> <bean id="transactionManager"
> class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
>
> <bean id="jmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL">
> <value>tcp://localhost:61616</value>
> </property>
> </bean>
> </property>
> </bean>
>
> </beans>
>
> this is giving me error as follows
> INFO - JBIContainer - Activating component for:
> [container=Se
> rviceMix,name=ID:foram-2947-1155837318096-0:0] with service: null
> component: org
> .apache.servicemix.eip.EIPSpringComponent@1df3d59
> INFO - ComponentMBeanImpl - Initializing component:
> ID:foram-2947-1
> 155837318096-0:0
> WARN - DefaultBroker - ServiceName ({http://test}test1)
> specif
> ied for routing, but can't find it registered
> ERROR - EIPSpringComponent - Error processing exchange
> MessageExchan
> ge[
> id: ID:foram-2946-1155837314955-4:0
> status: Active
> role: provider
> service: {http://servicemix.apache.org/demo/}outputSender
> endpoint: endpoint
> in: <?xml version="1.0" encoding="UTF-8"?><layout>LayoutName</layout>
> ]
> javax.jbi.messaging.MessagingException: Could not find route for exchange:
> Messa
> geExchange[
> id: ID:foram-2946-1155837314955-5:0
> status: Active
> role: provider
> service: {http://test}test1
> in: <?xml version="1.0" encoding="UTF-8"?><layout>LayoutName</layout>
> ] for service: {http://test}test1 and interface: null
> at
> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(Defaul
> tBroker.java:311)
> at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
> ainer.java:713)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
> ryChannelImpl.java:374)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
> ChannelImpl.java:410)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.sendConsumerExchange(
> AsyncBaseLifeCycle.java:447)
> at
> org.apache.servicemix.eip.EIPEndpoint.send(EIPEndpoint.java:202)
> at
> org.apache.servicemix.eip.patterns.StaticRecipientList.processAsync(S
> taticRecipientList.java:155)
> at
> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:238)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:397)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:42)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:622)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:168)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:176)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:226)
> at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
> va:291)
> at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
> urce)
> at java.lang.Thread.run(Thread.java:595)
> ERROR - MulticastDiscoveryAgent - failed to process packet:
> java.net.Sock
>
> What am i doing wrong here?
>
--
View this message in context: http://www.nabble.com/error-trying-to-implement-simple-static-recceipient-list-tf2123108.html#a5860756
Sent from the ServiceMix - User forum at Nabble.com.