Re: Publisher - Subscriber pattern for Tapestry Service

abangkis <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <CAGqeSzUzrJxw62S_PJ=Obd7e6C0uzh50SBV9PMqZUTjMCTVnzg@mail.gmail.com>
I was thinking because of how the Services implementation & instantiation
is managed by tapestry. How the service is injected instead of manually
created.

Thanks for the hint, I will look at those files source code.

On Mon, Jun 19, 2017 at 7:22 PM, Thiago H. de Paula Figueiredo <
[email protected]> wrote:

> On Sun, Jun 18, 2017 at 12:52 PM, abangkis <[email protected]> wrote:
>
> > Lets say I have a hashtag entity that i stored in the database and
> managed
> > by HashtagDAO (a tapestry service).  And then i have a
> TwitterParserService
> > that check if a tweet contain a hashtag that i saved in the database. The
> > problem, if someone add or changed the hashtag in the database i want the
> > TwitterParserService to immediately know about the change and check the
> > tweet using the new hashtags.
> >
> > In j2se it will be a straight forward pub-sub/observer pattern. Just
> create
> > an interface for the listener, let the TwitterParserService implement it
> > and set as the default listener, and invoke it from HashtagDAO. But i
> don't
> > think it would work with tapestry services class.
> >
>
> Why wouldn't it work? Tapestry itself uses this: LinkCreationHub,
> RegistryStartup, InvalidationEventHub, RegistryShutdownHub,
> UpdateListenerHub, and that's just the ones I've found in a two-minute
> search. It would all be synchrononous, though, and messaging services, as
> far as I know, are asynchronous.
>
> --
> Thiago
>



-- 
http://www.mreunionlabs.net/ <http://www.mreunion-labs.net/>
twitter : @mreunionlabs @abangkis
page : https://plus.google.com/104168782385184990771
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.