Hi John,

On 19 October 2010 13:51, John Mazzitelli <mazz@redhat.com> wrote:
This seems to make sense. However, I question blindly setting the status
to COMMITTED. I'm thinking it might also be possible that the existing
resource could be appropriately be in the NEW state - and in that case,
setting it to COMMITTED here might be wrong.


Looking at the parent status might be more accurate?
 
That's just a theory - I can't say for sure if, at this point in the
code, the resource could be in any other state other than COMMITTED. We
may need to put some kind of conditional around this, say something like:

if (existingResource.getInventoryStatus() == InventoryStatus.DELETED) {
   existingResource.setInventoryStatus(InventoryStatus.COMMITTED)
}

I'm assuming you stepped through this in a debugger - what state was the
existingResource in at that point in this mergeResourceFromDiscovery method?


It was DELETED. Which is what causes the problem.
You remove a service then try to put it back, but it stays DELETED.
 
_______________________________________________
rhq-devel mailing list
rhq-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-devel