cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Reich <markus.re...@markusreich.at>
Subject Re: Change data by an external process (non cayenne)
Date Thu, 16 May 2013 09:14:33 GMT
:-) sorry, I try it more detailed

I have a multiuser Tomcat Webapp, the DB (Oracle) is also updated by other
processes. A refresh is not enough to show the changed data, so my idea is
to make a servlet, which invalidates certain DataObjects (mostly it's just
one) of all thread binded contexts.
So when the user refreshes the UI and the data gets selected again, the
changed values are shown.
So it would be enough to make object hollow.

Markus


2013/5/16 Andrus Adamchik <andrus@objectstyle.org>

> The question is too generic, so the answer is "yes" :) Could you describe
> the scenario in a bit more detail?
>
> Also does your interface needs to know when an object is invalidated right
> at that moment or is it enough to make the object "hollow" so that it is
> refetched lazily on next access?
>
> Andrus
>
> On May 16, 2013, at 7:52 AM, Markus Reich <markus.reich@markusreich.at>
> wrote:
> > would it be possible to work with a servlet to invalidate certain
> objects?
> >
> > Is there a way to get all ObjectStores of all Threads or is the only
> > solution to set the DataContext as attribute in the session?
> >
> >
> > 2013/5/15 Andrus Adamchik <andrus@objectstyle.org>
> >
> >> I'd use query.setCacheStrategy(..) / query.setCacheGroups(..) to cache
> the
> >> results, and then define expiration time for a given set of cache groups
> >> for whatever cache provider is in use (EhCache most likely, so this
> will go
> >> into ehcache.xml).
> >>
> >> If you want real-time refresh, EhCache might be configured to listen to
> >> cache group refresh events via JMS. Your external process would send
> such
> >> events via ActiveMQ (that supports a bunch of command-line friendly
> >> protocols, not just JMS) whenever the data is changed.
> >>
> >> Andrus
> >>
> >>
> >> On May 15, 2013, at 4:28 PM, Markus Reich <markus.reich@markusreich.at>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> is there really no better way than described here:
> >>> http://markmail.org/message/plnaj4zj4gxrt6hk
> >>>
> >>> regards
> >>> Meex
> >>
> >>
> >
> >
> > --
> > *Markus Reich*
> > Moosbach 28/2
> > 6392 St. Jakob i.H.
> > www.markusreich.at / www.meeximum.at
> > markus.reich@markusreich.at
>
>


-- 
*Markus Reich*
Moosbach 28/2
6392 St. Jakob i.H.
www.markusreich.at / www.meeximum.at
markus.reich@markusreich.at

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message