You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Roger Menday <r....@fz-juelich.de> on 2007/04/13 12:17:05 UTC
dynamic JMS provider endpoints
Hi
I inserted the following into org.apache.servicemix.jms.JMSSpringTest.
public void test2() throws Exception
{
DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
DocumentFragment epr = URIResolver.createWSAEPR("jms://queue/xxx");
ServiceEndpoint se =
client.getContext().resolveEndpointReference(epr);
assertNotNull(se);
InOnly inonly = client.createInOnlyExchange();
inonly.setEndpoint(se);
inonly.getInMessage().setContent(new
StringSource("<hello>world</hello>"));
client.sendSync(inonly);
}
I'm expecting it to pull-up a JMS provider endpoint, and send a message
to the specified queue.
It doesn't seem to work because it can't find the connectionFactory in
the AbstractJMSProcesser start() method. I'm confused. How/where do I
set this to get it to work ?
Many thanks,
Roger
Re: dynamic JMS provider endpoints
Posted by Guillaume Nodet <gn...@gmail.com>.
You should be able to set endpoint properties using the following syntax
jms://queue/xxx?jms.jndiConnectionFactoryName=theName
Btw, you can also configure the JNDI name on the component via JMX,
or at installation time using the "component.properties" configuration file
in the conf folder of the ServiceMix installation (or using the xml syntax
if
you use an embedded version).
On 4/13/07, Roger Menday <r....@fz-juelich.de> wrote:
>
>
> Hi
>
> I inserted the following into org.apache.servicemix.jms.JMSSpringTest.
>
> public void test2() throws Exception
> {
> DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
>
> DocumentFragment epr = URIResolver.createWSAEPR("jms://queue/xxx");
> ServiceEndpoint se =
> client.getContext().resolveEndpointReference(epr);
> assertNotNull(se);
>
> InOnly inonly = client.createInOnlyExchange();
> inonly.setEndpoint(se);
> inonly.getInMessage().setContent(new
> StringSource("<hello>world</hello>"));
> client.sendSync(inonly);
> }
>
> I'm expecting it to pull-up a JMS provider endpoint, and send a message
> to the specified queue.
>
> It doesn't seem to work because it can't find the connectionFactory in
> the AbstractJMSProcesser start() method. I'm confused. How/where do I
> set this to get it to work ?
>
> Many thanks,
>
> Roger
>
--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/