The RMI server requires the instantiation of a single remote object to be passed to the Naming.rebind() method. Can this be considered a singleton pattern design?
Paul Anilprem
Enthuware Software Support
Ranch Hand
Joined: Sep 23, 2000
Posts: 2547
posted
0
No, you can always create more than one object of the (remote) class and bind them with different names. In singleton pattern, the class itself provides a mechnism to instantiate an (and only one) object. You don't (and can't) do a new for that class (as the constructor is private), instead you do ClassName.getInstance() to get an instance of that class. -Paul. http://www.enthuware.com/jdevplus Your guide to SCJD!
------------------ Get Certified, Guaranteed! (Now Revised for the new Pattern) www.enthuware.com/jqplus
Paul, If that is the case, can I say that the RMI server acts as a singleton agent over the FBN database? There is supposed to be only one RMI server accessing to the database in the assignment. Rudy