Update of /var/cvs/applications/rmmci/src/org/mmbase/module In directory james.mmbase.org:/tmp/cvs-serv8704/src/org/mmbase/module
Modified Files: RemoteMMCI.java Log Message: just modernized some logging See also: http://cvs.mmbase.org/viewcvs/applications/rmmci/src/org/mmbase/module Index: RemoteMMCI.java =================================================================== RCS file: /var/cvs/applications/rmmci/src/org/mmbase/module/RemoteMMCI.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- RemoteMMCI.java 4 Aug 2008 22:30:12 -0000 1.21 +++ RemoteMMCI.java 3 Nov 2008 17:45:32 -0000 1.22 @@ -28,7 +28,7 @@ * options. Note that in the configuration of mmbaseroot.xml the host should be a valid * host address if the RMIRegistryServer in rmmci.xml is no set. * @author Kees Jongenburger <[EMAIL PROTECTED]> - * @version $Id: RemoteMMCI.java,v 1.21 2008/08/04 22:30:12 michiel Exp $ + * @version $Id: RemoteMMCI.java,v 1.22 2008/11/03 17:45:32 michiel Exp $ * @since MMBase-1.5 */ public class RemoteMMCI extends ProcessorModule { @@ -239,13 +239,14 @@ private void stopRegistry() { log.info("Stopping the RMI registry"); try { + String[] names = registry.list(); for (String element : names) { try { log.service("Unbind " + element); registry.unbind(element); } catch (NotBoundException e1) { - log.warn(Logging.stackTrace(e1)); + log.warn(e1.getMessage(), e1); } } if (!UnicastRemoteObject.unexportObject(registry, true)) { @@ -254,16 +255,19 @@ log.service("Unexported " + registry); } } catch (AccessException e) { - log.warn(Logging.stackTrace(e)); + log.warn(e.getMessage(), e); } catch (RemoteException e) { - log.warn(Logging.stackTrace(e)); + log.warn(e.getMessage(), e); } registry = null; // Explicitely calling the garbage collector here helps tomcat to stop faster. // It can take several minutes otherwise for the RMI Reaper thread to stop. + log.debug("Reading unexporting objects. Now gc-en, to speed up shut down"); Runtime.getRuntime().gc(); } + + public boolean test(String host, int registryPort, String bindName) { try { String uri = "rmi://" + host + ":" + registryPort + "/" + bindName; @@ -306,9 +310,9 @@ try { reg.unbind(bindName); } catch (AccessException e) { - log.warn(Logging.stackTrace(e)); + log.warn(e.getMessage(), e); } catch (RemoteException e) { - log.warn(Logging.stackTrace(e)); + log.warn(e.getMessage(), e); } catch (NotBoundException e) { log.info("Unbind failed for " + bindName + " in RMIregistry " + host + ":" + registryPort); } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs