bug 8427: resolving the class cast exception

status 8427: resolved fixed
This commit is contained in:
abhishek 2011-02-07 13:29:40 -08:00
parent 5c2bbf48f0
commit 3343aa890f
2 changed files with 4 additions and 2 deletions

View File

@ -1095,7 +1095,9 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
@Override
public void finalizeStop(VirtualMachineProfile<DomainRouterVO> profile, StopAnswer answer) {
if (answer != null) {
processStopOrRebootAnswer(profile.getVirtualMachine(), answer);
VMInstanceVO vm = profile.getVirtualMachine();
DomainRouterVO domR = _routerDao.findById(vm.getId());
processStopOrRebootAnswer(domR, answer);
}
}

View File

@ -2287,7 +2287,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
@Override
public void finalizeStop(VirtualMachineProfile<UserVmVO> profile, StopAnswer answer) {
UserVmVO vm = profile.getVirtualMachine();
VMInstanceVO vm = profile.getVirtualMachine();
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_VM_STOP, vm.getAccountId(), vm.getDataCenterId(), vm.getId(), vm.getName(), vm.getServiceOfferingId(), vm.getTemplateId(), null);
_usageEventDao.persist(usageEvent);