H
hitectahir
Hi,
Could someone please clear up this little question of mine regarding
RMI's dynamic code downloading features?
RMI claims that it can download ALL classes required by a stub to the
client using the java.rmi.server.codebase property. However, it seems
to be that this is not the case. It seems to me that in the remote
interface, the class (say X) that you specify as a return type or
parameter type must also be available to the client in its local
CLASSPATH. The client cannot download this class using the remote
codebase.
What the server can do is define some subclasses of X and return (or
allow passing of) objects of the subclasses instead of X. These
subclasses are the ones which can be downloaded by clients, and loaded
at runtime using the remote codebase.
Please tell me if Im wrong, and if there might be some way of allowing
ANY class to be downloaded to the client from the RMI server.
Regards
Tahir.
Could someone please clear up this little question of mine regarding
RMI's dynamic code downloading features?
RMI claims that it can download ALL classes required by a stub to the
client using the java.rmi.server.codebase property. However, it seems
to be that this is not the case. It seems to me that in the remote
interface, the class (say X) that you specify as a return type or
parameter type must also be available to the client in its local
CLASSPATH. The client cannot download this class using the remote
codebase.
What the server can do is define some subclasses of X and return (or
allow passing of) objects of the subclasses instead of X. These
subclasses are the ones which can be downloaded by clients, and loaded
at runtime using the remote codebase.
Please tell me if Im wrong, and if there might be some way of allowing
ANY class to be downloaded to the client from the RMI server.
Regards
Tahir.