To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.
Samual Harvey<br />SCJP2<br />SCJD2
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Samual Harvey<br />SCJP2<br />SCJD2
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Originally posted by Samual Harvey
Interface 1 as follows:-
Interface DatabaseInterface extends Remote
class DatabaseLocal implements DatabaseInterface
class DatabaseRemote extends UnicastRemoteObject implements DatabaseInterface throws RemoteException. Thus the client uses DatabaseInterface.
Originally posted by Samual Harvey
Interface 2 as follows:-
Interface ServerInterface extends Remote
class ServerInterfaceImpl extends UnicastRemoteObject implements ServerInterface. Thus the server uses ServerInterfaceImpl
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Interface 2 as follows:-
Interface ServerInterface extends Remote
class ServerInterfaceImpl extends UnicastRemoteObject implements ServerInterface. Thus the server uses ServerInterfaceImpl
Samual Harvey<br />SCJP2<br />SCJD2
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.
--------------------------------------------------------------------------------
Originally posted by Gurpreet Saini:
Hi johnson,
Then don't you think you are going against the above said quote.
Thank you,
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Samual Harvey<br />SCJP2<br />SCJD2
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Originally posted by Nate Johnson:
I would have the server be a factory that would spit back remote data object for the client. When the client starts up, it asks for a connection and if it is in remote mode, the server would return a new remote data object (which contains a reference to the database, the Data class, being used for all connections on the server).
Samual Harvey<br />SCJP2<br />SCJD2
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Originally posted by Samual Harvey:
Thanks!!! All the Best for your assignment.
w.r.t above, did you made a factory class inside server package? Also does your class that starts the Server process, has a reference to your remote class ( i.e the class that implements your interface and extends UnicastRemoteObject). Did you made this remote class a part of server package.
Thanks.
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>