From: <jt...@hy...> - 2008-02-28 01:38:53
|
Author: jtravis Date: 2008-02-27 17:38:48 -0800 (Wed, 27 Feb 2008) New Revision: 7938 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=7938 Modified: trunk/src/org/hyperic/hq/hqu/rendit_sys/util/ResourceConfig.groovy Log: Merge from 3.2: Catch platform not found exception when finding a suitable agent Modified: trunk/src/org/hyperic/hq/hqu/rendit_sys/util/ResourceConfig.groovy =================================================================== --- trunk/src/org/hyperic/hq/hqu/rendit_sys/util/ResourceConfig.groovy 2008-02-28 01:38:07 UTC (rev 7937) +++ trunk/src/org/hyperic/hq/hqu/rendit_sys/util/ResourceConfig.groovy 2008-02-28 01:38:48 UTC (rev 7938) @@ -7,6 +7,7 @@ import org.hyperic.hq.appdef.server.session.ServerManagerEJBImpl as ServerMan import org.hyperic.hq.appdef.server.session.ServiceManagerEJBImpl as ServiceMan import org.hyperic.hq.appdef.shared.AppdefEntityValue +import org.hyperic.hq.appdef.shared.PlatformNotFoundException import org.hyperic.hq.authz.server.session.AuthzSubject import org.hyperic.hq.authz.server.session.AuthzSubjectManagerEJBImpl as AuthzMan import org.hyperic.hq.authz.server.session.Resource @@ -296,6 +297,10 @@ */ public static Agent findSuitableAgentFor(String s) { def overlord = authzMan.overlordPojo - platMan.findPlatformByFqdn(overlord.valueObject, s)?.agent + try { + return platMan.findPlatformByFqdn(overlord.valueObject, s)?.agent + } catch(PlatformNotFoundException e) { + return null + } } } |