1 Reply Latest reply on Jul 7, 2010 10:25 AM by Nikolay Elenkov

    asynchronous events

    Charles Akalugwu Newbie


      I was wondering...is there a limit on the number of asynchronous seam events that can be fired from a particular method? My problem is that I have a method which does some work and then at the end of the block, I make 3 asynchronous calls to 3 different conversation-scoped beans which have the appropriate observers to handle the corresponding event. I pass around event objects to the async calls but right now, for some reason, sometimes I receive null whenever those objects arrive at the observers. The weirdest thing is that sometimes I receive the objects and other times, I receive null. As far as I know, there is no exact way to reproduce this problem. Does anyone have an idea? And btw, the event objects passed around are properties of an entity bean. In this case, the User entity bean. Thanks in advance for any helpful insights.

        • 1. Re: asynchronous events
          Nikolay Elenkov Master

          There shouldn't be a limit. If you are using the thread pool dispatcher, the number of concurrent calls is limited by the number of threads in the pool (10 by default). Not exactly clear what you are doing, but if with async events you cannot rely on conversation state. If you are passing objects that live in conversation, they might get removed before your observer gets  to run.