"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "clc/modules/msgs/src/main/java/com/eucalyptus/ws/util/ReplyQueue.java" between
eucalyptus-4.4.1.tar.gz and eucalyptus-4.4.2.tar.gz

About: Eucalyptus (Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems) is an infrastructure for implementing "cloud computing" on clusters (compatible with Amazon’s EC2 interface, but designed to support multiple client-side interfaces).

ReplyQueue.java  (eucalyptus-4.4.1):ReplyQueue.java  (eucalyptus-4.4.2)
skipping to change at line 74 skipping to change at line 74
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.jboss.netty.handler.codec.http.HttpResponseStatus; import org.jboss.netty.handler.codec.http.HttpResponseStatus;
import org.springframework.messaging.MessagingException; import org.springframework.messaging.MessagingException;
import com.eucalyptus.binding.BindingManager; import com.eucalyptus.binding.BindingManager;
import com.eucalyptus.component.annotation.ComponentNamed; import com.eucalyptus.component.annotation.ComponentNamed;
import com.eucalyptus.context.Contexts; import com.eucalyptus.context.Contexts;
import com.eucalyptus.util.Exceptions; import com.eucalyptus.util.Exceptions;
import com.eucalyptus.ws.EucalyptusWebServiceException; import com.eucalyptus.ws.EucalyptusWebServiceException;
import com.eucalyptus.ws.WebServicesException; import com.eucalyptus.ws.WebServicesException;
import com.google.common.base.MoreObjects;
import com.google.common.base.Optional; import com.google.common.base.Optional;
import edu.ucsb.eucalyptus.msgs.BaseMessage; import edu.ucsb.eucalyptus.msgs.BaseMessage;
import edu.ucsb.eucalyptus.msgs.ExceptionResponseType; import edu.ucsb.eucalyptus.msgs.ExceptionResponseType;
import edu.ucsb.eucalyptus.msgs.HasRequest; import edu.ucsb.eucalyptus.msgs.HasRequest;
@SuppressWarnings( "Guava" ) @SuppressWarnings( "Guava" )
@ComponentNamed @ComponentNamed
public class ReplyQueue { public class ReplyQueue {
private static Logger LOG = Logger.getLogger( ReplyQueue.class ); private static Logger LOG = Logger.getLogger( ReplyQueue.class );
skipping to change at line 105 skipping to change at line 106
Object payload = messagingEx.getFailedMessage( ).getPayload( ); Object payload = messagingEx.getFailedMessage( ).getPayload( );
BaseMessage msg = convert( payload ); BaseMessage msg = convert( payload );
if( msg != null ) { if( msg != null ) {
if ( webServiceException != null ) { if ( webServiceException != null ) {
final Optional<Integer> statusCodeOptional = ErrorHandlerSupport.getHttp ResponseStatus( webServiceException ); final Optional<Integer> statusCodeOptional = ErrorHandlerSupport.getHttp ResponseStatus( webServiceException );
final HttpResponseStatus status = !statusCodeOptional.isPresent( ) ? final HttpResponseStatus status = !statusCodeOptional.isPresent( ) ?
HttpResponseStatus.INTERNAL_SERVER_ERROR : HttpResponseStatus.INTERNAL_SERVER_ERROR :
new HttpResponseStatus( statusCodeOptional.get(), "" ); new HttpResponseStatus( statusCodeOptional.get(), "" );
Contexts.response( new ExceptionResponseType( msg, webServiceException.g etCode( ), webServiceException.getMessage( ), status, webServiceException ) ); Contexts.response( new ExceptionResponseType( msg, webServiceException.g etCode( ), webServiceException.getMessage( ), status, webServiceException ) );
} else { } else {
final Throwable cause = messagingEx.getCause( ); final Throwable responseEx = MoreObjects.firstNonNull( messagingEx.getCa
Contexts.response( new ExceptionResponseType( msg, cause.getMessage( ), use( ), messagingEx );
HttpResponseStatus.NOT_ACCEPTABLE, cause ) ); Contexts.response( new ExceptionResponseType( msg, responseEx.getMessage
( ), HttpResponseStatus.NOT_ACCEPTABLE, responseEx ) );
} }
} else { } else {
LOG.error( "Failed to identify request context for received error: " + mes sagingEx.toString( ) ); LOG.error( "Failed to identify request context for received error: " + mes sagingEx.toString( ) );
final Throwable cause = messagingEx.getCause( ); final Throwable cause = messagingEx.getCause( );
Contexts.responseError( new WebServicesException( Contexts.responseError( new WebServicesException(
"Failed to identify request context for received error: " + messagingE x.toString( ) + " while handling error: " + cause.getMessage( ), "Failed to identify request context for received error: " + messagingE x.toString( ) + " while handling error: " + cause.getMessage( ),
cause, cause,
HttpResponseStatus.NOT_ACCEPTABLE ) ); HttpResponseStatus.NOT_ACCEPTABLE ) );
} }
} }
 End of changes. 2 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)