I would appreciate some input for a program I'm writing. Keep in mind that I am new to programming and am learning it for the express purpose of making this app.

I need a way for two remote client apps to communicate to each other. The client app will use a Swing GUI and is not in a browser. I have a central server and database that I want remote clients to have the ability to use it in order to connect them to another user.

What is a good way to do this? Should I use RMI? Do servlets come in to play or are they only for html and jsp?

I have J2EE and am using Netbeans with Glassfish for a server and Derby for my databases. My apologies if I have butchered concepts that I am just now becoming familiar with.

Any direction in regard to books that I could get to facilitate this would be helpful as well.

Thanks!