Hi all, this is my first foray into the realms of JDBC/ODBC....
The aim of the code (below) is to fetch data from my database (later to be on my website) and return it to the client applcation where it will be updated. No changes are to be made to the database until all user changes have been made (maybe many/none). the code (one of many) on the client side to invoke this is
This works fine.
The Question... How would I make the same "private static Set usersArray = new TreeSet();" available to a 2nd user (via a second instance of the application) without accessing the database again.
i just don't get what you are trying to do. From my understanding, you want the usersArray object to be available for the next user. If you are using JSP or servlet for your application, you may want to put the usersArray object as an attribute in the Context of your application. In that way your object is visible for the rest of the application.
Joined: Apr 09, 2004
Arnel, guess I'm not too clear..
This was written as a single user application running on a single desktop PC. Now we would like to expand it to have the data held in a single central database (most likely on a website). The aim here is to allow several users access to the data. All the users (young students at that) will need to have access to the same starting information. Each student will update their respective copies of the data and then (when OKd by the teacher) the updates will be applied to the database. The problem is that some students may finish before others have even started, causing the later students to begin with a different set of data.
Hope that is a bit clearer.
Joined: Apr 09, 2004
Am I heading in the right direction....
I have been reading up on RMI and get the impression that I could create a server program, which when started could populate it's "Sets"
e.g. in this case "private static Set usersArray = new TreeSet();".
Then as each client transaction called to get the "Sets" it could just return them as required (given that the necessary functions have been implemented via the interface).
If so, and given the "main" coding below, what do I need to do in the "client" side and (if anything) external to the JAVA classes (e.g. policy file??)
Also, At the moment I get WBRemote exception: access denied (java.net.SocketPermission G resolve) at the Naming.rebind statement