-
1. Re: Need help, new to seam
lvdberg Nov 21, 2009 9:38 PM (in response to krzyswi)Hi,
You have to look at two things to solve your problem. First you need an Application-Scoped bean which run as a type of singleton process. Next you need to look at the Observer pattern, which is implemented as a Observer annotation on the method you want to call. This methods get called when you raise an event in your application, which can be done with the Events component.
These things are very good explained in the Seam documentation. If that isn' clear enough don't hesitate to ask
Leo
-
2. Re: Need help, new to seam
krzyswi Nov 22, 2009 11:06 AM (in response to krzyswi)Hi,
Thanks, events was the first thing that came to my mind, but as far as I know, whenever an event is thrown the observer is fired, isn't it? What I want to do is to wait for a signal, then do my processing, then wait again. If multiple events are risen, my observer will be fired several times in parallel won't it? Maybe there's a way to define an event in such a way, that when this event is already risen and being handled, rising it again does nothing?
K.
-
3. Re: Need help, new to seam
lvdberg Nov 22, 2009 1:23 PM (in response to krzyswi)You can use timeevent, meaning after firing the event it will start a timer process. What you can do is use two different methods on one bean each with a specific event signatuse.