1 2 Previous Next 21 Replies Latest reply on Feb 20, 2009 4:11 AM by Joram Barrez

    statefull vs stateless delegation classes

    Tom Baeyens Master

      can we safely assume that all delegation classes are stateless ?

      when a process calls out to a user class, this can be done by specifying the classname and some configuration injections. there are various use cases of delegation classes: Assigner's (aka AssignmentHandlers), EventListeners (aka Actions) and so on.

      with delegation classes being stateless i mean that execution of those delegation classes will not update their member field. so after construction (incl injecting configuration) they can be considered immutable.

      if that is the case, those objects become thread safe and cacheble.

      we didn't assume this in jbpm 3 and hence instantiated each object each time as there is no good way of introducing caching.

      so...

      can we safely assume that all delegation classes are stateless as the default ?

        1 2 Previous Next