Re: Problems with caching

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Feb 09 2006 - 18:02:32 EST

  • Next message: Andrus Adamchik: "Re: Has cayenne trigger"

    On Feb 9, 2006, at 4:39 PM, Marcin Skladaniec wrote:
    > Caching as for now works only with queries with name, and that is
    > all NamedQueries and SelectQuery initialized with
    > queryWithParameters(Map params, boolean pruneMissing) (did I miss
    > something ?). I think that exception telling that is consumed
    > somewhere and never displayed.

    Marcin, I don't think Ayhan's items (2) and (3) are related to the
    query name.

    On Feb 9, 2006, at 10:53 AM, Ayhan Kondoz wrote:

    > (2) Caching of objects that have a relationship to the customer.
    > Meaning
    > that if the first SOAP call accesses the accounts of a customer
    > subsequent SOAP calls should NOT read them from the database
    > again.
    > The
    > accounts should be cached along with the customer and calls to
    > Customer().getAccount() should read the accounts from cache.

    To-many relationships can only be cached within the same DataContext.
    Across DataContexts only individual objects can be cached (and most
    to-one relationships). It looks like your [customer -> account] is
    one-to-many? 1.2 would allow such caching to occur with nested
    DataContexts soon (but not yet).

    For now you may implement a custom workaround with a cover "getAccount
    ()" method that inflates accounts array (if it is not inflated yet)
    from a custom cache via DataContext.objectsFromSnapshots(..)

    > JavaGroups seems to work fine, at least the McastReceiverTest and
    > McastSenderTest from the JavaGroups documentation works.
    > Nevertheless the snapshot events do not reach the other servers.

    Don't know. Can you see any outgoing multicast traffic from your app?
    Or can you run your app in debugger (e.g. in Eclipse) and put a
    breakpoint in org.objectstyle.cayenne.event.JavaGroupsBridge

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu Feb 09 2006 - 18:02:32 EST