this needs to be fixed in trunk and 1_1_2_GA_CP problem is that InventoryManager.sendResourceErrorToServer(ResourceError resourceError) contains a Resource entity, which (incorrectly) represents the ENTIRE agent-side resource hierarchy...as opposed to just the single resource that had the error. so, if an agent has a large hierarchy to manage (several MB in serialized form), and if several resources are DOWN (which means they throw InvalidPluginConfigurationExceptions, which in turn force these ResourceErrors to be sent to the server), then the ClientCommandSender will queue them up and might eventually run out of memory...under the assumption that the sheer weight of the ResourceError objects make the agent incapable of keeping up with the sending. fix is to use "new Resource(resource_id)" trick to only send a light-weight proxy up to the server, reducing the payload from MB to a few bytes.
patched trunk and 1_1_2_GA_CP. will re-open and add more sub-tasks if this needs to be patched in other branches as well.
associated case: 234996
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1131