5 Replies Latest reply on Jul 7, 2009 12:08 PM by kukeltje

    Java calls and per-thread model for Spring/Tapestry5 service

    jugglingcats

      Hi, I've done a bit of work to wire Tapestry5 IOC into jBPM4, very similar to the method used by SpringConfiguration in the distro. I can now do Tapestry dependency injection on my classes used by custom/decision/etc nodes which makes me very happy!

      Now Tapestry has a @PerThread annotation which can be very useful when using a service which might be used multiple times across multiple services in a thread of execution but needs to be cleaned up when the thread completes.

      Is there any suitable point at which we can hook into the completion of a Java call from a node to do the thread cleanup? I think it would be safest initially to do this around each discrete Java call rather than try to be clever and define a wider scope for the thread.

      Many thanks, Alfie.