Le 22/01/2010 18:13, Christopher Schultz wrote :
This thread over on the Sun forums
(http://forums.sun.com/thread.jspa?threadID=169975) says that you can
either unexport all your objects or call System.exit(). :(

Are there some objects that you may have forgotten to unexport?


I don't think so. Here is how I unexport my objects :

Registry lReg = LocateRegistry.getRegistry(RMI_PORT);
String[] lNames = lReg.list();
for (String lName : lNames)
{
    Remote lRemoteObj = lReg.lookup(lName);
    UnicastRemoteObject.unexportObject(lRemoteObj, true);
    lReg.unbind(lName);
}

Is there a way to safely check that all objects have been exported, because I 
don't want to call
System.exit() in my web app, it is  too ugly and dangerous.

Regards,
Thomas


Ce message est protégé par les règles relatives au secret des correspondances. 
Il est donc établi à destination exclusive de son destinataire. Celui-ci peut 
donc contenir des informations confidentielles. La divulgation de ces 
informations est à ce titre rigoureusement interdite. Si vous avez reçu ce 
message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail 
figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, 
this message is intended solely for the attention of the addressee. This 
message may contain privileged or confidential information, as such the 
disclosure of these informations is strictly forbidden. If, by mistake, you 
have received this message, please return this message to the addressser whose 
e-mail address is written above and destroy this message and all files attached.

Reply via email to