Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

dave wav

Greenhorn
+ Follow
since Apr 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 dave wav

Peter,
Could you elaborate more on this topic?
any "larger" methods containing multiple Data methods (e.g. booking) should be on the client side only?
The methods such as booking should be included in the Data Interface provided remotely to the client or just reside in the client side, I am not very clear about this.
last thing, in this project, Do we favor to build a classic fat-client/database-server application or thin client? what's the pros and cons?
Thanks in advance,
dave
Hi Peter,
Now I have another question, if I retrieve the remote methods within Bus. logic class,
I need import Suncertify.db.* package and catch
database exception within Bus. logic class,
I am not sure if this is the right way to do?
could you give me your opionion?
Thanks,
dave
Peter,
Thank you for your response and I agree with you.
But how about the client(UI)? should I retrieve remote methods within Business Logic or at UI?
I mean the code like this:
Registry remoteRegistry = LocateRegistry.getRegistry(host,portNumber);
data =(IData)remoteRegistry.lookup(url);
I think that Business logic is acting like client,(between Bus. logic and data server)
so the above code should be in the Business logic class. am I right?
Thanks,
dave
Hello all,
I am using RMI for the network mode.
A class called DataServer which extends UnicastRemoteObject and implements an Interface called IData (all public methods from Data.java).
within the class DataServer, I implements a method called bookFlight.
Method bookFlight does locking a record, read, modify and unlock.
when I read a record, got latest seat number from Data.java, then comparing with the request seat number from GUI, either insufficient or ok.
I want to provide a message to the client if the seats not enough for reservation. Because this is in the network mode, client is talking to server using RMI, so how do I implement this functionality talking back from server to client?
can someone give me some idea? appreciated in advance.
dave
Hello All,
when I run the application in a remote mode,
I started several clients. Do I use the same port number for all of clients or different for each client? I guess the same but I am not sure.
Could some one help me with this?
Thanks,
dave
Thank you mark, I'll try it.
dave
Hello all,
I have a question about host name. what the other host name could be except the localhost?
How do I find the host name and port number if I run my application on different machines?
Thanks,
dave
Mark,
Thank you for your detailed response. I got it,
it returns the interface.
Thanks,
dave
Hi, all: I have a question about how to provide methods in data class to client – GUI.
I have an Interface Idata – all public methods from data class plus extra, a class called DataAdapterServer
public class DataAdapterServer extends
UnicastRemoteObject implements Idata {
private Data adaptee;
public DataAdapterServer(Data adaptee)
throws RemoteException {
this.adaptee = adaptee;
}
public DataInfo[] criteriaFind(String
criteria) throws RemoteException{
return adaptee.criteriaFind(criteria);
}
………………..
}
DataAdapterServer wrapped the data class.
at client side, I need call remote methods from the class DataAdapterServer. Because the constructor of DataAdapterServer passed in Data class, my client class needs
import suncertify.db.*; and declare a data object in order to create DataAdapterServer object,
is this the right way to do
(import suncertify.db.* package on client side) or there is a better way to do?
Thank you in advance,
dave