You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2014/03/04 18:22:09 UTC

please clarify a dubt for call JMS from a remote client

HI all. 
>From the other tread : 
http://openejb.979440.n4.nabble.com/Remote-JNDI-access-to-JMS-resources-td4656767.html

i have read the for call a remnote JNDI JMS from a client i have to add a
system properties to client with:

Remote JNDI access to JMS resources 

*well to be complete, currently you'll need such a system property in your
client:
-DResource/javax.jms.ConnectionFactory=connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://localhost:61616
*

IN the case that i have 2 pc .
 1) ip = 192.168.1.10 // that with tomeeplus on it
2) ip= 192.168.1.20 // that with the client java SE that call the tomee 
Jndi JMS  .

*First ask :
I have  to set to client running on 192.168.1.29 the 
-DResource/javax.jms.ConnectionFactory=connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://localhost:61616

or with 
-DResource/javax.jms.ConnectionFactory=connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://192.168.1.10:61616

????? * 
what rappresent on client side the systempropertie 
-DResource/javax.jms.ConnectionFactory=connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://localhost:61616

it point to localhost on client  and not on server tomee.
...............................  

*SEcond ask:
it is the same think  if i  set the properties into the properties used for
get the remote Context with :

		Hashtable<String, String> ctxProps = new Hashtable<String, String>(4);
		ctxProps.put("java.naming.factory.initial", 
                                 
"org.apache.openejb.client.RemoteInitialContextFactory");
		ctxProps.put("java.naming.provider.url",
"http://localhost:8080/tomee/ejb");
		ctxProps.put("java.naming.security.principal", "tomee");
		ctxProps.put("java.naming.security.credentials", "tomee");
 
i can use the following ?                
ctxProps.put("Resource/javax.jms.ConnectionFactory","connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://localhost:61616");


*



--
View this message in context: http://openejb.979440.n4.nabble.com/please-clarify-a-dubt-for-call-JMS-from-a-remote-client-tp4668102.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: please clarify a dubt for call JMS from a remote client

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

the url represent the connection the client will use so use server
host and port.

It uses System.getProperty (see
http://svn.apache.org/repos/asf/tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java
lookup(String))

This feature will surely be enhanced when needed (we didn't have the need yet).
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-03-04 18:22 GMT+01:00 mauro2java2011 <ma...@gmail.com>:
> HI all.
> From the other tread :
> http://openejb.979440.n4.nabble.com/Remote-JNDI-access-to-JMS-resources-td4656767.html
>
> i have read the for call a remnote JNDI JMS from a client i have to add a
> system properties to client with:
>
> Remote JNDI access to JMS resources
>
> *well to be complete, currently you'll need such a system property in your
> client:
> -DResource/javax.jms.ConnectionFactory=connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://localhost:61616
> *
>
> IN the case that i have 2 pc .
>  1) ip = 192.168.1.10 // that with tomeeplus on it
> 2) ip= 192.168.1.20 // that with the client java SE that call the tomee
> Jndi JMS  .
>
> *First ask :
> I have  to set to client running on 192.168.1.29 the
> -DResource/javax.jms.ConnectionFactory=connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://localhost:61616
>
> or with
> -DResource/javax.jms.ConnectionFactory=connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://192.168.1.10:61616
>
> ????? *
> what rappresent on client side the systempropertie
> -DResource/javax.jms.ConnectionFactory=connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://localhost:61616
>
> it point to localhost on client  and not on server tomee.
> ...............................
>
> *SEcond ask:
> it is the same think  if i  set the properties into the properties used for
> get the remote Context with :
>
>                 Hashtable<String, String> ctxProps = new Hashtable<String, String>(4);
>                 ctxProps.put("java.naming.factory.initial",
>
> "org.apache.openejb.client.RemoteInitialContextFactory");
>                 ctxProps.put("java.naming.provider.url",
> "http://localhost:8080/tomee/ejb");
>                 ctxProps.put("java.naming.security.principal", "tomee");
>                 ctxProps.put("java.naming.security.credentials", "tomee");
>
> i can use the following ?
> ctxProps.put("Resource/javax.jms.ConnectionFactory","connectionfactory:org.apache.activemq.ActiveMQConnectionFactory:tcp://localhost:61616");
>
>
> *
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/please-clarify-a-dubt-for-call-JMS-from-a-remote-client-tp4668102.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.