How to: Convert a RMI Project using Java EE and Java Web Start
843793May 17 2009 — edited May 17 2009As a practical exercise in my course, my lecturer ask me to write down something like a chat messenger using RMI technology.
*[From this picture you can see how I realized it|http://www.braghettos.it/yuhuu/yuhuu.jpg|Messenger Schema]*: a minimal client that dinamically gets the code that needs making a bootstrap from the codebase (server side) and communicates with 2 Activatable Servers (one for the autentication, the other one for the registration of the user) that use a posgresql database.
I.e.: The client gets a reference from the RMI register of the Autentication server; then as a result of the invocation of a method inside the server, the client gets back a stub an so on..
Basically the project work really good inside a LAN (which means no firewalls, no packets lost in the network etc) using the RMI technology like Activatable Servers, stubs, Mobile Servers etc
Now comes the problem: my uni project was so nice that I wanted to use it between my friends but you can guess how many problems I found: first of all, of course in my lab everybody use linux; the general user don't know how to compile the source code.
Then I found out, looking carefully on the sun website, the Java Web Start technology. I bought a really detailed book and the problem of having different o.s. was fixed.
But nothing was working: once you run the minimal client, it gets the first class (containing only GUIs) but then there's no communication between the client and my notebook (as a server). There are no problems in my home LAN and expecially, installing an apache server on the notebook, everybody was able to get files and classes from the codebase.
I tought it's too much rough how i developed my project.. I considered also to use HTTP tunneling cause then you can avoid the problem of firewalls and routers inside the actual home LANs..
I bought other book after a detailed research on the web and I found that Java EE could be the right solution of developing web applications but i found also that it's too much focused on JSP pages. I want to use servlets (then HTTP tunneling), Activatable servers, dinamically programming, a minimal client that can be launched using Java Web Start technology but I want a stand-alone application, nothing must use a browser.
Please give me your opinion because I'm gettin' mental. If the only solution is buying a tecnical support, I'll do it because patience is finish..