Author: ips
Date: 2009-01-20 15:06:00 -0500 (Tue, 20 Jan 2009)
New Revision: 113
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/bean/history/operation/OperationServerServiceImpl.java
Log:
fixed compile errors caused by
http://jira.rhq-project.org/browse/RHQ-976 API change to
OperationServerService interface
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/bean/history/operation/OperationServerServiceImpl.java
===================================================================
---
trunk/core/src/main/java/org/jboss/on/embedded/bean/history/operation/OperationServerServiceImpl.java 2009-01-20
01:02:39 UTC (rev 112)
+++
trunk/core/src/main/java/org/jboss/on/embedded/bean/history/operation/OperationServerServiceImpl.java 2009-01-20
20:06:00 UTC (rev 113)
@@ -49,19 +49,27 @@
public void operationSucceeded(String jobId, Configuration results, long
invocationTime, long completionTime)
{
- OperationHistory history = historyBean.getHistory(jobId);
+ OperationHistory history = this.historyBean.getHistory(jobId);
history.setStatus(OperationRequestStatus.SUCCESS);
if (history instanceof ResourceOperationHistory)
{
- results.setId(history.getId());
- ((ResourceOperationHistory)history).setResults(results);
+ if (results != null)
+ results.setId(history.getId());
+ ((ResourceOperationHistory)history).setResults(results);
}
}
- public void operationFailed(String jobId, ExceptionPackage error, long
invocationTime, long completionTime)
+ public void operationFailed(String jobId, Configuration results, ExceptionPackage
error, long invocationTime,
+ long completionTime)
{
- OperationHistory operationHistory = historyBean.getHistory(jobId);
+ OperationHistory operationHistory = this.historyBean.getHistory(jobId);
operationHistory.setStatus(OperationRequestStatus.FAILURE);
+ if (operationHistory instanceof ResourceOperationHistory)
+ {
+ if (results != null)
+ results.setId(operationHistory.getId());
+ ((ResourceOperationHistory)operationHistory).setResults(results);
+ }
if (error != null)
{
if
(error.getExceptionName().equals(UnsupportedOperationException.class.getName()))
@@ -78,7 +86,7 @@
public void operationTimedOut(String jobId, long invocationTime, long timeoutTime)
{
- OperationHistory history = historyBean.getHistory(jobId);
+ OperationHistory history = this.historyBean.getHistory(jobId);
if (history.getStatus() == OperationRequestStatus.INPROGRESS)
{
history.setStatus(OperationRequestStatus.FAILURE);