hi all:
I'm a newbie to ServiceMix. I'm trying to make the loan-broker-demo working
in two jvm.
Changes:
jvm1:
put component bpe-engine and shared-component into install dir.
put a SA into deploy dir.
it contains:
jbi.xml
--------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0">
<service-assembly>
<identification>
<name>bpe-demo</name>
<description>BPE demo</description>
</identification>
<service-unit>
<identification>
<name>bpe-su</name>
<description>Contains the bpel</description>
</identification>
<target>
<artifacts-zip>bpe-su.zip</artifacts-zip>
<component-name>servicemix-bpe</component-name>
</target>
</service-unit>
</service-assembly>
</jbi>
-------------------------------------------------------------------------
and a su cantains all bpel and wsdl file.
in jvm2:
put lw-component and shared-component into install dir
put a new SA into deploy dir
it contains:
jbi.xml
---------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0">
<service-assembly>
<identification>
<name>demo-lw</name>
<description>BPE demo</description>
</identification>
<service-unit>
<identification>
<name>lw-su</name>
<description>Contains the lightweight components</description>
</identification>
<target>
<artifacts-zip>lw-su.zip</artifacts-zip>
<component-name>servicemix-lwcontainer</component-name>
</target>
</service-unit>
</service-assembly>
</jbi>
--------------------------------------------------------------------
an su contains class files and servicemix.xml for lw-component
servicemix.xml
------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
xmlns:lb="urn:logicblaze:soa:loanbroker"
xmlns:ca="urn:logicblaze:soa:creditagency">
<classpath>
<location>.</location>
</classpath>
<sm:serviceunit id="jbi">
<sm:activationSpecs>
<sm:activationSpec destinationService="lb:LoanBrokerService"
destinationOperation="lb:getLoanQuote">
<sm:component>
<bean class="org.apache.servicemix.components.jms.JmsServiceComponent
">
<property name="template">
<bean class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="jmsFactory" />
<property name="defaultDestinationName" value="
demo.org.servicemix.source" />
<property name="pubSubDomain" value="false" />
</bean>
</property>
</bean>
</sm:component>
</sm:activationSpec>
<sm:activationSpec interfaceName="ca:CreditAgency">
<sm:component>
<bean class="loanbroker.CreditAgency" />
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<bean class="loanbroker.Bank">
<constructor-arg value="1" />
</bean>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<bean class="loanbroker.Bank">
<constructor-arg value="2" />
</bean>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<bean class="loanbroker.Bank">
<constructor-arg value="3" />
</bean>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<bean class="loanbroker.Bank">
<constructor-arg value="4" />
</bean>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<bean class="loanbroker.Bank">
<constructor-arg value="5" />
</bean>
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:serviceunit>
<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" />
</bean>
</property>
</bean>
</beans>
------------------------------------------------------------------------
i started two jvms and put files above into such dirs
when started jmsclient , i got follow exceptions:
18:27:58,343 | DEBUG | Thread-5 | DeliveryChannelImpl |
.messaging.DeliveryChannelImpl 344 | Sent: InOut[
id: ID:houzhigang-2682-1160562455687-6:0
status: Active
role: consumer
service: {urn:logicblaze:soa:loanbroker}LoanBrokerService
operation: {urn:logicblaze:soa:loanbroker}getLoanQuote
in: <?xml version="1.0" encoding="UTF-8"?><getLoanQuoteRequest
xmlns="urn:logicblaze:soa:loanbroker">
<ssn>102-24532-53254</ssn>
<amount>1778.589844066003</amount>
<duration>0</duration>
</getLoanQuoteRequest>
]
18:27:58,343 | WARN | Thread-5 | DefaultBroker |
rvicemix.jbi.nmr.DefaultBroker 360 | ServiceName
({urn:logicblaze:soa:loanbroker}LoanBrokerService) specified for routing,
but can't find it registered
18:27:58,343 | DEBUG | Thread-5 | DeliveryChannelImpl |
.messaging.DeliveryChannelImpl 378 | Exception processing:
ID:houzhigang-2682-1160562455687-6:0 in DeliveryChannel{jmsReceiver}
18:27:58,359 | ERROR | Thread-5 | JmsServiceComponent |
onents.jms.JmsServiceComponent 293 | Failed to process inbound JMS Message:
ActiveMQTextMessage {commandId = 7, responseRequired = false, messageId =
ID:houzhigang-2686-1160562477750-1:0:1:1:1, originalDestination = null,
originalTransactionId = null, producerId =
ID:houzhigang-2686-1160562477750-1:0:1:1, destination =
queue://demo.org.servicemix.source, transactionId = null, expiration =
1160562508093, timestamp = 1160562478093, arrival = 0, correlationId = 1,
replyTo = queue://demo.org.servicemix.output, persistent = false, type =
null, priority = 5, groupID = null, groupSequence = 0, targetConsumerId =
null, compressed = false, userID = null, content = null,
marshalledProperties = null, dataStructure = null, redeliveryCounter = 0,
size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true,
text = <getLoanQuoteRequest xmlns='urn:logicblaze:soa:loanbroker'>
<ssn>102-24532-53254</ssn>
<amount>1778.589844066003</amount>
<duration>0</duration>
</getLoanQuoteRequest>}
javax.jbi.messaging.MessagingException: Failed to resolve endpoint:
org.apache.servicemix.jbi.NoServiceAvailableException: Cannot find an
instance of the service: {urn:logicblaze:soa:loanbroker}LoanBrokerService
at org.apache.servicemix.jbi.nmr.DefaultBroker.resolveAddress(
DefaultBroker.java:383)
at org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(
DefaultBroker.java:287)
at org.apache.servicemix.jbi.container.JBIContainer.sendExchange(
JBIContainer.java:793)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
DeliveryChannelImpl.java:375)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
DeliveryChannelImpl.java:450)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
DeliveryChannelImpl.java:422)
at org.apache.servicemix.components.jms.JmsServiceComponent.handleMessage(
JmsServiceComponent.java:258)
at org.apache.servicemix.components.jms.JmsServiceComponent$1.run(
JmsServiceComponent.java:243)
at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java
:291)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.servicemix.jbi.NoServiceAvailableException: Cannot
find an instance of the service:
{urn:logicblaze:soa:loanbroker}LoanBrokerService
at
org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver.createServiceUnavailableException
(ServiceNameEndpointResolver.java:61)
at
org.apache.servicemix.jbi.resolver.EndpointResolverSupport.resolveEndpoint(
EndpointResolverSupport.java:40)
at org.apache.servicemix.jbi.nmr.DefaultBroker.resolveAddress(
DefaultBroker.java:380)
... 10 more
can someone help?