Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

rb

Greenhorn
+ Follow
since Jan 04, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by rb

Thanks Trevor,
i was effectivelly worried about wether the security manager had to be installed on the client or not, but could not find any clear statement on this. It is said tha if the client has to download code from another VM, then it needs to install a security manager.
I do have an interface which implementation is as :
public class DataModelImpl extends
UnicastRemoteObject implements DataModel{
Data localedata ;
RemoteDataImpl remotedata ;

public Data getloacalData( String Dbname) throws RemoteException {
localedata = new Data(Dbname);
return localedata ;
}
public RemoteDataImpl getRemoteData(Data localdata, String dbname) throws RemoteException {
remotedata = new RemoteDataImpl(new Data(dbname));
return remotedata ;
}
}
Can this be considered as a proxy ?
Thanks again
Thanks for your answers, but nobody seems to have had this problem before . Let me describe it a bit further :
1- I need to create an instance of the Data class in order that I could work with it from my GUI.
Requirement : the user should choose the database mode at start of the application : local or remote mode. How I implemented it :
a- before the application frame, I send a window (DataMode) to allow the user to select the mode in which he wants to start. The following data are collected :
--> local mode :
+ Database Name,
--> remote mode :
+ remote object name,
+ server DNS,
+ server port,
+ Security policy file name
Suppose the following is my rmi client
public class rmiclient {
public static void main(String args[]){
new rmiclient(args);
}
public rmiclient(String parms){
String mode = args[0];
if (mode.equals("local"){
System.setSecurityManager(new RMISecurityManager());
Data mydata = new Data(args[1]);
} else if (mode.equals("network"){
System.setSecurityManager(new RMISecurityManager());
RemoteData _data = (RemoteData)Naming.lookup(args[1]);
}

}
Now, if I want to call this from the DataMode window, I can't go : new rmiclient()because this will fail, due to the policy file missing, so I have to go : Runtime.exec(java -D... rmiclient);
This works fine, and so are my client and server load individually.
The problem : this does no return to my GUI the data class instantiated !
So basically, my question is : How can I connect the GUI to the Database, using rmi and giving the user the choice as required by the assignment ?
Thanks.
Hi all,
I am posting this for the second time.
Please if you have any ideas, help.
I have no idea of how to connect (create a database instance) for my user's GUI. Because of the security manager that has to be installed to run the database client, I am lauching the client using Runtime.exec(java -Djava.security .... DataClient). Thos works fine, but I have no idea of how to return the Data or RemoteData class created by this command to my GUI.
Please help.
Thanks
Hy all,
I have been working on the FBN assignment and I am now totally confused. Any help will be welcomed.
1- One of the requirements is that the user should be asked to select the data mode he wants to use (local or remote).
To do that I have developped a simmple GUi that ask the question and collects parameters (database name, server url, port number, remote object name, etc ...) and then runs one of the rmi clients I have to get remote or local data, using the Runtime.exec(String commande).
This choide of design is mainly due to the security manager that is installed in the client: if a command line java -D etc. is not run, it is impossible to run the client as there is no way to specify the policy file.
Problem : how to I get back my Data or Remodata that was created, to used it. I tried gettet functions, but that does not work.
Please need help on this.
Thanks
Hi all,
I need some help on this assignment :
1- one of the requirements is that the application
should in local(all networking "stuff" should be
bypassed then) mode as well as in networked mode.
Considering such a requirement, I found nothing that
could satisfy to this, except using serialization that
will allow the Data class to be downloaded if needed ,
to the server, and provide the database manipulation,
else it is accessed locally. To do so , I had to :
a - serialiaze the data class,
b - define a public Remote interface that offer the
same services as the data class
c - define another public Remote Interface that
allows client to select the data mode (remote or
local)
I have tested this on my pc and it seem to be working
fine. I need to test in a network environment to see
how it goes. But I don't feel comfortable about this
implementation :
- It sounds a little bit redundant to me : the
remote interface offering the same services as data,
just uses data to process request and return retuned
results from data ?!?
- It is quite heavy to install : 2 interfaces and
their implementation have to publish using their stub
and skeleton !
- The Remote Interface that define the data mode
(local or remote) has to be used even in local mode
(to get an instance of local data), what I think is
not respecting the requirement in some way (it is a
remote interface !)
Thanks for your lights on a better implementation !