[jira] Closed: (CAY-1003) the paged queries in ROP can fail to fetch the subsequent pages if the client and server are in different timezones

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Fri Mar 07 2008 - 04:53:16 EST

  • Next message: Aristedes Maniatis: "Re: Improving memory use [Was: [jira] Created: (CAY-999) Scaling paginated list]"

         [ https://issues.apache.org/cayenne/browse/CAY-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Andrus Adamchik closed CAY-1003.
    --------------------------------

           Resolution: Fixed
        Fix Version/s: 3.0

    fixed. Indeed this was a problem when explicit caching was used

    > the paged queries in ROP can fail to fetch the subsequent pages if the client and server are in different timezones
    > -------------------------------------------------------------------------------------------------------------------
    >
    > Key: CAY-1003
    > URL: https://issues.apache.org/cayenne/browse/CAY-1003
    > Project: Cayenne
    > Issue Type: Bug
    > Components: Cayenne Core Library
    > Affects Versions: 3.0
    > Environment: ROP, paging, LOCAL_CACHE with no setCacheGroups specified , cayenne v.3.0-SNAPSHOT Mar 05 2008 22:29:23, multiple timezones
    > Reporter: Marcin Skladaniec
    > Assignee: Andrus Adamchik
    > Fix For: 3.0
    >
    >
    > if the client and server are in different timezone and the executed query has an qualifier like this:
    > ExpressionFactory.greaterOrEqualExp(CourseClass.ENDDATETIME_PROPERTY, new Date())
    > there is a possibility of a mismatch between the keys identifying the cache.
    > What happens I believe is that the initial SelectQuery creates the key on server, using the server timezone, while the query which faults the following page of data creates the key on client. My assumptions are based on the exception we see when we are trying to connect across timezones (we are in EST, server is in WST):
    > org.apache.cayenne.CayenneRuntimeException: [v.3.0-SNAPSHOT Mar 05 2008 22:29:23] Remote error. URL - http://ahost:8181/angel-server-cayenne; CAUSE - [v.3.0-SNAPSHOT Mar 05 2008 22:29:23] No cached list for CourseClass/((endDateTime >= Fri Mar 07 12:45:17 EST 2008) or (endDateTime = null)) and (isCancelled != true)/course.name
    > at org.apache.cayenne.access.ClientServerChannelQueryAction.interceptSinglePageQuery(ClientServerChannelQueryAction.java:99)
    > at org.apache.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java:65)
    > at org.apache.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:82)
    > at org.apache.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:40)
    > at org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:153)
    > at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
    > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Fri Mar 07 2008 - 04:54:48 EST