From: <ju...@us...> - 2008-02-19 18:35:06
|
Revision: 5995 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=5995&view=rev Author: julgui Date: 2008-02-19 10:35:02 -0800 (Tue, 19 Feb 2008) Log Message: ----------- Fixed: When the host network configuration fails sfDeployedHost() method in PrimImpl.java can return a null and this aborts the daemon start. SFOS-688 Modified Paths: -------------- trunk/core/smartfrog/src/org/smartfrog/sfcore/prim/PrimImpl.java Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/prim/PrimImpl.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/prim/PrimImpl.java 2008-02-19 18:28:12 UTC (rev 5994) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/prim/PrimImpl.java 2008-02-19 18:35:02 UTC (rev 5995) @@ -368,11 +368,12 @@ try { return SFProcess.sfDeployedHost(); } catch (Exception ex) { - if (sfLog().isIgnoreEnabled()){ - sfLog().ignore(MessageUtil.formatMessage(MSG_FAILED_INET_ADDRESS_LOOKUP),ex); + String message = MessageUtil.formatMessage(MSG_FAILED_INET_ADDRESS_LOOKUP); + if (sfLog().isErrorEnabled()){ + sfLog().error(message,ex); } + throw new java.rmi.RemoteException( null,SmartFrogException.forward(message,ex)); } - return null; } /** @@ -722,7 +723,11 @@ sfStartLivenessSender(); // add location information attributes - sfReplaceAttribute(SmartFrogCoreKeys.SF_HOST, sfDeployedHost()); + try { + sfReplaceAttribute(SmartFrogCoreKeys.SF_HOST, sfDeployedHost()); + } catch (Exception e) { + if (sfLog().isWarnEnabled()){ sfLog().warn("Failed to get a valid value for "+SmartFrogCoreKeys.SF_HOST+" attribute.", e); } + } sfReplaceAttribute(SmartFrogCoreKeys.SF_PROCESS, sfDeployedProcessName()); } catch (Exception sfex) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |