Hi Alex,

hmm, good point. The reason why I introduced that try-catch was to
ensure that 3rd party listeners can not prevent events logged in the
execution history via saveEvent...

But you're totally right, it's definitely important that other
listeners can be transactional as well. So, similar idea, wrong
solution on my part... I'll remove the try catch again and put a
comment to the listener interface that it is important to carefully
think about exception handling inside the eventlistener itself.

Thanks for pointing that out!

Cheers,
  Tammo



2007/10/19, Alex Boisvert <[EMAIL PROTECTED]>:
> Hi Tammo,
>
> Related to this commit, I tend to think it's better to let the
> BpelEventListener runtime exceptions bubble up to the engine and force a
> transaction rollback by default rather than catching everything and
> outputting a warning.   This allows event logging to be transactional/atomic
> together with the engine (very desired).    If event loss is tolerated, the
> exception handling/masking can happen inside the EventListener itself.
>
> What do you think?
>
> alex
>
>
>
> On 10/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Author: vanto
> > Date: Fri Oct 19 08:57:27 2007
> > New Revision: 586512
> >
> > URL: http://svn.apache.org/viewvc?rev=586512&view=rev
> > Log:
> > fixes ODE-199 in 1.1 branch
> >
> > Modified:
> >
> >     
> > ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
> >
> >     
> > ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
> >
> >     
> > ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
> >
> > Modified:
> > ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
> > URL:
> > http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java?rev=586512&r1=586511&r2=586512&view=diff
> >
> > ==============================================================================
> > ---
> > ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
> > (original)
> > +++
> > ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
> > Fri Oct 19 08:57:27 2007
> > @@ -419,7 +419,12 @@
> >          // Note that the eventListeners list is a copy-on-write array, so
> > need
> >          // to mess with synchronization.
> >          for (org.apache.ode.bpel.iapi.BpelEventListener l :
> > _contexts.eventListeners) {
> > -            l.onEvent(event);
> > +               try {
> > +                       l.onEvent(event);
> > +               } catch (Throwable t) {
> > +                       // catch all possible exceptions
> > +                       __log.warn("Got an exception while notifying
> > BpelEventListener '" + l + "'.", t);
> > +               }
> >          }
> >      }
> >
>


-- 
Tammo van Lessen - [EMAIL PROTECTED] - http://www.taval.de

Reply via email to