commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Niederwieser <>
Subject Re: JavaFlow: Prevent method from being instrumented
Date Sun, 03 Aug 2008 23:41:28 GMT

Thanks for the quick reply. Just wanted to go sure that excluding individual
methods is not possible as of now. Maybe you'd be interested to hear what
"your" software is used for: I'm developing a workflow engine where
workflows are described in a Scala-based DSL and communicate with remote
services over JMS. The use of continuations has several benefits:
- Workflows don't block a thread when waiting for messages
- Workflows can be written in a sequential as opposed to CPS style (cf.
Scala actors)
- Workflows can be persisted to disk so that they survive a system crash

A (simple) workflow definition currently looks like this:

class BookingWorkflow extends Workflow(classOf[BookingEvent]) {
  def service = new BookingService {
    timeout = 1.hour

  when {
    event.destination oneOf ("Hawai", "Maldives")

  then { {
      case x: BookingSuccess => succeed(x.bookingNumber)
      case x: BookingFailure => fail(x.message)

As you can imagine, class Workflow defines many more methods which can be
used from within a then-block. However, only a few of them (such as need to wait for a response message and therefore suspend.
Most other methods (such as succeed(), fail(), and all the synthetic methods
inserted by the Scala compiler) don't. So it would be handy to have some
control over what methods are (not) instrumented.
I recently came across a post of yours where you say that quite a few things
need to be fixed before a 1.0 release of JavaFlow. Is there a document
(JIRA?) describing all known problems and limitations, or could you
(briefly) list them here? So far my research only revealed that there seems
to be a problem with try-catch-finally.


Torsten Curdt wrote:
> Hey Peter,
> Of course this *could* be added. Not sure it's really worth the effort  
> though.
> You sure you can't separate your flow better instead?

View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message