This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes multiple user application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "multiple user application" Watch "multiple user application" New topic

multiple user application

Gary Down
Ranch Hand

Joined: Apr 09, 2004
Posts: 46
my apoligies, I posted this in the Swing/GUI thread but then thought it should be here.

The setting...

I have writen a stand alone applcation which is controlled by a single top-level class.
This class controls a series of panels where the user can make selections/enter data etc..

Much of the input/output from different panels depends upon input from other panels.
To fascilitate this all common data used is kept in a single class containing
"private static" fields, all accessed via "public static" functions.
This class is never (by code) instantiated as all fields and functions are static.
Also, the data can not be "final" as it changes according to user input.

All this works fine when a single user runs the application.

The question...

What would be the approach to allow a second/multiple user to run the application
and have access to the same static data.

Charlie Goth
Ranch Hand

Joined: Feb 26, 2004
Posts: 60
You'll need to create a server application to store all the data and a client application to access it.

RMI is probably the easiest way of doing it. You might need a 'server' running on the client too, allowing the server to tell the client when the data has been changed by another user.

Hope that helps.


SCJP (77%)
Gary Down
Ranch Hand

Joined: Apr 09, 2004
Posts: 46
Thanks Charlie,
I was thinking along that direction too. As I am quite new to JAVA (but not to programming, Databases etc..) could you give me a bit of a kick start by suggesting some good reading in this area (preferably online and downloadable, is that a word?).

The current application gets it's initial data from an access database, but I am very flexible about that.

Thanks again,
Gary Down.
Pavel Kubal
Ranch Hand

Joined: Mar 13, 2004
Posts: 356
what about using google? :roll:
Gary Down
Ranch Hand

Joined: Apr 09, 2004
Posts: 46

I hadn't used the internet because I didn'i know what I was looking for.
I bought "The Java Tutorial" a couple and months ago and have worked through it. Ubfortunatly I hadn't really looked at what came on the CD with the book.

Well what do yu know, I had the RMI tutorial all along.

Sorry if I wasted your time, but didn't know anything called "RMI" existed and wouldn't have realsed I had it if you two hadn't let me know what I was looking for.

Thanks again,
I agree. Here's the link:
subject: multiple user application
It's not a secret anymore!