This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes send a JMS to remote machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "send a JMS to remote machine" Watch "send a JMS to remote machine" New topic
Author

send a JMS to remote machine

Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
Hi I have invested a lot of time trying to send a message to a different server in a remote machine.

The thing is that I am using Glassfish 3.0 in both machines and I am use the console to configure it.

In local it works well, but I cant do the same with separated machines, I have readed the post which are available, but I cant figure out a solution.

I would appretiate a ot discuss this with yours.

¿Anyone knows about this matter?

Thanks
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Kindly clarify whether you are trying to send an email from one PC to another or you are trying to post a message into a queue from one PC and read the message from the queue in another PC.


S.D. MADHAN
Not many get the right opportunity !
Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
Hi ,thanks for reply.

I am trying to post a message into a queue from one PC and read the message from the queue in another PC.

Regards
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Have you ensured that, the queue is accessible from both the PCs? If so, how?
Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
The thing is as follows, it works well in local (in the same server), but I don´t know what way connect two PC´s I have readed it´s throught lookup JNDI, but I am stopped at that point.

Regards
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

In the application servers installed in both the PCs, please create JNDI resource for the queue of interest, use the JNDI resource name to access the queues and do the needful.
Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
Yes I´ve done that but the client machine shows an error;

SEVERE: com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [83.57.202.150:14169]. - cause: java.net.ConnectException: Connection timed out: connect
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.throwConnectionException(ExceptionHandler.java:274)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleConnectException(ExceptionHandler.java:220)

¿Any idea?

Thanks for the effort.
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

The following possibilities exist.

1. There is no physical network between the two PCs
2. The JNDI resource is not configured correctly in the remote PC (check credentials and connection data such as IP address, port etc...)
3. Not using the right JMS library
Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
I am trying to connect thougth wifi, in an office which has one router then the IP in both machines is the same.

¿Could be it causing the problem?

Regards
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: send a JMS to remote machine