-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thomas,
On 1/25/2010 2:48 AM, Thomas Chabaud wrote: > 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. You've reached way beyond my understanding of RMI at this point. Is it possible that, like JNDI, you might have trees of objects instead of just a flat list? In that case, you'd have to recursively unexport/unbind objects to make sure you got everything. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktd9qEACgkQ9CaO5/Lv0PBtTwCgmk6qeVtwJ0M6reQr49xUEVyC XqkAnjLvXMAAXa64sWmEtRZ1upuvAxuw =z5J+ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org