3 Replies Latest reply on Nov 13, 2008 9:40 AM by luxspes

    synchronization of page scoped components?

    tomkramer

      synchronization of page scoped components?


      we are using page scoped controllers, that handle ajax requests from one particular facelet page.


      for some of these ajax calls, we found that seam did not inject the dependencies. after debugging, we discovered,
      what the cause was:


      when a thread enters the org.jboss.seam.core.BijectionInterceptor it sets reentrant to true, injects all dependencies and
      calls the intercepted method.
      when there is a second (ajax) call before this first call returned, reentrant is still true and no injection happens at all.


      the docs  say, that calls conversation scoped components are always synchronized, so this behaviour would not happen -
      is this right?
      what is the best way to to this with page scoped components?
      should we mark all page scoped components, that participate in ajax calls (and of course all the components these components have dependencies on) with @Synchronized ?
      years ago, everybody told you, not to do synchronization in webapps, as its to expensive.


      is the performance penalty of synchronization in the current jvm implementations already neglectable?


      saludos,
      tom