Search code examples
javaajaxtapestry

Threads Tapestry 5.3.8 vs 5.4.3


I've got an issue with threads in tapesty.

I have application that is using tapestry. When I updated from 5.3.8 to 5.4.3 I've found that my ajax request are not handled in separate thread.

For example: I have a long process that was executed in controller/class. However, I've got also a JS script that is generating ajax request for a component. In Tapestry 5.3.8 those request were handeled normaly. When I switch to 5.4.3 my request are not handeled, unitl my main process from controller ends.

Does anyone know something regarding this behaviour?


Solution

  • After some digging in Tapestry JIRA I've found an answer:

    Link 1

    Link 2

    A short sum up: from Tapestry 5.4 Session object is synchronized, and even read operation requires writelock. So all "long" operations should be run in separate threads to get ajax calls working (to not get GUI thread frozen).

    EDIT: In mailing list I have also got a hint to use confirguation parameter tapestry.session-locking-enabled