This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "multiple user application" Watch "multiple user application" New topic
Author

multiple user application

Gary Down
Ranch Hand

Joined: Apr 09, 2004
Posts: 46
Firstly,
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.


Thanks,
Gary.
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.

Charlie


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:
http://www.google.com/search?q=rmi+tutorial&sourceid=opera&num=0&ie=utf-8&oe=utf-8
Gary Down
Ranch Hand

Joined: Apr 09, 2004
Posts: 46
Thanks,

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,
Gary.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple user application
 
Similar Threads
More MVC......question for Mark
Total No of Lines - Bodgitt & Scarper
mutliple use application
ADT and interface
Advice on refactoring