JMS over Internet... what product should I use?

Hi,

I'm currently thinking of a project that I will eventually write in the Java programming language. The concept for this project is simple. Basically, I have consumer who wants to request a quote (via an applet) for an automobile. This request goes to a server which then forwards this request to all the brokers who will then provide a quote. The server picks the lowest quote and sends this information back to the consumer... the applet will play a sound notifying the user of a response. All of these actions are over the internet and since the response may vary, the applet will not wait for a response, but be notified by the server when there is a response.

My requirements are:

1. Open source software. In other words, tools that I don't need to buy.
2. Need to use Java Messaging System or some other MOM.
3. Tomcat, OpenJMS.
3. Can work through firewalls.

I googled around and found that JMS isn't really recommended over the internet because some firewalls restrict access only through HTTP/HTTPS. I guess JMS communicates using other ports besides HTTP/HTTPS. Then I found JProxy which provides J2EE functionality on the client and also HTTP tunnelling. THis would be the perfect solution to my problem but it costs money....

Is there another product like JProxy that provides client-side J2EE functionality (for JMS) and http tunnelling that is FREE or open-source?

Thanks in advance.


ckl_88Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kerznerCommented:
I have recently worked out a solution with JBoss and JMS over internet. It was hard to configure (firewalls, and JBoss  JMS over Internet was), but I have it all working now. First pointer is my other question (where I did provide the answer also), http://experts-exchange.com/Programming/Q_21334984.html.

0
ckl_88Author Commented:
Well, I tried out tomcat and OpenJMS on a local machine using a simple chat program and it worked.

However, when I tried to setup tomcat and OpenJMS on my home computer and run the chat program on my work computer, it seems the JMS server is having a problem contacting the client. Seems like it is NAT related:

HC=Home Computer (Tomcat + OpenJMS) (internal IP = 192.168.219.x)
WC=Work Computer (Simple Chat program running in DOS) (internal IP = 192.169.1.x)
Router = both have NAT

WC <-> Router <-> Internet <-> Router <-> HC

The chat program subscribes and publishes to the same topic. The chat program starts up fine, it is when I type something in and press return that the server throws an exception. I checked the exception in the log file and apparently, the server it trying to connect to the client computer using it's internal IP. Of course, this won't work because they are on different Local Area Networks.

How in the world do I fix this?

Thanks.
0
kerznerCommented:
you are exactly right, these ar the kinds of problems you should have.

First, configure JBoss (or OpenJMS) to give you the right JNDI refrence (by default it may not be).

Then, put the server outside the firewall. I could not make it work when the server, too, was within.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

ckl_88Author Commented:
Thanks for quick reply kerzner,

I didn't quite understand your last post regarding the JNDI reference because I'm still new to all this. :-(

Just to clarify.
In the chat program, the client subscribes and publishes to the same topic. Thus, when I type "testng" it will publish this message and since it is also subscribed, the server will send this message back to the client (and all other clients that are subscribed the same topic). I monitored this activity using Hermes and confirmed that the server got the message "testing". I also confirmed that the server *tried* to send a notification back to the client, by examining the exception that was thrown. All I can deduce from the exception is that the server got the Internal IP address of the client (the IP address that is assigned by the NAT).... not the external one that is assigned by the ISP. Thus, when it tried to connect to 192.168.219.x:<someport>, it failed because this address doesn't exist on the Internet or the servers local lan.

Sorry to be so verbose...

I checked the openjms website and they actually say in their September 27, 2001 news release:
"We have also successfully configured OpenJMS to run across the internet with interposing firewalls and NATs between the client and the server"

I thought to myself, well, that's great, how do you do it? I looked for hours on their website for any type of source code beyond the simple ones they have, configuration settings, etc, but their examples and documentation seem to be extremely scarce... just enough to get you setup and running on the local machine using the provided examples.

So if they can do it, I should be able to do the same thing too right?




0
kerznerCommented:
You are looking at the root of the problem, attempted connection to connect to 192.168.219.x:<someport>.

How does it know that? Because OpenJMS tells it - this is where you have to send the message.

So, if you put your server computer outside the firewall, you will be fine.

Or, you can try to find this setting in all the OpenJMS setup files, but it may not be easy. I could not do it with JBoss.

In fact, I suspect that JBoss finds out the ip by using a java.net call (getMyIp() kind of thing. If so, it is not configurable.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ckl_88Author Commented:
I will have to try what you suggested... Thanks. I will give an update as to whether it worked or not.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.