You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Juan Manuel Diaz Lara <jm...@yahoo.com.INVALID> on 2017/10/12 18:14:13 UTC

Cayenne-Tapestry integration problem

I devoloped a module to integrate cayenne into apache-tapestry, using cayenne 4.0.M5 and tapestry 5.4.3...
I the module I create a single ServerRuntime for mi web app, then, on each request I call serverRuntime.newContext(); to get a new fresh ObjectContext, but some way I get the same results in my queries all the time, even if i change my data outsise de app (in a external sql tool, by instance, and commiting of course)... this seems like cayenne is caching database results and not going to DB for each query, but I am not configuring any caching.
The only way I can get fresh results calling invalidateObjects() on returned results, but this is a workround.
I am sure I am creating new context on each request.
Any insight would be appreciated.



Atte. Juan Manuel Díaz Lara

Re: Cayenne-Tapestry integration problem

Posted by Juan Manuel Diaz Lara <jm...@yahoo.com.INVALID>.
Thanks, that was the correct answer. I had no seen thar property before because my app was client-server.

Atte. Juan Manuel Díaz Lara 

    On Thursday, October 12, 2017, 3:17:47 PM CDT, Juan Manuel Diaz Lara <jm...@yahoo.com.INVALID> wrote:  
 
 Yes!!! I will try whitout it and report result.  Thanks.


Atte. Juan Manuel Díaz Lara 

    On Thursday, October 12, 2017, 1:14:30 PM CDT, Juan Manuel Diaz Lara <jm...@yahoo.com.INVALID> wrote:  
 
 I devoloped a module to integrate cayenne into apache-tapestry, using cayenne 4.0.M5 and tapestry 5.4.3...
I the module I create a single ServerRuntime for mi web app, then, on each request I call serverRuntime.newContext(); to get a new fresh ObjectContext, but some way I get the same results in my queries all the time, even if i change my data outsise de app (in a external sql tool, by instance, and commiting of course)... this seems like cayenne is caching database results and not going to DB for each query, but I am not configuring any caching.
The only way I can get fresh results calling invalidateObjects() on returned results, but this is a workround.
I am sure I am creating new context on each request.
Any insight would be appreciated.



Atte. Juan Manuel Díaz Lara  

Re: Cayenne-Tapestry integration problem

Posted by Juan Manuel Diaz Lara <jm...@yahoo.com.INVALID>.
Yes!!! I will try whitout it and report result.  Thanks.


Atte. Juan Manuel Díaz Lara 

    On Thursday, October 12, 2017, 1:14:30 PM CDT, Juan Manuel Diaz Lara <jm...@yahoo.com.INVALID> wrote:  
 
 I devoloped a module to integrate cayenne into apache-tapestry, using cayenne 4.0.M5 and tapestry 5.4.3...
I the module I create a single ServerRuntime for mi web app, then, on each request I call serverRuntime.newContext(); to get a new fresh ObjectContext, but some way I get the same results in my queries all the time, even if i change my data outsise de app (in a external sql tool, by instance, and commiting of course)... this seems like cayenne is caching database results and not going to DB for each query, but I am not configuring any caching.
The only way I can get fresh results calling invalidateObjects() on returned results, but this is a workround.
I am sure I am creating new context on each request.
Any insight would be appreciated.



Atte. Juan Manuel Díaz Lara  

Re: Cayenne-Tapestry integration problem

Posted by Michael Gentry <bl...@gmail.com>.
Hi Juan,

In your Data Domain configuration (highest level item) in Cayenne Modeler,
do you have Use Shared Cache checked?


On Thu, Oct 12, 2017 at 2:14 PM, Juan Manuel Diaz Lara <
jmdiazlr@yahoo.com.invalid> wrote:

> I devoloped a module to integrate cayenne into apache-tapestry, using
> cayenne 4.0.M5 and tapestry 5.4.3...
> I the module I create a single ServerRuntime for mi web app, then, on each
> request I call serverRuntime.newContext(); to get a new fresh
> ObjectContext, but some way I get the same results in my queries all the
> time, even if i change my data outsise de app (in a external sql tool, by
> instance, and commiting of course)... this seems like cayenne is caching
> database results and not going to DB for each query, but I am not
> configuring any caching.
> The only way I can get fresh results calling invalidateObjects() on
> returned results, but this is a workround.
> I am sure I am creating new context on each request.
> Any insight would be appreciated.
>
>
>
> Atte. Juan Manuel Díaz Lara