Re: Multiple Services on single Port

Hi,
can you share your knowledge how did you do that?
because i have multiple services on single configuration file. when i give same port number for all services
the application is crashing.
Could you please help me?

Thanks,
Mahes

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Nahuel Lofeudo | 1 Feb 10:59

Re: Re: Multiple Services on single Port

Hi,

If what you are trying to do is listen for multiple URLs on a single HTTP port, you need to do it within a single
Mule app. You can't have different Mule apps listening on the same port. This is because each app creates
its own HTTP server and binds to the HTTP port on its own.
What you can do is make each app listen on a different port, and create a new application that listens on the
common port and forwards requests to the different app-specific ports. That'll work.

Best regards
Nahuel
MuleSoft Support

On Feb 1, 2012, at 1:01 AM, KumarPonmaheswaran KumarPonmaheswaran wrote:

> Hi,
> can you share your knowledge how did you do that?
> because i have multiple services on single configuration file. when i give same port number for all services
> the application is crashing.
> Could you please help me?
> 
> Thanks,
> Mahes
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 

(Continue reading)

JSP page in the outbound

I am a newbie to Mule Development.I want to display the result of my service in a jsp page(outbound
endpoint).Can anybody tell me how to configure it.Can anybody give an example for that.Thanks

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Re: Japanese Character code conversion Support

Thanks for your reply.Can u provide me list of supported character code formats(like UTF-8...) for
mule.If possible give me some links regarding this.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Nahuel Lofeudo | 1 Feb 13:57

Re: JSP page in the outbound

Narayanan, 

Take a look at the Bookstore example included in the Mule distribution. It uses JSPs to display the results
of calls to Mule flows.

Best regards
Nahuel
MuleSoft Support

> I am a newbie to Mule Development.I want to display the result of my service in a jsp page(outbound
endpoint).Can anybody tell me how to configure it.Can anybody give an example for that.Thanks
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Pablo La Greca | 1 Feb 16:44

Re: [mule-scm] [mule][23768] branches/mule-3.x: MULE-5894 - Adding choice-exception-strategy - Creating exception-type expression evalutor and extending functionality for match exact type and regex



On Tue, Jan 31, 2012 at 7:58 PM, Daniel Feist <dfeist <at> gmail.com> wrote:
Couple of comment:

- The name "ChoiceMessagingExceptionHandler" could be improved, it's very easily confused with ChoiceMessagingExceptionStrategy.  In fact this interface isn't specifically related to ChoiceES either It could apply to any exception handler or any MP at all for that matter.  Can't it be pulled out and implemented by TemplateES for example?
- Implementation is already done by TemplateES.  But I think you are right, I'm not happy either with ChoiceMessagingExceptionHandler. Let discuss it offline.

- Is the ChoiceDelegateMessagingExceptionStrategy/addDefaultExceptionStrategyIfRequired really needed?  Can't you just get/use default ES after the for loop in handleException and it would be less complex?
No, because of lifecycle. If I do it that way lifecycle will not propagate to exception strategy. This way, each flow has it's own copy of default exception strategy.

- Best to put this "validateConfiguredExceptionStrategies" in the initialise phase, generally all this kind of validation is done at initialisation.  One advantage is that once we decouple lifecycle from Mule this error won't be wrapped inside a spring error
- Done. 
.

Dan

On Jan 31, 2012, at 1:08 PM, pablo.lagreca-yCVjj/EcxBJg9hUCZPvPmw@public.gmane.org wrote:

> Revision
> 23768
> Author
> pablo.lagreca
> Date
> 2012-01-31 10:08:45 -0600 (Tue, 31 Jan 2012)
> Log Message
>
> MULE-5894 - Adding choice-exception-strategy - Creating exception-type expression evalutor and extending functionality for match exact type and regex
> Modified Paths
>
>       • branches/mule-3.x/core/src/main/java/org/mule/config/ExceptionHelper.java
>       • branches/mule-3.x/core/src/main/java/org/mule/exception/AbstractMessagingExceptionStrategy.java
>       • branches/mule-3.x/core/src/main/java/org/mule/exception/CatchMessagingExceptionStrategy.java
>       • branches/mule-3.x/core/src/main/java/org/mule/exception/TemplateMessagingExceptionStrategy.java
>       • branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMessageProcessorOwner.java
>       • branches/mule-3.x/core/src/main/java/org/mule/routing/filters/ExceptionTypeFilter.java
>       • branches/mule-3.x/core/src/main/java/org/mule/routing/filters/ExpressionFilter.java
>       • branches/mule-3.x/core/src/main/resources/META-INF/services/org/mule/config/registry-bootstrap.properties
>       • branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/handlers/MuleNamespaceHandler.java
>       • branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/ConfigurationDefinitionParser.java
>       • branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/ReferenceExceptionStrategyDefinitionParser.java
>       • branches/mule-3.x/modules/spring-config/src/main/resources/META-INF/mule.xsd
>       • branches/mule-3.x/tests/functional/src/test/java/org/mule/test/config/ExceptionHelperTestCase.java
>       • branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ExceptionStrategyConfigurationFailuresTestCase.java
> Added Paths
>
>       • branches/mule-3.x/core/src/main/java/org/mule/api/exception/ChoiceMessagingExceptionHandler.java
>       • branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceDelegateMessagingExceptionStrategy.java
>       • branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceMessagingExceptionStrategy.java
>       • branches/mule-3.x/core/src/main/java/org/mule/expression/ExceptionTypeExpressionEvaluator.java
>       • branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMuleObjectOwner.java
>       • branches/mule-3.x/core/src/test/java/org/mule/exception/ChoiceMessagingExceptionStrategyTestCase.java
>       • branches/mule-3.x/core/src/test/java/org/mule/expression/ExceptionTypeExpressionEvaluatorTestCase.java
>       • branches/mule-3.x/core/src/test/java/org/mule/processor/AbstractMuleObjectOwnerTest.java
>       • branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ChoiceExceptionStrategyTestCase.java
>       • branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/choice-exception-strategy.xml
>       • branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-in-choice.xml
>       • branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-reference-has-expression.xml
>       • branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/exception-strategy-in-choice-without-expression.xml
> Diff
>
> Added: branches/mule-3.x/core/src/main/java/org/mule/api/exception/ChoiceMessagingExceptionHandler.java (0 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/api/exception/ChoiceMessagingExceptionHandler.java                          (rev 0)
> +++ branches/mule-3.x/core/src/main/java/org/mule/api/exception/ChoiceMessagingExceptionHandler.java  2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,30 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.api.exception;
> +
> +import org.mule.api.MuleEvent;
> +
> +/**
> + *  Provides capability to only accept handling certain MuleEvents.
> + */
> +public interface ChoiceMessagingExceptionHandler extends MessagingExceptionHandler
> +{
> +    /**
> +     * <at> param event { <at> link MuleEvent} to route through exception handler
> +     * <at> return true if this { <at> link MessagingExceptionHandler} should handler exception
> +     *         false otherwise
> +     */
> +    boolean accept(MuleEvent event);
> +
> +    /**
> +     * <at> return true if accepts any message, false otherwise.
> +     */
> +    boolean acceptsAll();
> +}
>
> Property changes on: branches/mule-3.x/core/src/main/java/org/mule/api/exception/ChoiceMessagingExceptionHandler.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Modified: branches/mule-3.x/core/src/main/java/org/mule/config/ExceptionHelper.java (23767 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/config/ExceptionHelper.java 2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/core/src/main/java/org/mule/config/ExceptionHelper.java 2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -10,15 +10,6 <at> <at>
>
>
>
>  package org.mule.config;
>
>
>
> -import org.mule.api.MuleException;
> -import org.mule.api.MuleRuntimeException;
> -import org.mule.api.config.ExceptionReader;
> -import org.mule.api.registry.ServiceType;
> -import org.mule.config.i18n.CoreMessages;
> -import org.mule.util.ClassUtils;
> -import org.mule.util.MapUtils;
> -import org.mule.util.SpiUtils;
> -
>
>  import java.io.IOException;
>
>  import java.io.InputStream;
>
>  import java.lang.reflect.InvocationTargetException;
>
> <at> <at> -31,6 +22,14 <at> <at>
>
>
>
>  import org.apache.commons.logging.Log;
>
>  import org.apache.commons.logging.LogFactory;
>
> +import org.mule.api.MuleException;
> +import org.mule.api.MuleRuntimeException;
> +import org.mule.api.config.ExceptionReader;
> +import org.mule.api.registry.ServiceType;
> +import org.mule.config.i18n.CoreMessages;
> +import org.mule.util.ClassUtils;
> +import org.mule.util.MapUtils;
> +import org.mule.util.SpiUtils;
>
>
>
>  /**
>
>   * <code>ExceptionHelper</code> provides a number of helper functions that can be
>
> <at> <at> -343,6 +342,25 <at> <at>
>
>          return DefaultMuleConfiguration.fullStackTraces ? root : sanitize(root);
>
>      }
>
>
>
> +    public static Throwable getNonMuleException(Throwable t)
> +    {
> +        if (!(t instanceof MuleException))
> +        {
> +            return t;
> +        }
> +        Throwable cause = t;
> +        while (cause != null)
> +        {
> +            cause = getExceptionReader(cause).getCause(cause);
> +            // address some misbehaving exceptions, avoid endless loop
> +            if (t == cause || !(cause instanceof MuleException))
> +            {
> +                break;
> +            }
> +        }
> +        return cause instanceof MuleException ? null : cause;
> +    }
> +
>
>      public static Throwable sanitizeIfNeeded(Throwable t)
>
>      {
>
>          return DefaultMuleConfiguration.fullStackTraces ? t : sanitize(t);
>
> Modified: branches/mule-3.x/core/src/main/java/org/mule/exception/AbstractMessagingExceptionStrategy.java (23767 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/exception/AbstractMessagingExceptionStrategy.java   2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/core/src/main/java/org/mule/exception/AbstractMessagingExceptionStrategy.java   2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -40,7 +40,7 <at> <at>
>
>
>
>      public AbstractMessagingExceptionStrategy(MuleContext muleContext)
>
>      {
>
> -        this.muleContext = muleContext;
>
> +        setMuleContext(muleContext);
>
>      }
>
>
>
>      public MuleEvent handleException(Exception ex, MuleEvent event)
>
> Modified: branches/mule-3.x/core/src/main/java/org/mule/exception/CatchMessagingExceptionStrategy.java (23767 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/exception/CatchMessagingExceptionStrategy.java      2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/core/src/main/java/org/mule/exception/CatchMessagingExceptionStrategy.java      2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -9,7 +9,6 <at> <at>
>
>   */
>
>  package org.mule.exception;
>
>
>
> -import org.mule.api.MuleContext;
>
>  import org.mule.api.MuleEvent;
>
>
>
>  public class CatchMessagingExceptionStrategy extends TemplateMessagingExceptionStrategy
>
> <at> <at> -32,4 +31,5 <at> <at>
>
>      {
>
>          return event;
>
>      }
>
> +
>
>  }
>
> Added: branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceDelegateMessagingExceptionStrategy.java (0 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceDelegateMessagingExceptionStrategy.java                             (rev 0)
> +++ branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceDelegateMessagingExceptionStrategy.java     2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,59 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.exception;
> +
> +import java.util.Arrays;
> +import java.util.List;
> +
> +import org.mule.api.MuleEvent;
> +import org.mule.api.exception.ChoiceMessagingExceptionHandler;
> +import org.mule.api.exception.MessagingExceptionHandler;
> +import org.mule.processor.AbstractMuleObjectOwner;
> +
> +public class ChoiceDelegateMessagingExceptionStrategy extends AbstractMuleObjectOwner<MessagingExceptionHandler> implements ChoiceMessagingExceptionHandler
> +{
> +    private MessagingExceptionHandler delegate;
> +
> +    public ChoiceDelegateMessagingExceptionStrategy(MessagingExceptionHandler messagingExceptionHandler)
> +    {
> +        this.delegate = messagingExceptionHandler;
> +    }
> +
> +     <at> Override
> +    public boolean accept(MuleEvent event)
> +    {
> +        if (delegate instanceof ChoiceMessagingExceptionHandler)
> +        {
> +            return ((ChoiceMessagingExceptionHandler)delegate).accept(event);
> +        }
> +        return true;
> +    }
> +
> +     <at> Override
> +    public boolean acceptsAll()
> +    {
> +        if (delegate instanceof ChoiceMessagingExceptionHandler)
> +        {
> +            return ((ChoiceMessagingExceptionHandler)delegate).acceptsAll();
> +        }
> +        return true;
> +    }
> +
> +     <at> Override
> +    public MuleEvent handleException(Exception exception, MuleEvent event)
> +    {
> +        return delegate.handleException(exception,event);
> +    }
> +
> +     <at> Override
> +    protected List<MessagingExceptionHandler> getOwnedObjects() {
> +        return Arrays.asList(delegate);
> +    }
> +}
>
> Property changes on: branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceDelegateMessagingExceptionStrategy.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Added: branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceMessagingExceptionStrategy.java (0 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceMessagingExceptionStrategy.java                             (rev 0)
> +++ branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceMessagingExceptionStrategy.java     2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,82 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.exception;
> +
> +import java.util.Collections;
> +import java.util.List;
> +
> +import org.mule.api.MuleEvent;
> +import org.mule.api.MuleRuntimeException;
> +import org.mule.api.context.MuleContextAware;
> +import org.mule.api.exception.ChoiceMessagingExceptionHandler;
> +import org.mule.api.exception.MessagingExceptionHandler;
> +import org.mule.api.lifecycle.InitialisationException;
> +import org.mule.api.lifecycle.Lifecycle;
> +import org.mule.config.i18n.CoreMessages;
> +import org.mule.message.DefaultExceptionPayload;
> +import org.mule.processor.AbstractMuleObjectOwner;
> +
> +/**
> + * Selects which exception strategy to execute based on filtering.
> + *
> + * Exception listeners must implement { <at> link ChoiceMessagingExceptionHandler} to be part of ChoiceMessagingExceptionStrategy
> + */
> +public class ChoiceMessagingExceptionStrategy extends AbstractMuleObjectOwner<ChoiceMessagingExceptionHandler> implements MessagingExceptionHandler, MuleContextAware, Lifecycle
> +{
> +    private List<ChoiceMessagingExceptionHandler> exceptionListeners;
> +
> +     <at> Override
> +    public MuleEvent handleException(Exception exception, MuleEvent event)
> +    {
> +        event.getMessage().setExceptionPayload(new DefaultExceptionPayload(exception));
> +        for (ChoiceMessagingExceptionHandler exceptionListener : exceptionListeners)
> +        {
> +            if (exceptionListener.accept(event))
> +            {
> +                event.getMessage().setExceptionPayload(null);
> +                return exceptionListener.handleException(exception,event);
> +            }
> +        }
> +        throw new MuleRuntimeException(CoreMessages.createStaticMessage("Default exception strategy must accept any event."));
> +    }
> +
> +    public void setExceptionListeners(List<ChoiceMessagingExceptionHandler> exceptionListeners)
> +    {
> +        this.exceptionListeners = exceptionListeners;
> +        validateConfiguredExceptionStrategies();
> +        addDefaultExceptionStrategyIfRequired();
> +    }
> +
> +     <at> Override
> +    protected List<ChoiceMessagingExceptionHandler> getOwnedObjects() {
> +        return Collections.unmodifiableList(exceptionListeners);
> +    }
> +
> +    private void addDefaultExceptionStrategyIfRequired()
> +    {
> +        if (!exceptionListeners.get(exceptionListeners.size()-1).acceptsAll())
> +        {
> +            this.exceptionListeners.add(new ChoiceDelegateMessagingExceptionStrategy(getMuleContext().getDefaultExceptionStrategy()));
> +        }
> +    }
> +
> +    private void validateConfiguredExceptionStrategies()
> +    {
> +        for (int i = 0; i < exceptionListeners.size()-1; i++)
> +        {
> +             ChoiceMessagingExceptionHandler choiceMessagingExceptionHandler = exceptionListeners.get(i);
> +             if (choiceMessagingExceptionHandler.acceptsAll())
> +             {
> +                 throw new MuleRuntimeException(CoreMessages.createStaticMessage("Only last exception strategy inside <choice-exception-strategy> can accept any message. Maybe expression attribute is empty."));
> +             }
> +        }
> +    }
> +
> +}
>
> Property changes on: branches/mule-3.x/core/src/main/java/org/mule/exception/ChoiceMessagingExceptionStrategy.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Modified: branches/mule-3.x/core/src/main/java/org/mule/exception/TemplateMessagingExceptionStrategy.java (23767 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/exception/TemplateMessagingExceptionStrategy.java   2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/core/src/main/java/org/mule/exception/TemplateMessagingExceptionStrategy.java   2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -12,8 +12,7 <at> <at>
>
>  import org.mule.api.MuleContext;
>
>  import org.mule.api.MuleEvent;
>
>  import org.mule.api.MuleException;
>
> -import org.mule.api.exception.MessagingExceptionHandler;
> -import org.mule.api.exception.RollbackSourceCallback;
>
> +import org.mule.api.exception.ChoiceMessagingExceptionHandler;
>
>  import org.mule.api.lifecycle.InitialisationException;
>
>  import org.mule.api.processor.MessageProcessor;
>
>  import org.mule.api.processor.MessageProcessorChain;
>
> <at> <at> -22,15 +21,20 <at> <at>
>
>  import org.mule.processor.chain.DefaultMessageProcessorChainBuilder;
>
>  import org.mule.routing.requestreply.ReplyToPropertyRequestReplyReplier;
>
>
>
> -import java.net.URI;
> -
> -public abstract class TemplateMessagingExceptionStrategy extends AbstractExceptionListener implements MessagingExceptionHandler
>
> +public abstract class TemplateMessagingExceptionStrategy extends AbstractExceptionListener implements ChoiceMessagingExceptionHandler
>
>  {
>
>
>
>      private MessageProcessorChain configuredMessageProcessors;
>
>      private MessageProcessor replyToMessageProcessor = new ReplyToPropertyRequestReplyReplier();
>
> +    private String expression;
>
>
>
>       <at> Override
>
> +    public boolean accept(MuleEvent event)
> +    {
> +        return acceptsAll() || muleContext.getExpressionManager().evaluateBoolean(expression,event.getMessage());
> +    }
> +
> +     <at> Override
>
>      final public MuleEvent handleException(Exception exception, MuleEvent event)
>
>      {
>
>          fireNotification(exception);
>
> <at> <at> -104,6 +108,17 <at> <at>
>
>          }
>
>      }
>
>
>
> +    public void setExpression(String expression)
> +    {
> +        this.expression = expression;
> +    }
> +
> +     <at> Override
> +    public boolean acceptsAll()
> +    {
> +        return expression == null;
> +    }
> +
>
>      protected abstract MuleEvent afterRouting(Exception exception, MuleEvent event);
>
>
>
>      protected abstract MuleEvent beforeRouting(Exception exception, MuleEvent event);
>
> Added: branches/mule-3.x/core/src/main/java/org/mule/expression/ExceptionTypeExpressionEvaluator.java (0 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/expression/ExceptionTypeExpressionEvaluator.java                            (rev 0)
> +++ branches/mule-3.x/core/src/main/java/org/mule/expression/ExceptionTypeExpressionEvaluator.java    2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,39 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.expression;
> +
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
> +import org.mule.api.MuleMessage;
> +import org.mule.api.expression.ExpressionEvaluator;
> +import org.mule.routing.filters.ExceptionTypeFilter;
> +
> +public class ExceptionTypeExpressionEvaluator implements ExpressionEvaluator
> +{
> +    protected transient Log logger = LogFactory.getLog(ExceptionTypeExpressionEvaluator.class);
> +
> +     <at> Override
> +    public Object evaluate(String expression, MuleMessage message)
> +    {
> +        return new ExceptionTypeFilter(expression).accept(message);
> +    }
> +
> +     <at> Override
> +    public void setName(String name)
> +    {
> +        throw new UnsupportedOperationException();
> +    }
> +
> +     <at> Override
> +    public String getName()
> +    {
> +        return "exception-type";
> +    }
> +}
>
> Property changes on: branches/mule-3.x/core/src/main/java/org/mule/expression/ExceptionTypeExpressionEvaluator.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Modified: branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMessageProcessorOwner.java (23767 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMessageProcessorOwner.java        2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMessageProcessorOwner.java        2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -9,104 +9,25 <at> <at>
>
>   */
>
>  package org.mule.processor;
>
>
>
> +import javax.xml.namespace.QName;
> +import java.util.Collections;
> +import java.util.List;
> +import java.util.Map;
> +import java.util.concurrent.ConcurrentHashMap;
> +
>
>  import org.mule.api.AnnotatedObject;
>
> -import org.mule.api.MuleContext;
> -import org.mule.api.MuleException;
> -import org.mule.api.construct.FlowConstruct;
>
>  import org.mule.api.construct.FlowConstructAware;
>
>  import org.mule.api.context.MuleContextAware;
>
> -import org.mule.api.lifecycle.Disposable;
> -import org.mule.api.lifecycle.Initialisable;
> -import org.mule.api.lifecycle.InitialisationException;
>
>  import org.mule.api.lifecycle.Lifecycle;
>
> -import org.mule.api.lifecycle.Startable;
> -import org.mule.api.lifecycle.Stoppable;
>
>  import org.mule.api.processor.MessageProcessor;
>
>
>
> -import java.util.Collections;
> -import java.util.List;
> -import java.util.Map;
> -import java.util.concurrent.ConcurrentHashMap;
> -
> -import javax.xml.namespace.QName;
> -
>
>  /**
>
>   * An object that owns message processors and delegates startup/shutdown events to them.
>
>   */
>
> -public abstract class AbstractMessageProcessorOwner implements Lifecycle, MuleContextAware, FlowConstructAware, AnnotatedObject
>
> +public abstract class AbstractMessageProcessorOwner extends AbstractMuleObjectOwner<MessageProcessor> implements Lifecycle, MuleContextAware, FlowConstructAware, AnnotatedObject
>
>  {
>
> -    protected MuleContext muleContext;
> -    protected FlowConstruct flowConstruct;
>
>      private final Map<QName, Object> annotations = new ConcurrentHashMap<QName, Object>();
>
>
>
> -    public void setMuleContext(MuleContext context)
> -    {
> -        this.muleContext = context;
> -    }
> -
> -    public void setFlowConstruct(FlowConstruct flowConstruct)
> -    {
> -        this.flowConstruct = flowConstruct;
> -    }
> -
> -    public void initialise() throws InitialisationException
> -    {
> -        for (MessageProcessor processor : getOwnedMessageProcessors())
> -        {
> -            if (processor instanceof MuleContextAware)
> -            {
> -                ((MuleContextAware) processor).setMuleContext(muleContext);
> -            }
> -            if (processor instanceof FlowConstructAware)
> -            {
> -                ((FlowConstructAware) processor).setFlowConstruct(flowConstruct);
> -            }
> -            if (processor instanceof Initialisable)
> -            {
> -                ((Initialisable) processor).initialise();
> -            }
> -        }
> -    }
> -
> -    public void dispose()
> -    {
> -        for (MessageProcessor processor : getOwnedMessageProcessors())
> -        {
> -
> -            if (processor instanceof Disposable)
> -            {
> -                ((Disposable) processor).dispose();
> -            }
> -        }
> -    }
> -
> -
> -    public void start() throws MuleException
> -    {
> -
> -        for (MessageProcessor processor : getOwnedMessageProcessors())
> -        {
> -            if (processor instanceof Startable)
> -            {
> -                ((Startable) processor).start();
> -            }
> -        }
> -    }
> -
> -
> -    public void stop() throws MuleException
> -    {
> -
> -        for (MessageProcessor processor : getOwnedMessageProcessors())
> -        {
> -            if (processor instanceof Stoppable)
> -            {
> -                ((Stoppable) processor).stop();
> -            }
> -
> -        }
> -    }
> -
>
>      public final Object getAnnotation(QName name)
>
>      {
>
>          return annotations.get(name);
>
> <at> <at> -123,6 +44,11 <at> <at>
>
>          annotations.putAll(newAnnotations);
>
>      }
>
>
>
> +    protected List<MessageProcessor> getOwnedObjects()
> +    {
> +        return getOwnedMessageProcessors();
> +    }
> +
>
>      protected abstract List<MessageProcessor> getOwnedMessageProcessors();
>
>
>
>  }
>
> Added: branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMuleObjectOwner.java (0 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMuleObjectOwner.java                              (rev 0)
> +++ branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMuleObjectOwner.java      2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,95 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.processor;
> +
> +import java.util.List;
> +
> +import org.mule.api.MuleContext;
> +import org.mule.api.MuleException;
> +import org.mule.api.construct.FlowConstruct;
> +import org.mule.api.construct.FlowConstructAware;
> +import org.mule.api.context.MuleContextAware;
> +import org.mule.api.lifecycle.Disposable;
> +import org.mule.api.lifecycle.Initialisable;
> +import org.mule.api.lifecycle.InitialisationException;
> +import org.mule.api.lifecycle.Lifecycle;
> +import org.mule.api.lifecycle.Startable;
> +import org.mule.api.lifecycle.Stoppable;
> +
> +/**
> + * An object that owns Mule objects and delegates startup/shutdown events to them.
> + */
> +public abstract class AbstractMuleObjectOwner<T> implements Lifecycle, MuleContextAware, FlowConstructAware {
> +
> +    protected MuleContext muleContext;
> +    protected FlowConstruct flowConstruct;
> +
> +    public void setMuleContext(MuleContext context) {
> +        this.muleContext = context;
> +    }
> +
> +    public void setFlowConstruct(FlowConstruct flowConstruct) {
> +        this.flowConstruct = flowConstruct;
> +    }
> +
> +    public MuleContext getMuleContext() {
> +        return muleContext;
> +    }
> +
> +    public FlowConstruct getFlowConstruct() {
> +        return flowConstruct;
> +    }
> +
> +    public void initialise() throws InitialisationException {
> +        for (T object : getOwnedObjects()) {
> +            if (object instanceof MuleContextAware) {
> +                ((MuleContextAware) object).setMuleContext(muleContext);
> +            }
> +            if (object instanceof FlowConstructAware) {
> +                ((FlowConstructAware) object).setFlowConstruct(flowConstruct);
> +            }
> +            if (object instanceof Initialisable) {
> +                ((Initialisable) object).initialise();
> +            }
> +        }
> +    }
> +
> +    public void dispose() {
> +        for (T processor : getOwnedObjects()) {
> +
> +            if (processor instanceof Disposable) {
> +                ((Disposable) processor).dispose();
> +            }
> +        }
> +    }
> +
> +
> +    public void start() throws MuleException {
> +
> +        for (T processor : getOwnedObjects()) {
> +            if (processor instanceof Startable) {
> +                ((Startable) processor).start();
> +            }
> +        }
> +    }
> +
> +
> +    public void stop() throws MuleException {
> +
> +        for (T processor : getOwnedObjects()) {
> +            if (processor instanceof Stoppable) {
> +                ((Stoppable) processor).stop();
> +            }
> +
> +        }
> +    }
> +
> +    protected abstract List<T> getOwnedObjects();
> +}
>
> Property changes on: branches/mule-3.x/core/src/main/java/org/mule/processor/AbstractMuleObjectOwner.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Modified: branches/mule-3.x/core/src/main/java/org/mule/routing/filters/ExceptionTypeFilter.java (23767 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/routing/filters/ExceptionTypeFilter.java    2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/core/src/main/java/org/mule/routing/filters/ExceptionTypeFilter.java    2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -12,6 +12,7 <at> <at>
>
>
>
>  import org.mule.api.ExceptionPayload;
>
>  import org.mule.api.MuleMessage;
>
> +import org.mule.config.ExceptionHelper;
>
>  import org.mule.util.ClassUtils;
>
>
>
>  /**
>
> <at> <at> -22,15 +23,25 <at> <at>
>
>  public class ExceptionTypeFilter extends PayloadTypeFilter
>
>  {
>
>
>
> +    private String expression;
> +
>
>      public ExceptionTypeFilter()
>
>      {
>
>          super();
>
>      }
>
>
>
>
>
> -    public ExceptionTypeFilter(String expectedType) throws ClassNotFoundException
>
> +    public ExceptionTypeFilter(String expectedType)
>
>      {
>
> -        this(ClassUtils.loadClass(expectedType, ExceptionTypeFilter.class));
>
> +        try
> +        {
> +            Class exceptionType = ClassUtils.loadClass(expectedType, ExceptionTypeFilter.class);
> +            setExpectedType(exceptionType);
> +        }
> +        catch (ClassNotFoundException e)
> +        {
> +            this.expression = expectedType;
> +        }
>
>      }
>
>
>
>      public ExceptionTypeFilter(Class expectedType)
>
> <at> <at> -48,13 +59,32 <at> <at>
>
>      {
>
>          ExceptionPayload epl = message.getExceptionPayload();
>
>
>
> -        if (getExpectedType() == null)
>
> +        if (getExpectedType() == null && this.expression == null)
>
>          {
>
>              return epl != null;
>
>          }
>
>          else if (epl != null)
>
>          {
>
> -            return getExpectedType().isAssignableFrom(epl.getException().getClass());
>
> +            Throwable wrappedException = ExceptionHelper.getNonMuleException(epl.getException());
> +            if (getExpectedType() != null)
> +            {
> +                //Exception type configured
> +                return getExpectedType().isAssignableFrom(epl.getException().getClass()) || (wrappedException != null && getExpectedType().isAssignableFrom(wrappedException.getClass()));
> +            }
> +            else
> +            {
> +                //Expression configured
> +                if (expression.startsWith("="))
> +                {
> +                    String expectedType = expression.substring(1, expression.length());
> +                    return epl.getException().getClass().getName().equals(expectedType) || (wrappedException != null && wrappedException.getClass().getName().equals(expectedType));
> +                }
> +                else
> +                {
> +                    RegExFilter regExFilter = new RegExFilter(expression);
> +                    return regExFilter.accept(epl.getException().getClass().getName()) || (wrappedException != null && regExFilter.accept(wrappedException.getClass().getName()));
> +                }
> +            }
>
>          }
>
>          else
>
>          {
>
> Modified: branches/mule-3.x/core/src/main/java/org/mule/routing/filters/ExpressionFilter.java (23767 => 23768)
>
> --- branches/mule-3.x/core/src/main/java/org/mule/routing/filters/ExpressionFilter.java       2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/core/src/main/java/org/mule/routing/filters/ExpressionFilter.java       2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -12,6 +12,10 <at> <at>
>
>  import static org.mule.util.ClassUtils.equal;
>
>  import static org.mule.util.ClassUtils.hash;
>
>
>
> +import java.text.MessageFormat;
> +
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
>
>  import org.mule.api.MuleContext;
>
>  import org.mule.api.MuleMessage;
>
>  import org.mule.api.context.MuleContextAware;
>
> <at> <at> -20,11 +24,6 <at> <at>
>
>  import org.mule.expression.ExpressionConfig;
>
>  import org.mule.util.StringUtils;
>
>
>
> -import java.text.MessageFormat;
> -
> -import org.apache.commons.logging.Log;
> -import org.apache.commons.logging.LogFactory;
> -
>
>  /**
>
>   * Allows boolean expressions to be executed on a message. Note that when using this filter you must be able to either specify
>
>   * a boolean expression when using an expression filter or use one of the standard Mule filters.  These can be defined as follows -
>
> <at> <at> -169,22 +168,13 <at> <at>
>
>              }
>
>              else if(config.getEvaluator().equals("exception-type"))
>
>              {
>
> -                try
>
> +                if (StringUtils.isEmpty(config.getExpression()))
>
>                  {
>
> -                    if (StringUtils.isEmpty(config.getExpression()))
> -                    {
> -                        delegateFilter = new ExceptionTypeFilter();
> -                    }
> -                    else
> -                    {
> -                        delegateFilter = new ExceptionTypeFilter(config.getExpression());
> -                    }
>
> +                    delegateFilter = new ExceptionTypeFilter();
>
>                  }
>
> -                catch (ClassNotFoundException e)
>
> +                else
>
>                  {
>
> -                    IllegalArgumentException iae = new IllegalArgumentException();
> -                    iae.initCause(e);
> -                    throw iae;
>
> +                    delegateFilter = new ExceptionTypeFilter(config.getExpression());
>
>                  }
>
>              }
>
>              else
>
> Modified: branches/mule-3.x/core/src/main/resources/META-INF/services/org/mule/config/registry-bootstrap.properties (23767 => 23768)
>
> --- branches/mule-3.x/core/src/main/resources/META-INF/services/org/mule/config/registry-bootstrap.properties 2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/core/src/main/resources/META-INF/services/org/mule/config/registry-bootstrap.properties 2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -22,6 +22,7 <at> <at>
>
>  core.object.22=org.mule.expression.MessageHeaderExpressionEnricher
>
>  core.object.23=org.mule.expression.VariableExpressionEnricher
>
>  core.object.24=org.mule.expression.RegexExpressionEvaluator
>
> +core.object.25=org.mule.expression.ExceptionTypeExpressionEvaluator
>
>
>
>  core.transformer.1=org.mule.transformer.simple.ObjectToByteArray
>
>  core.transformer.2=org.mule.transformer.simple.ObjectToOutputHandler
>
> Added: branches/mule-3.x/core/src/test/java/org/mule/exception/ChoiceMessagingExceptionStrategyTestCase.java (0 => 23768)
>
> --- branches/mule-3.x/core/src/test/java/org/mule/exception/ChoiceMessagingExceptionStrategyTestCase.java                             (rev 0)
> +++ branches/mule-3.x/core/src/test/java/org/mule/exception/ChoiceMessagingExceptionStrategyTestCase.java     2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,110 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.exception;
> +
> +import static org.mockito.Matchers.any;
> +import static org.mockito.Mockito.verify;
> +import static org.mockito.Mockito.when;
> +
> +import java.util.ArrayList;
> +import java.util.Arrays;
> +
> +import org.junit.Test;
> +import org.junit.runner.RunWith;
> +import org.mockito.Answers;
> +import org.mockito.Mock;
> +import org.mockito.internal.verification.VerificationModeFactory;
> +import org.mockito.runners.MockitoJUnitRunner;
> +import org.mule.api.MuleContext;
> +import org.mule.api.MuleEvent;
> +import org.mule.api.MuleRuntimeException;
> +import org.mule.api.exception.ChoiceMessagingExceptionHandler;
> +import org.mule.tck.junit4.AbstractMuleTestCase;
> +import org.mule.tck.size.SmallTest;
> +
> + <at> RunWith(MockitoJUnitRunner.class)
> + <at> SmallTest
> +public class ChoiceMessagingExceptionStrategyTestCase extends AbstractMuleTestCase
> +{
> +
> +     <at> Mock
> +    private ChoiceMessagingExceptionHandler mockTestExceptionStrategy1;
> +     <at> Mock
> +    private ChoiceMessagingExceptionHandler mockTestExceptionStrategy2;
> +     <at> Mock
> +    private ChoiceMessagingExceptionHandler mockDefaultTestExceptionStrategy2;
> +     <at> Mock(answer = Answers.RETURNS_DEEP_STUBS)
> +    private MuleEvent mockMuleEvent;
> +     <at> Mock(answer = Answers.RETURNS_DEEP_STUBS)
> +    private MuleContext mockMuleContext;
> +    private Exception mockException = new Exception();
> +
> +     <at> Test
> +    public void testNonMatchThenCallDefault() throws Exception
> +    {
> +        ChoiceMessagingExceptionStrategy choiceMessagingExceptionStrategy = new ChoiceMessagingExceptionStrategy();
> +        choiceMessagingExceptionStrategy.setExceptionListeners(new ArrayList<ChoiceMessagingExceptionHandler>(Arrays.<ChoiceMessagingExceptionHandler>asList(mockTestExceptionStrategy1, mockTestExceptionStrategy2)));
> +        when(mockMuleContext.getDefaultExceptionStrategy()).thenReturn(mockDefaultTestExceptionStrategy2);
> +        choiceMessagingExceptionStrategy.setMuleContext(mockMuleContext);
> +        choiceMessagingExceptionStrategy.initialise();
> +        when(mockTestExceptionStrategy1.accept(mockMuleEvent)).thenReturn(false);
> +        when(mockTestExceptionStrategy2.accept(mockMuleEvent)).thenReturn(false);
> +        when(mockDefaultTestExceptionStrategy2.accept(mockMuleEvent)).thenReturn(true);
> +        choiceMessagingExceptionStrategy.handleException(mockException,mockMuleEvent);
> +        verify(mockTestExceptionStrategy1, VerificationModeFactory.times(0)).handleException(any(Exception.class),any(MuleEvent.class));
> +        verify(mockTestExceptionStrategy2, VerificationModeFactory.times(0)).handleException(any(Exception.class),any(MuleEvent.class));
> +        verify(mockDefaultTestExceptionStrategy2, VerificationModeFactory.times(1)).handleException(mockException, mockMuleEvent);
> +    }
> +
> +     <at> Test(expected = MuleRuntimeException.class)
> +    public void testNoneMatchEvenDefault() throws Exception
> +    {
> +        ChoiceMessagingExceptionStrategy choiceMessagingExceptionStrategy = new ChoiceMessagingExceptionStrategy();
> +        choiceMessagingExceptionStrategy.setExceptionListeners(new ArrayList<ChoiceMessagingExceptionHandler>(Arrays.<ChoiceMessagingExceptionHandler>asList(mockTestExceptionStrategy1, mockTestExceptionStrategy2)));
> +        when(mockMuleContext.getDefaultExceptionStrategy()).thenReturn(mockDefaultTestExceptionStrategy2);
> +        choiceMessagingExceptionStrategy.setMuleContext(mockMuleContext);
> +        choiceMessagingExceptionStrategy.initialise();
> +        when(mockTestExceptionStrategy1.accept(mockMuleEvent)).thenReturn(false);
> +        when(mockTestExceptionStrategy2.accept(mockMuleEvent)).thenReturn(false);
> +        when(mockDefaultTestExceptionStrategy2.accept(mockMuleEvent)).thenReturn(false);
> +        choiceMessagingExceptionStrategy.handleException(mockException, mockMuleEvent);
> +    }
> +
> +     <at> Test
> +    public void testSecondMatches() throws Exception
> +    {
> +        ChoiceMessagingExceptionStrategy choiceMessagingExceptionStrategy = new ChoiceMessagingExceptionStrategy();
> +        choiceMessagingExceptionStrategy.setExceptionListeners(new ArrayList<ChoiceMessagingExceptionHandler>(Arrays.<ChoiceMessagingExceptionHandler>asList(mockTestExceptionStrategy1, mockTestExceptionStrategy2)));
> +        when(mockMuleContext.getDefaultExceptionStrategy()).thenReturn(mockDefaultTestExceptionStrategy2);
> +        choiceMessagingExceptionStrategy.setMuleContext(mockMuleContext);
> +        choiceMessagingExceptionStrategy.initialise();
> +        when(mockTestExceptionStrategy1.accept(mockMuleEvent)).thenReturn(false);
> +        when(mockTestExceptionStrategy2.accept(mockMuleEvent)).thenReturn(true);
> +        when(mockDefaultTestExceptionStrategy2.accept(mockMuleEvent)).thenReturn(true);
> +        choiceMessagingExceptionStrategy.handleException(mockException,mockMuleEvent);
> +        verify(mockTestExceptionStrategy1, VerificationModeFactory.times(0)).handleException(any(Exception.class),any(MuleEvent.class));
> +        verify(mockDefaultTestExceptionStrategy2, VerificationModeFactory.times(0)).handleException(any(Exception.class),any(MuleEvent.class));
> +        verify(mockTestExceptionStrategy2, VerificationModeFactory.times(1)).handleException(mockException, mockMuleEvent);
> +    }
> +
> +     <at> Test
> +    public void testFirstAcceptsAllMatches() throws Exception
> +    {
> +        ChoiceMessagingExceptionStrategy choiceMessagingExceptionStrategy = new ChoiceMessagingExceptionStrategy();
> +        choiceMessagingExceptionStrategy.setExceptionListeners(new ArrayList<ChoiceMessagingExceptionHandler>(Arrays.<ChoiceMessagingExceptionHandler>asList(mockTestExceptionStrategy1, mockTestExceptionStrategy2)));
> +        when(mockMuleContext.getDefaultExceptionStrategy()).thenReturn(mockDefaultTestExceptionStrategy2);
> +        choiceMessagingExceptionStrategy.setMuleContext(mockMuleContext);
> +        when(mockTestExceptionStrategy1.acceptsAll()).thenReturn(true);
> +        when(mockTestExceptionStrategy2.acceptsAll()).thenReturn(false);
> +        when(mockDefaultTestExceptionStrategy2.acceptsAll()).thenReturn(true);
> +        choiceMessagingExceptionStrategy.initialise();
> +    }
> +
> +}
>
> Property changes on: branches/mule-3.x/core/src/test/java/org/mule/exception/ChoiceMessagingExceptionStrategyTestCase.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Added: branches/mule-3.x/core/src/test/java/org/mule/expression/ExceptionTypeExpressionEvaluatorTestCase.java (0 => 23768)
>
> --- branches/mule-3.x/core/src/test/java/org/mule/expression/ExceptionTypeExpressionEvaluatorTestCase.java                            (rev 0)
> +++ branches/mule-3.x/core/src/test/java/org/mule/expression/ExceptionTypeExpressionEvaluatorTestCase.java    2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,85 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.expression;
> +
> +import org.hamcrest.core.Is;
> +import org.junit.Assert;
> +import org.junit.Test;
> +import org.junit.runner.RunWith;
> +import org.mockito.Answers;
> +import org.mockito.Mock;
> +import org.mockito.Mockito;
> +import org.mockito.runners.MockitoJUnitRunner;
> +import org.mule.api.MuleMessage;
> +import org.mule.api.MuleRuntimeException;
> +import org.mule.tck.junit4.AbstractMuleTestCase;
> +import org.mule.tck.size.SmallTest;
> +
> + <at> SmallTest
> + <at> RunWith(MockitoJUnitRunner.class)
> +public class ExceptionTypeExpressionEvaluatorTestCase extends AbstractMuleTestCase
> +{
> +
> +    private ExceptionTypeExpressionEvaluator exceptionTypeExpressionEvaluator = new ExceptionTypeExpressionEvaluator();
> +     <at> Mock(answer = Answers.RETURNS_DEEP_STUBS)
> +    private MuleMessage mockMuleMessage;
> +
> +     <at> Test
> +    public void testEvaluateNotMatchingExpression() throws Exception
> +    {
> +        exceptionTypeExpressionEvaluator.evaluate("asdf", mockMuleMessage);
> +    }
> +
> +     <at> Test
> +    public void testEvaluateMatchingExceptionType() throws Exception
> +    {
> +        configureExceptionPayload(new NullPointerException());
> +        Assert.assertThat((Boolean) exceptionTypeExpressionEvaluator.evaluate(NullPointerException.class.getName(), mockMuleMessage), Is.is(true));
> +    }
> +
> +     <at> Test
> +    public void testEvaluateMatchingSubtype() throws Exception
> +    {
> +        configureExceptionPayload(new NullPointerException());
> +        Assert.assertThat((Boolean)exceptionTypeExpressionEvaluator.evaluate(RuntimeException.class.getName(), mockMuleMessage),Is.is(true));
> +    }
> +
> +     <at> Test
> +    public void testEvaluateExactMatchingType() throws Exception
> +    {
> +        configureExceptionPayload(new NullPointerException());
> +        Assert.assertThat((Boolean)exceptionTypeExpressionEvaluator.evaluate("=" + NullPointerException.class.getName(), mockMuleMessage),Is.is(true));
> +    }
> +
> +     <at> Test
> +    public void testEvaluateExactSubtype() throws Exception
> +    {
> +        configureExceptionPayload(new NullPointerException());
> +        Assert.assertThat((Boolean)exceptionTypeExpressionEvaluator.evaluate("=" + RuntimeException.class.getName(), mockMuleMessage),Is.is(false));
> +    }
> +
> +     <at> Test
> +    public void testEvaluateMatchingUsingRegex() throws Exception
> +    {
> +        configureExceptionPayload(new MuleRuntimeException(new Exception()));
> +        Assert.assertThat((Boolean)exceptionTypeExpressionEvaluator.evaluate("(.*).mule.(.*)Exception", mockMuleMessage),Is.is(true));
> +    }
> +     <at> Test
> +    public void testEvaluateNotMatchingUsingRegex() throws Exception
> +    {
> +        configureExceptionPayload(new NullPointerException());
> +        Assert.assertThat((Boolean)exceptionTypeExpressionEvaluator.evaluate("(.*).mule.not.matching.(.*)Exception", mockMuleMessage),Is.is(false));
> +    }
> +
> +    private void configureExceptionPayload(Exception e)
> +    {
> +        Mockito.when(mockMuleMessage.getExceptionPayload().getException()).thenReturn(e);
> +    }
> +}
>
> Property changes on: branches/mule-3.x/core/src/test/java/org/mule/expression/ExceptionTypeExpressionEvaluatorTestCase.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Added: branches/mule-3.x/core/src/test/java/org/mule/processor/AbstractMuleObjectOwnerTest.java (0 => 23768)
>
> --- branches/mule-3.x/core/src/test/java/org/mule/processor/AbstractMuleObjectOwnerTest.java                          (rev 0)
> +++ branches/mule-3.x/core/src/test/java/org/mule/processor/AbstractMuleObjectOwnerTest.java  2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,117 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.processor;
> +
> +import static org.mockito.Mockito.verify;
> +
> +import java.util.Arrays;
> +import java.util.List;
> +
> +import org.junit.Before;
> +import org.junit.Test;
> +import org.junit.runner.RunWith;
> +import org.mockito.Mock;
> +import org.mockito.runners.MockitoJUnitRunner;
> +import org.mule.api.MuleContext;
> +import org.mule.api.MuleException;
> +import org.mule.api.construct.FlowConstruct;
> +import org.mule.api.construct.FlowConstructAware;
> +import org.mule.api.context.MuleContextAware;
> +import org.mule.api.lifecycle.InitialisationException;
> +import org.mule.api.lifecycle.Lifecycle;
> +import org.mule.tck.size.SmallTest;
> +
> + <at> SmallTest
> + <at> RunWith(MockitoJUnitRunner.class)
> +public class AbstractMuleObjectOwnerTest {
> +
> +     <at> Mock
> +    private TestClass mockObject1;
> +     <at> Mock
> +    private TestClass mockObject2;
> +     <at> Mock
> +    private MuleContext mockMuleContext;
> +     <at> Mock
> +    private FlowConstruct mockFlowConstruct;
> +    private AbstractMuleObjectOwner<TestClass> abstractMuleObjectOwner;
> +
> +     <at> Before
> +    public void before()
> +    {
> +        abstractMuleObjectOwner = new AbstractMuleObjectOwner<TestClass>()
> +        {
> +             <at> Override
> +            protected List<TestClass> getOwnedObjects() {
> +                return Arrays.asList(mockObject1,mockObject2);
> +            }
> +        };
> +        abstractMuleObjectOwner.setFlowConstruct(mockFlowConstruct);
> +        abstractMuleObjectOwner.setMuleContext(mockMuleContext);
> +    }
> +
> +     <at> Test
> +    public void testInitialise() throws Exception {
> +        abstractMuleObjectOwner.initialise();
> +        verify(mockObject1).initialise();
> +        verify(mockObject2).initialise();
> +        verify(mockObject1).setMuleContext(mockMuleContext);
> +        verify(mockObject2).setMuleContext(mockMuleContext);
> +        verify(mockObject1).setFlowConstruct(mockFlowConstruct);
> +        verify(mockObject2).setFlowConstruct(mockFlowConstruct);
> +    }
> +
> +     <at> Test
> +    public void testDispose() throws Exception {
> +        abstractMuleObjectOwner.dispose();
> +        verify(mockObject1).dispose();
> +        verify(mockObject2).dispose();
> +    }
> +
> +     <at> Test
> +    public void testStart() throws Exception {
> +        abstractMuleObjectOwner.start();
> +        verify(mockObject1).start();
> +        verify(mockObject2).start();
> +    }
> +
> +     <at> Test
> +    public void testStop() throws Exception {
> +        abstractMuleObjectOwner.stop();
> +        verify(mockObject1).stop();
> +        verify(mockObject2).stop();
> +    }
> +
> +    public class TestClass implements Lifecycle, MuleContextAware, FlowConstructAware
> +    {
> +         <at> Override
> +        public void dispose() {
> +        }
> +
> +         <at> Override
> +        public void setFlowConstruct(FlowConstruct flowConstruct) {
> +        }
> +
> +         <at> Override
> +        public void initialise() throws InitialisationException {
> +        }
> +
> +         <at> Override
> +        public void setMuleContext(MuleContext context) {
> +        }
> +
> +         <at> Override
> +        public void start() throws MuleException {
> +        }
> +
> +         <at> Override
> +        public void stop() throws MuleException {
> +        }
> +    }
> +}
>
> Property changes on: branches/mule-3.x/core/src/test/java/org/mule/processor/AbstractMuleObjectOwnerTest.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Modified: branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/handlers/MuleNamespaceHandler.java (23767 => 23768)
>
> --- branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/handlers/MuleNamespaceHandler.java   2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/handlers/MuleNamespaceHandler.java   2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -111,8 +111,9 <at> <at>
>
>  import org.mule.endpoint.EndpointURIEndpointBuilder;
>
>  import org.mule.enricher.MessageEnricher;
>
>  import org.mule.enricher.MessageEnricher.EnrichExpressionPair;
>
> +import org.mule.exception.CatchMessagingExceptionStrategy;
> +import org.mule.exception.ChoiceMessagingExceptionStrategy;
>
>  import org.mule.exception.DefaultMessagingExceptionStrategy;
>
> -import org.mule.exception.CatchMessagingExceptionStrategy;
>
>  import org.mule.expression.ExpressionConfig;
>
>  import org.mule.expression.transformers.BeanBuilderTransformer;
>
>  import org.mule.expression.transformers.ExpressionArgument;
>
> <at> <at> -245,6 +246,7 <at> <at>
>
>          // Exception Strategies
>
>          registerBeanDefinitionParser("default-exception-strategy", new ExceptionStrategyDefinitionParser(DefaultMessagingExceptionStrategy.class));
>
>          registerBeanDefinitionParser("catch-exception-strategy", new ExceptionStrategyDefinitionParser(CatchMessagingExceptionStrategy.class));
>
> +        registerBeanDefinitionParser("choice-exception-strategy", new ExceptionStrategyDefinitionParser(ChoiceMessagingExceptionStrategy.class));
>
>          registerMuleBeanDefinitionParser("exception-strategy", new ReferenceExceptionStrategyDefinitionParser());
>
>          registerDeprecatedBeanDefinitionParser("default-service-exception-strategy", new ChildDefinitionParser("exceptionListener", DefaultMessagingExceptionStrategy.class), "Use default-exception-strategy instead.");
>
>          registerBeanDefinitionParser("custom-exception-strategy", new ExceptionStrategyDefinitionParser(null));
>
> Modified: branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/ConfigurationDefinitionParser.java (23767 => 23768)
>
> --- branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/ConfigurationDefinitionParser.java  2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/ConfigurationDefinitionParser.java  2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -9,11 +9,15 <at> <at>
>
>   */
>
>  package org.mule.config.spring.parsers.specific;
>
>
>
> +import org.mule.api.MuleRuntimeException;
>
>  import org.mule.api.config.MuleConfiguration;
>
>  import org.mule.api.config.MuleProperties;
>
> +import org.mule.config.i18n.CoreMessages;
> +import org.mule.config.spring.parsers.PostProcessor;
> +import org.mule.config.spring.parsers.assembly.BeanAssembler;
>
>  import org.mule.config.spring.parsers.generic.NamedDefinitionParser;
>
> -
>
>  import org.springframework.beans.factory.BeanDefinitionStoreException;
>
> +import org.springframework.beans.factory.config.BeanDefinition;
>
>  import org.springframework.beans.factory.support.AbstractBeanDefinition;
>
>  import org.springframework.beans.factory.support.BeanDefinitionBuilder;
>
>  import org.springframework.beans.factory.xml.ParserContext;
>
> <at> <at> -34,6 +38,27 <at> <at>
>
>      {
>
>          super(MuleProperties.OBJECT_MULE_CONFIGURATION);
>
>          addIgnored(DEFAULT_EXCEPTION_STRATEGY_ATTRIBUTE);
>
> +        registerPostProcessor(new PostProcessor()
> +        {
> +             <at> Override
> +            public void postProcess(ParserContext context, BeanAssembler assembler, Element element)
> +            {
> +                AbstractBeanDefinition beanDefinition = assembler.getBean().getBeanDefinition();
> +                if (beanDefinition.hasAttribute(DEFAULT_EXCEPTION_STRATEGY_ATTRIBUTE))
> +                {
> +                    Object defaultExceptionStrategyBeanName = beanDefinition.getAttribute(DEFAULT_EXCEPTION_STRATEGY_ATTRIBUTE);
> +                    if (!context.getRegistry().containsBeanDefinition((String) defaultExceptionStrategyBeanName))
> +                    {
> +                        throw new MuleRuntimeException(CoreMessages.createStaticMessage(String.format("No global exception strategy defined with name %s.",defaultExceptionStrategyBeanName)));
> +                    }
> +                    BeanDefinition defaultExceptionStrategyBeanDefinition = context.getRegistry().getBeanDefinition(element.getAttribute(DEFAULT_EXCEPTION_STRATEGY_ATTRIBUTE));
> +                    if (defaultExceptionStrategyBeanDefinition.hasAttribute("expression"))
> +                    {
> +                        throw new MuleRuntimeException(CoreMessages.createStaticMessage("Default exception strategy must not have expression attribute. It must accept any message."));
> +                    }
> +                }
> +            }
> +        });
>
>          singleton=true;
>
>      }
>
>
>
> <at> <at> -48,7 +73,7 <at> <at>
>
>      {
>
>          if (element.hasAttribute(DEFAULT_EXCEPTION_STRATEGY_ATTRIBUTE))
>
>          {
>
> -            builder.addPropertyValue("defaultExceptionStrategyName",element.getAttribute(DEFAULT_EXCEPTION_STRATEGY_ATTRIBUTE));
>
> +            builder.addPropertyValue("defaultExceptionStrategyName", element.getAttribute(DEFAULT_EXCEPTION_STRATEGY_ATTRIBUTE));
>
>          }
>
>          super.doParse(element,context,builder);
>
>      }
>
> Modified: branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/ReferenceExceptionStrategyDefinitionParser.java (23767 => 23768)
>
> --- branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/ReferenceExceptionStrategyDefinitionParser.java     2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/ReferenceExceptionStrategyDefinitionParser.java     2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -10,44 +10,16 <at> <at>
>
>  package org.mule.config.spring.parsers.specific;
>
>
>
>  import static org.mule.config.spring.parsers.specific.ExceptionStrategyDefinitionParser.createNoNameAttributePreProcessor;
>
> -import org.mule.api.config.MuleProperties;
>
> +
>
>  import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser;
>
> -import org.mule.config.spring.parsers.delegate.ParentContextDefinitionParser;
> -import org.mule.config.spring.parsers.generic.OrphanDefinitionParser;
>
>  import org.mule.config.spring.parsers.generic.ParentDefinitionParser;
>
> -import org.springframework.beans.factory.support.AbstractBeanDefinition;
> -import org.springframework.beans.factory.xml.ParserContext;
> -import org.w3c.dom.Element;
>
>
>
> -public class ReferenceExceptionStrategyDefinitionParser extends ParentContextDefinitionParser
>
> +public class ReferenceExceptionStrategyDefinitionParser extends ParentDefinitionParser
>
>  {
>
>      public ReferenceExceptionStrategyDefinitionParser()
>
>      {
>
> -        super("configuration", createConfigurationDefinitionParser());
> -        otherwise(createInFlowServiceDefinitionParser());
>
> +        addAlias(AbstractMuleBeanDefinitionParser.ATTRIBUTE_REF, "exceptionListener");
> +        registerPreProcessor(createNoNameAttributePreProcessor());
>
>      }
>
>
>
> -    private ParentDefinitionParser createInFlowServiceDefinitionParser()
> -    {
> -        ParentDefinitionParser inFlowServiceDefinitionParser = new ParentDefinitionParser();
> -        inFlowServiceDefinitionParser.addAlias(AbstractMuleBeanDefinitionParser.ATTRIBUTE_REF, "exceptionListener");
> -        inFlowServiceDefinitionParser.registerPreProcessor(createNoNameAttributePreProcessor());
> -        return inFlowServiceDefinitionParser;
> -    }
> -
> -    private static OrphanDefinitionParser createConfigurationDefinitionParser()
> -    {
> -        OrphanDefinitionParser orphanDefinitionParser = new OrphanDefinitionParser(false){
> -             <at> Override
> -            protected AbstractBeanDefinition parseInternal(Element element, ParserContext context)
> -            {
> -                String ref = element.getAttribute("ref");
> -                context.getRegistry().registerAlias(ref,MuleProperties.OBJECT_DEFAULT_GLOBAL_EXCEPTION_STRATEGY);
> -                return null;
> -            }
> -        };
> -        orphanDefinitionParser.registerPreProcessor(createNoNameAttributePreProcessor());
> -        return orphanDefinitionParser;
> -    }
> -
>
>  }
>
> Modified: branches/mule-3.x/modules/spring-config/src/main/resources/META-INF/mule.xsd (23767 => 23768)
>
> --- branches/mule-3.x/modules/spring-config/src/main/resources/META-INF/mule.xsd      2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/modules/spring-config/src/main/resources/META-INF/mule.xsd      2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -1718,7 +1718,7 <at> <at>
>
>                              </xsd:documentation>
>
>                          </xsd:annotation>
>
>                      </xsd:element>
>
> -                    <xsd:element ref="legacy-abstract-exception-strategy" minOccurs="0" />
>
> +                    <xsd:element ref="legacy-abstract-exception-strategy" minOccurs="0"/>
>
>                      <xsd:element ref="abstract-message-info-mapping" minOccurs="0">
>
>                          <xsd:annotation>
>
>                              <xsd:documentation>
>
> <at> <at> -1813,6 +1813,13 <at> <at>
>
>                          </xsd:documentation>
>
>                      </xsd:annotation>
>
>                  </xsd:attribute>
>
> +                <xsd:attribute name="expression" type="xsd:string" use="optional">
> +                    <xsd:annotation>
> +                        <xsd:documentation>
> +                            The expression that will be evaluated to determine if this expcetion strategy should be executed. This should always be a boolean expression.
> +                        </xsd:documentation>
> +                    </xsd:annotation>
> +                </xsd:attribute>
>
>              </xsd:extension>
>
>          </xsd:complexContent>
>
>      </xsd:complexType>
>
> <at> <at> -2189,7 +2196,7 <at> <at>
>
>                              </xsd:complexType>
>
>                          </xsd:element>
>
>                      </xsd:choice>
>
> -                    <xsd:element ref="legacy-abstract-exception-strategy" minOccurs="0"/>
>
> +                    <xsd:element ref="legacy-abstract-exception-strategy" minOccurs="0" maxOccurs="unbounded"/>
>
>                      <xsd:element ref="abstract-message-info-mapping" minOccurs="0">
>
>                          <xsd:annotation>
>
>                              <xsd:documentation>
>
> <at> <at> -4374,6 +4381,7 <at> <at>
>
>              <xsd:enumeration value="attachments-list"/>
>
>              <xsd:enumeration value="bean"/>
>
>              <xsd:enumeration value="endpoint"/>
>
> +            <xsd:enumeration value="exception-type"/>
>
>              <xsd:enumeration value="function"/>
>
>              <xsd:enumeration value="groovy"/>
>
>              <xsd:enumeration value="header"/>
>
> <at> <at> -4801,6 +4809,15 <at> <at>
>
>          </xsd:annotation>
>
>      </xsd:element>
>
>
>
> +    <xsd:element name="choice-exception-strategy" type="choiceExceptionStrategyType"
> +                 substitutionGroup="abstract-exception-strategy">
> +        <xsd:annotation>
> +            <xsd:documentation>
> +                Exception strategy used to route to different exception strategies. It will execute the exception strategy which expression attribute matches against MuleMessage. In case there's no match, then default exception strategy will be exeucted.
> +            </xsd:documentation>
> +        </xsd:annotation>
> +    </xsd:element>
> +
>
>      <xsd:element name="exception-strategy" type="referenceExceptionStrategyType"
>
>                   substitutionGroup="abstract-exception-strategy">
>
>          <xsd:annotation>
>
> <at> <at> -4825,6 +4842,24 <at> <at>
>
>          </xsd:complexContent>
>
>      </xsd:complexType>
>
>
>
> +
> +    <xsd:complexType name="choiceExceptionStrategyType">
> +        <xsd:complexContent>
> +            <xsd:extension base="exceptionStrategyType">
> +                <xsd:sequence>
> +                    <xsd:element ref="abstract-exception-strategy" minOccurs="1" maxOccurs="unbounded"/>
> +                </xsd:sequence>
> +                <xsd:attribute name="name" type="substitutableName" use="optional">
> +                    <xsd:annotation>
> +                        <xsd:documentation>
> +                            Name of the exception strategy that will be used in ref attribute of 'exception-strategy' element
> +                        </xsd:documentation>
> +                    </xsd:annotation>
> +                </xsd:attribute>
> +            </xsd:extension>
> +        </xsd:complexContent>
> +    </xsd:complexType>
> +
>
>      <xsd:complexType name="serviceExceptionStrategyType">
>
>          <xsd:complexContent>
>
>              <xsd:extension base="abstractExceptionStrategyType">
>
> Modified: branches/mule-3.x/tests/functional/src/test/java/org/mule/test/config/ExceptionHelperTestCase.java (23767 => 23768)
>
> --- branches/mule-3.x/tests/functional/src/test/java/org/mule/test/config/ExceptionHelperTestCase.java        2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/tests/functional/src/test/java/org/mule/test/config/ExceptionHelperTestCase.java        2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -10,20 +10,27 <at> <at>
>
>
>
>  package org.mule.test.config;
>
>
>
> -import org.mule.api.DefaultMuleException;
> -import org.mule.config.ExceptionHelper;
> -import org.mule.config.i18n.MessageFactory;
> -import org.mule.tck.junit4.AbstractMuleTestCase;
>
> +import static org.junit.Assert.assertEquals;
> +import static org.junit.Assert.assertNotNull;
> +import static org.junit.Assert.assertNull;
> +import static org.junit.Assert.assertThat;
>
>
>
>  import java.util.List;
>
>  import java.util.Map;
>
>
>
> +import org.hamcrest.core.IsInstanceOf;
> +import org.hamcrest.core.IsNull;
>
>  import org.junit.Test;
>
> +import org.mule.api.DefaultMuleException;
> +import org.mule.api.config.ConfigurationException;
> +import org.mule.api.registry.ResolverException;
> +import org.mule.config.ExceptionHelper;
> +import org.mule.config.i18n.CoreMessages;
> +import org.mule.config.i18n.MessageFactory;
> +import org.mule.tck.junit4.AbstractMuleTestCase;
> +import org.mule.tck.size.SmallTest;
>
>
>
> -import static org.junit.Assert.assertEquals;
> -import static org.junit.Assert.assertNotNull;
> -import static org.junit.Assert.assertNull;
> -
>
> + <at> SmallTest
>
>  public class ExceptionHelperTestCase extends AbstractMuleTestCase
>
>  {
>
>
>
> <at> <at> -61,6 +68,21 <at> <at>
>
>          assertNotNull(summary);
>
>      }
>
>
>
> +     <at> Test
> +    public void testGetNonMuleExceptionCause()
> +    {
> +        assertThat(ExceptionHelper.getNonMuleException(new ResolverException(CoreMessages.failedToBuildMessage(), null)), IsNull.<Object>nullValue());
> +        assertThat(ExceptionHelper.getNonMuleException(new ResolverException(CoreMessages.failedToBuildMessage(),
> +                new ConfigurationException(CoreMessages.failedToBuildMessage(), null))), IsNull.<Object>nullValue());
> +        assertThat(ExceptionHelper.getNonMuleException(new ResolverException(CoreMessages.failedToBuildMessage(),
> +                new ConfigurationException(CoreMessages.failedToBuildMessage(),
> +                        new IllegalArgumentException()))), IsInstanceOf.instanceOf(IllegalArgumentException.class));
> +        assertThat(ExceptionHelper.getNonMuleException(new ResolverException(CoreMessages.failedToBuildMessage(),
> +                new ConfigurationException(CoreMessages.failedToBuildMessage(),
> +                        new IllegalArgumentException(new NullPointerException())))), IsInstanceOf.instanceOf(IllegalArgumentException.class));
> +        assertThat(ExceptionHelper.getNonMuleException(new IllegalArgumentException()),IsInstanceOf.instanceOf(IllegalArgumentException.class));
> +    }
> +
>
>      private Exception getException()
>
>      {
>
>          return new DefaultMuleException(MessageFactory.createStaticMessage("foo"), new DefaultMuleException(
>
> Added: branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ChoiceExceptionStrategyTestCase.java (0 => 23768)
>
> --- branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ChoiceExceptionStrategyTestCase.java                               (rev 0)
> +++ branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ChoiceExceptionStrategyTestCase.java       2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,131 <at> <at>
>
> +/*
> + * $Id$
> + * --------------------------------------------------------------------------------------
> + * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
> + *
> + * The software in this package is published under the terms of the CPAL v1.0
> + * license, a copy of which has been included with this distribution in the
> + * LICENSE.txt file.
> + */
> +package org.mule.test.integration.exceptions;
> +
> +import static org.hamcrest.core.Is.is;
> +import static org.junit.Assert.assertThat;
> +
> +import java.sql.SQLDataException;
> +
> +import org.junit.Test;
> +import org.mule.api.MuleEventContext;
> +import org.mule.api.MuleMessage;
> +import org.mule.api.client.MuleClient;
> +import org.mule.api.registry.ResolverException;
> +import org.mule.config.i18n.CoreMessages;
> +import org.mule.tck.functional.EventCallback;
> +import org.mule.tck.functional.FunctionalTestComponent;
> +import org.mule.tck.junit4.FunctionalTestCase;
> +
> +public class ChoiceExceptionStrategyTestCase extends FunctionalTestCase
> +{
> +     <at> Override
> +    protected String getConfigResources()
> +    {
> +        return "org/mule/test/integration/exceptions/choice-exception-strategy.xml";
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionStrategy() throws Exception
> +    {
> +        callVmAndThrowException(new IllegalStateException(),"0 catch-2");
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionStrategyUsingWrapper() throws Exception
> +    {
> +        callVmAndThrowException(new ResolverException(CoreMessages.createStaticMessage(""), new IllegalStateException()), "0 catch-2");
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionStrategyUsingWrapperAndCause() throws Exception
> +    {
> +        callVmAndThrowException(new ResolverException(CoreMessages.createStaticMessage(""), new IllegalStateException(new NullPointerException())), "0 catch-2");
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionStrategyUsingBaseClass() throws Exception
> +    {
> +        callVmAndThrowException(new BaseException(), "0 catch-3");
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionStrategyUsingSubtypeClass() throws Exception
> +    {
> +        callVmAndThrowException(new ResolverException(CoreMessages.createStaticMessage(""), new SubtypeException()), "0 catch-4");
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionStrategyUsingSubtypeSubtypeClass() throws Exception
> +    {
> +        callVmAndThrowException(new SubtypeSubtypeException(), "0 catch-4");
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionStrategyUsingRegex() throws Exception
> +    {
> +        callVmAndThrowException(new AnotherTypeMyException(), "0 catch-5");
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionStrategyUsingGroovyExpressionEvaluator() throws Exception
> +    {
> +        callVmAndThrowException("groovy", new SQLDataException(), "groovy catch-6");
> +    }
> +
> +     <at> Test
> +    public void testMatchesCorrectExceptionUsingNoCause() throws Exception
> +    {
> +        callVmAndThrowException(new ResolverException(CoreMessages.createStaticMessage("")), "{NullPayload}");
> +    }
> +
> +     <at> Test
> +    public void testNoMatchThenCallDefaultExceptionStrategy() throws Exception
> +    {
> +        callVmAndThrowException(new ArithmeticException(),"0 global catch es");
> +    }
> +
> +    private void callVmAndThrowException(final Exception exceptionToThrow, final String expectedMessage) throws Exception
> +    {
> +        callVmAndThrowException("0", exceptionToThrow, expectedMessage);
> +    }
> +
> +    private void callVmAndThrowException(Object payload, final Exception exceptionToThrow, final String expectedMessage) throws Exception
> +    {
> +        MuleClient client = muleContext.getClient();
> +        FunctionalTestComponent ftc = getFunctionalTestComponent("matchesCorrectExceptionStrategyUsingExceptionType");
> +        ftc.setEventCallback(new EventCallback()
> +        {
> +             <at> Override
> +            public void eventReceived(MuleEventContext context, Object component) throws Exception
> +            {
> +                throw exceptionToThrow;
> +            }
> +        });
> +        MuleMessage response = client.send("vm://in", payload, null);
> +        assertThat(response.getPayloadAsString(), is(expectedMessage));
> +    }
> +
> +    public static class BaseException extends Exception
> +    {
> +    }
> +
> +    public static class SubtypeException extends BaseException
> +    {
> +    }
> +
> +    public static class SubtypeSubtypeException extends SubtypeException
> +    {
> +    }
> +
> +    public static class AnotherTypeMyException extends Exception
> +    {
> +    }
> +}
>
> Property changes on: branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ChoiceExceptionStrategyTestCase.java
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Modified: branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ExceptionStrategyConfigurationFailuresTestCase.java (23767 => 23768)
>
> --- branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ExceptionStrategyConfigurationFailuresTestCase.java        2012-01-31 13:24:51 UTC (rev 23767)
> +++ branches/mule-3.x/tests/integration/src/test/java/org/mule/test/integration/exceptions/ExceptionStrategyConfigurationFailuresTestCase.java        2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -9,6 +9,11 <at> <at>
>
>   */
>
>  package org.mule.test.integration.exceptions;
>
>
>
> +import java.util.ArrayList;
> +import java.util.List;
> +import java.util.concurrent.TimeUnit;
> +import java.util.concurrent.atomic.AtomicReference;
> +
>
>  import org.junit.Test;
>
>  import org.mule.api.MuleContext;
>
>  import org.mule.api.MuleException;
>
> <at> <at> -24,11 +29,6 <at> <at>
>
>  import org.mule.tck.junit4.AbstractMuleTestCase;
>
>  import org.mule.util.concurrent.Latch;
>
>
>
> -import java.util.ArrayList;
> -import java.util.List;
> -import java.util.concurrent.TimeUnit;
> -import java.util.concurrent.atomic.AtomicReference;
> -
>
>  public class ExceptionStrategyConfigurationFailuresTestCase extends AbstractMuleTestCase
>
>  {
>
>
>
> <at> <at> -51,6 +51,18 <at> <at>
>
>      }
>
>
>
>       <at> Test(expected = ConfigurationException.class)
>
> +    public void testChoiceExceptionStrategyCantHaveMiddleExceptionStrategyWithoutExpression() throws Exception
> +    {
> +        loadConfiguration("org/mule/test/integration/exceptions/exception-strategy-in-choice-without-expression.xml");
> +    }
> +
> +     <at> Test(expected = ConfigurationException.class)
> +    public void testChoiceExceptionStrategyCantHaveDefaultExceptionStrategy() throws Exception
> +    {
> +        loadConfiguration("org/mule/test/integration/exceptions/default-exception-strategy-in-choice.xml");
> +    }
> +
> +     <at> Test(expected = ConfigurationException.class)
>
>      public void testDefaultEsFailsAsReferencedExceptionStrategy() throws Exception
>
>      {
>
>          loadConfiguration("org/mule/test/integration/exceptions/default-es-as-referenced-exception-strategy.xml");
>
> <at> <at> -62,6 +74,12 <at> <at>
>
>          loadConfiguration("org/mule/test/integration/exceptions/default-exception-strategy-reference-non-existent-es.xml");
>
>      }
>
>
>
> +     <at> Test(expected = ConfigurationException.class)
> +    public void testDefaultExceptionStrategyReferencesExceptionStrategyWithExpression() throws Exception
> +    {
> +        loadConfiguration("org/mule/test/integration/exceptions/default-exception-strategy-reference-has-expression.xml");
> +    }
> +
>
>      private void loadConfiguration(String configuration) throws MuleException, InterruptedException
>
>      {
>
>          MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
>
> Added: branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/choice-exception-strategy.xml (0 => 23768)
>
> --- branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/choice-exception-strategy.xml                         (rev 0)
> +++ branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/choice-exception-strategy.xml 2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,47 <at> <at>
>
> +<?xml version="1.0" encoding="UTF-8"?>
> +<mule xmlns="http://www.mulesoft.org/schema/mule/core"
> +      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +      xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
> +      xmlns:http="http://www.mulesoft.org/schema/mule/http"
> +      xmlns:test="http://www.mulesoft.org/schema/mule/test"
> +      xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
> +       http://www.mulesoft.org/schema/mule/test http://www.mulesoft.org/schema/mule/test/3.2/mule-test.xsd
> +
> +       http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd
> +       http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd">
> +
> +    <catch-exception-strategy name="global-catch" expression="#[exception-type:java.lang.ArithmeticException]">
> +        <append-string-transformer message=" global catch es"/>
> +    </catch-exception-strategy>
> +
> +    <catch-exception-strategy expression="#[exception-type:java.lang.IllegalArgumentException]">
> +        <append-string-transformer message=" catch-1"/>
> +    </catch-exception-strategy>
> +
> +    <flow name="matchesCorrectExceptionStrategyUsingExceptionType">
> +        <vm:inbound-endpoint path="in" exchange-pattern="request-response"/>
> +        <test:component/>
> +        <choice-exception-strategy>
> +            <catch-exception-strategy expression="#[exception-type:java.lang.IllegalArgumentException]">
> +                <append-string-transformer message=" catch-1"/>
> +            </catch-exception-strategy>
> +            <catch-exception-strategy expression="#[exception-type:java.lang.IllegalStateException]">
> +                <append-string-transformer message=" catch-2"/>
> +            </catch-exception-strategy>
> +            <catch-exception-strategy expression="#[exception-type:=org.mule.test.integration.exceptions.ChoiceExceptionStrategyTestCase$BaseException]">
> +                <append-string-transformer message=" catch-3"/>
> +            </catch-exception-strategy>
> +            <catch-exception-strategy expression="#[exception-type:org.mule.test.integration.exceptions.ChoiceExceptionStrategyTestCase$SubtypeException]">
> +                <append-string-transformer message=" catch-4"/>
> +            </catch-exception-strategy>
> +            <catch-exception-strategy expression="#[exception-type:(.*)mule.test.integration.(.*).ChoiceExceptionStrategyTestCase(.*)MyException]">
> +                <append-string-transformer message=" catch-5"/>
> +            </catch-exception-strategy>
> +            <catch-exception-strategy expression="#[groovy:payload.equals('groovy')]">
> +                <append-string-transformer message=" catch-6"/>
> +            </catch-exception-strategy>
> +            <exception-strategy ref="global-catch"/>
> +        </choice-exception-strategy>
> +    </flow>
> +
> +</mule>
>
> Property changes on: branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/choice-exception-strategy.xml
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Added: branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-in-choice.xml (0 => 23768)
>
> --- branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-in-choice.xml                              (rev 0)
> +++ branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-in-choice.xml      2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,15 <at> <at>
>
> +<?xml version="1.0" encoding="UTF-8"?>
> +<mule xmlns="http://www.mulesoft.org/schema/mule/core"
> +      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +      xsi:schemaLocation="
> +       http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd">
> +
> +    <flow name="flowA">
> +        <logger/>
> +        <choice-exception-strategy name="choice">
> +            <catch-exception-strategy expression="#[exception-type:java.lang.NullPointerException]"/>
> +            <defaul-exception-strategy/>
> +        </choice-exception-strategy>
> +    </flow>
> +
> +</mule>
>
> Property changes on: branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-in-choice.xml
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Added: branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-reference-has-expression.xml (0 => 23768)
>
> --- branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-reference-has-expression.xml                               (rev 0)
> +++ branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-reference-has-expression.xml       2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,12 <at> <at>
>
> +<?xml version="1.0" encoding="UTF-8"?>
> +<mule xmlns="http://www.mulesoft.org/schema/mule/core"
> +      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +      xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
> +      xsi:schemaLocation="
> +       http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd">
> +
> +    <configuration defaultExceptionStrategy-ref="exception-strategy-with-expression"/>
> +
> +    <catch-exception-strategy expression="#[exception-type:something]" name="exception-strategy-with-expression"/>
> +
> +</mule>
>
> Property changes on: branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/default-exception-strategy-reference-has-expression.xml
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> Added: branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/exception-strategy-in-choice-without-expression.xml (0 => 23768)
>
> --- branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/exception-strategy-in-choice-without-expression.xml                           (rev 0)
> +++ branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/exception-strategy-in-choice-without-expression.xml   2012-01-31 16:08:45 UTC (rev 23768)
>
> <at> <at> -0,0 +1,17 <at> <at>
>
> +<?xml version="1.0" encoding="UTF-8"?>
> +<mule xmlns="http://www.mulesoft.org/schema/mule/core"
> +      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +      xsi:schemaLocation="
> +       http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd">
> +
> +    <choice-exception-strategy name="choice">
> +        <catch-exception-strategy/>
> +        <catch-exception-strategy/>
> +    </choice-exception-strategy>
> +
> +    <flow name="flowA">
> +        <logger/>
> +        <exception-strategy ref="choice"/>
> +    </flow>
> +
> +</mule>
>
> Property changes on: branches/mule-3.x/tests/integration/src/test/resources/org/mule/test/integration/exceptions/exception-strategy-in-choice-without-expression.xml
>
> ___________________________________________________________________
>
> Added: svn:keywords
> Added: svn:eol-style
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>


<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
   <a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>
</p>


Pablo La Greca | 1 Feb 16:45

Re: [mule-scm] [mule][23775] branches/mule-3.2.x/transports/jms/src/main/java/org/mule/ transport/jms/XaTransactedJmsMessageReceiver.java: MULE-6051 - closing message consumers when no message is received

Adding a test case to verify this issue is going to take same time and mule 3.2.2 branches are about to be created. I will try to add it in mule 3.x branch.

On Tue, Jan 31, 2012 at 8:05 PM, Daniel Feist <dfeist <at> gmail.com> wrote:
Not possible to include a test case for this issue?


On Jan 31, 2012, at 6:15 PM, pablo.lagreca-yCVjj/EcxBJg9hUCZPvPmw@public.gmane.org wrote:

Revision 23775 Author pablo.lagreca Date 2012-01-31 15:15:36 -0600 (Tue, 31 Jan 2012)

Log Message

MULE-6051 - closing message consumers when no message is received

Modified Paths

Diff

Modified: branches/mule-3.2.x/transports/jms/src/main/java/org/mule/transport/jms/XaTransactedJmsMessageReceiver.java (23774 => 23775)

--- branches/mule-3.2.x/transports/jms/src/main/java/org/mule/transport/jms/XaTransactedJmsMessageReceiver.java 2012-01-31 21:06:38 UTC (rev 23774) +++ branches/mule-3.2.x/transports/jms/src/main/java/org/mule/transport/jms/XaTransactedJmsMessageReceiver.java 2012-01-31 21:15:36 UTC (rev 23775) <at> <at> -241,6 +241,7 <at> <at> { tx.setRollbackOnly(); } + closeConsumerIfRequired(consumer); return null; } message = connector.preProcessMessage(message, session); <at> <at> -275,10 +276,22 <at> <at> MuleMessage messageToRoute = createMuleMessage(message, endpoint.getEncoding()); routeMessage(messageToRoute); - connector.closeQuietly(consumer); + closeConsumerIfRequired(consumer); return null; } + private void closeConsumerIfRequired(MessageConsumer consumer) + { + if (!this.reuseConsumer) + { + connector.closeQuietly(consumer); + if (context.getContext() != null) + { + context.getContext().consumer = null; + } + } + } + <at> Override protected void processMessage(Object msg) throws Exception {

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email



Daniel Feist | 1 Feb 16:51
Picon

Re: [mule-scm] [mule][23775] branches/mule-3.2.x/transports/jms/src/main/java/org/mule/ transport/jms/XaTransactedJmsMessageReceiver.java: MULE-6051 - closing message consumers when no message is received

Add it in 3.2.x when you get chance and then merge up, so we have the coverage in 3.2.x too. Although a 3.2.2 branch has been created, 3.2.x is still there willing to take new bug fixes and tests :-)

On Feb 1, 2012, at 12:45 PM, Pablo La Greca wrote:

Adding a test case to verify this issue is going to take same time and mule 3.2.2 branches are about to be created. I will try to add it in mule 3.x branch.

On Tue, Jan 31, 2012 at 8:05 PM, Daniel Feist <dfeist-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Not possible to include a test case for this issue?


On Jan 31, 2012, at 6:15 PM, pablo.lagreca-yCVjj/EcxBJg9hUCZPvPmw@public.gmane.org wrote:

Revision 23775 Author pablo.lagreca Date 2012-01-31 15:15:36 -0600 (Tue, 31 Jan 2012)

Log Message

MULE-6051 - closing message consumers when no message is received

Modified Paths

Diff

Modified: branches/mule-3.2.x/transports/jms/src/main/java/org/mule/transport/jms/XaTransactedJmsMessageReceiver.java (23774 => 23775)

--- branches/mule-3.2.x/transports/jms/src/main/java/org/mule/transport/jms/XaTransactedJmsMessageReceiver.java 2012-01-31 21:06:38 UTC (rev 23774) +++ branches/mule-3.2.x/transports/jms/src/main/java/org/mule/transport/jms/XaTransactedJmsMessageReceiver.java 2012-01-31 21:15:36 UTC (rev 23775) <at> <at> -241,6 +241,7 <at> <at> { tx.setRollbackOnly(); } + closeConsumerIfRequired(consumer); return null; } message = connector.preProcessMessage(message, session); <at> <at> -275,10 +276,22 <at> <at> MuleMessage messageToRoute = createMuleMessage(message, endpoint.getEncoding()); routeMessage(messageToRoute); - connector.closeQuietly(consumer); + closeConsumerIfRequired(consumer); return null; } + private void closeConsumerIfRequired(MessageConsumer consumer) + { + if (!this.reuseConsumer) + { + connector.closeQuietly(consumer); + if (context.getContext() != null) + { + context.getContext().consumer = null; + } + } + } + <at> Override protected void processMessage(Object msg) throws Exception {

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email




Yuji YAMANO | 1 Feb 23:53
Picon
Favicon

Re: Japanese Character code conversion Support

It depends on JRE version. You can find it on docs.oracle.com.

Here is the list for version 7. 

http://docs.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html

On Wed, 01 Feb 2012 02:42:11 -0800 (PST), Narayanan Narayanan
<mule.dev.relay@...> wrote:

> Thanks for your reply.Can u provide me list of supported character code formats(like UTF-8...) for
mule.If possible give me some links regarding this.

--

-- 
Yuji Yamano
OGIS International, Inc.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Santiago Vacas | 2 Feb 01:01
Gravatar

Re: [mule-scm] [mule][23789] branches/mule-3.x/transports/sftp: SFTP test reactivation

it seems you missed some classes:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
(default-testCompile) on project mule-transport-sftp: Compilation
failure: Compilation failure:
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/AbstractSftpTestCase.java:[38,35]
cannot find symbol
[ERROR] symbol  : class SftpServer
[ERROR] location: package org.mule.transport.sftp.util
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/AbstractSftpTestCase.java:[84,14]
cannot find symbol
[ERROR] symbol  : class SftpServer
[ERROR] location: class org.mule.transport.sftp.AbstractSftpTestCase
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCantCreateTempDirectoryTestCase.java:[16,30]
cannot find symbol
[ERROR] symbol  : class LatchDownExceptionListener
[ERROR] location: package org.mule.transport.sftp
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpWrongPassPhraseOnOutboundDirectoryTestCase.java:[30,35]
cannot find symbol
[ERROR] symbol  : class SftpServer
[ERROR] location: package org.mule.transport.sftp.util
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCheckDuplicateFileHandlingTestCase.java:[22,30]
cannot find symbol
[ERROR] symbol  : class LatchDownExceptionListener
[ERROR] location: package org.mule.transport.sftp
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCheckDuplicateFileHandlingTestCase.java:[24,35]
cannot find symbol
[ERROR] symbol  : class SftpServer
[ERROR] location: package org.mule.transport.sftp.util
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCheckDuplicateFileHandlingTestCase.java:[61,19]
cannot find symbol
[ERROR] symbol  : class SftpServer
[ERROR] location: class
org.mule.transport.sftp.dataintegrity.SftpCheckDuplicateFileHandlingTestCase
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/AbstractSftpTestCase.java:[1339,25]
cannot find symbol
[ERROR] symbol  : class SftpServer
[ERROR] location: class org.mule.transport.sftp.AbstractSftpTestCase
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCantCreateTempDirectoryTestCase.java:[75,45]
cannot find symbol
[ERROR] symbol  : class LatchDownExceptionListener
[ERROR] location: class
org.mule.transport.sftp.dataintegrity.SftpCantCreateTempDirectoryTestCase
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCheckDuplicateFileHandlingTestCase.java:[95,25]
cannot find symbol
[ERROR] symbol  : class SftpFilePresentProbe
[ERROR] location: class
org.mule.transport.sftp.dataintegrity.SftpCheckDuplicateFileHandlingTestCase
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCheckDuplicateFileHandlingTestCase.java:[97,25]
cannot find symbol
[ERROR] symbol  : class SftpFilePresentProbe
[ERROR] location: class
org.mule.transport.sftp.dataintegrity.SftpCheckDuplicateFileHandlingTestCase
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCheckDuplicateFileHandlingTestCase.java:[109,25]
cannot find symbol
[ERROR] symbol  : class SftpFilePresentProbe
[ERROR] location: class
org.mule.transport.sftp.dataintegrity.SftpCheckDuplicateFileHandlingTestCase
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCheckDuplicateFileHandlingTestCase.java:[111,41]
cannot find symbol
[ERROR] symbol  : class LatchDownExceptionListener
[ERROR] location: class
org.mule.transport.sftp.dataintegrity.SftpCheckDuplicateFileHandlingTestCase
[ERROR] ce/transports/sftp/src/test/java/org/mule/transport/sftp/dataintegrity/SftpCheckDuplicateFileHandlingTestCase.java:[139,25]
cannot find symbol
[ERROR] symbol  : class SftpServer
[ERROR] location: class
org.mule.transport.sftp.dataintegrity.SftpCheckDuplicateFileHandlingTestCase

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane