You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Peter Mucha <pt...@googlemail.com> on 2012/06/04 12:42:11 UTC

JMS Binding does not work with Domain Manager?

Hello,
I am using Tuscany 1.6.2 and I try to run the hello-world example, but
deployed in a node in the domain manager. That means, I start the
domain manager, register the helloworld-service-jms.jar as a
contribution, register the composite, register a node for the
composite.
Now I should be able to start the node, but during start, the
following message pops up:

INFO: SEVERE: URI must start with the scheme jms: for uri:
/HelloWorldServiceComponent
…
INFO: SEVERE: SCA Node could not be created



I have another project, which uses this jms binding and it works, if I
start the node via code, it seems to work
e.g. using this method:
nodeFactory.createSCANode…
and node.start()

(but if I deploy it using the domain manager, same error occurs)

Thanks for any help

Re: JMS Binding does not work with Domain Manager?

Posted by Peter Mucha <pt...@googlemail.com>.
I had a proper look at this problem and it seems that somehow the
resolution of node composites or something does not work properly for
jms.
I have the following binding in my composite description:
<sca:binding.jms uri="jms:eu.indenica.vsp.NotificationGateway"
 initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
jndiURL="tcp://localhost:61616">
      <tuscany:wireFormat.jmsTextXML/>
</sca:binding.jms>

as you can see, the uri is ok and starts with "jms:". This composite
description is also available in the tuscany domain manager under
http://localhost:9990/composite-source/composite:<composite-identifier>

but the resolved version under
http://localhost:9990/composite-resolved/composite:<composite-identifier>
contains this instead:

<binding.jms name="NotificationGateway"
 uri="NotificationGateway/"
 initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
 jndiURL="tcp://localhost:61616">
     <destination name="eu.indenica.vsp.NotificationGateway"/>
     <tuscany:wireFormat.jmsTextXML/>
</binding.jms>

now, the uri is wrong... but THIS will be interpreted by the starting
node and it fails because of this....
i added a temporary workaround to fix this but i think, the real error
is at another place.
But maybe this hints you where the bug resides:
i modified tuscany-sca-1.6.2-src\modules\binding-jms\src\main\java\org\apache\tuscany\sca\binding\jms\impl\JMSBindingProcessor.java
line 935 to:

if (jmsBinding.getURI() != null) {
       //writer.writeAttribute("uri", jmsBinding.getURI()); //this
results in writing the wrong uri to the resolved composite
       writer.writeAttribute("uri", "jms:" + jmsBinding.getDestinationName());
 }

this does not look like the right thing to do ;) but it works at least
for my scenario...
hope, that you can come up with a proper fix...or did i configure
something wrong?


2012/6/4 Peter Mucha <pt...@googlemail.com>:
> Hello,
> I am using Tuscany 1.6.2 and I try to run the hello-world example, but
> deployed in a node in the domain manager. That means, I start the
> domain manager, register the helloworld-service-jms.jar as a
> contribution, register the composite, register a node for the
> composite.
> Now I should be able to start the node, but during start, the
> following message pops up:
>
> INFO: SEVERE: URI must start with the scheme jms: for uri:
> /HelloWorldServiceComponent
> …
> INFO: SEVERE: SCA Node could not be created
>
>
>
> I have another project, which uses this jms binding and it works, if I
> start the node via code, it seems to work
> e.g. using this method:
> nodeFactory.createSCANode…
> and node.start()
>
> (but if I deploy it using the domain manager, same error occurs)
>
> Thanks for any help