Anyway, do you have different web sessions (and DataContexts) in steps 4 & 5? If so, there maybe some caching issues. You can post the details on cayenne-user list. Myself or other folks will most definitely try to help.
Also, you may know this already, but just in case.
1. To do logging of individual selects, do something like:
myQuery.setLoggingLevel(Level.WARN)
2. To do logging of individual commits, do
myDataContext.commitCHanges(Level.WARN)
3. To lower the logging threshold of *all* database operations, configure log4j for "org.objectstyle.cayenne.access.QueryLogger" with level lower then INFO. For instance in the code you can force using your custom logging file by calling static method:
Configuration.configCommonLogging(urlOfLog4JConfig)
Cheers
Andrus
Geoff Longman writes:
Usually when I need to debug these things (the closest example I have is
when using TOPLink) is
to watch the sql log and monitor the backend interaction. I don't know if
you are TOPLink savy but we had a similar case where
we thought that changes were not being reflected but it turned out that the
two 'views' were coming off separate UnitOfWork instances (one was out of
sync of course).
----- Original Message -----
From: "Neil Clayton" <[EMAIL PROTECTED]>
To: "Geoff Longman" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 2:41 AM
Subject: Re: [Tapestry-developer] Cached Page State
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sorry, I'll be more specific:
1) I go to a page to adminster data - 'recent change' data. Each element
representing some chunck of work.
2) T renders the page, using data in a collection, which came from Cayenne
3) I click on some element to remove it
4) the page is resubmitted, and the element removed
5) If I then go to the user based recent changes page, where all of the data
is displayed, the change is not visiable (e.g: the record is still there) -
even though it's no longer in the DB.
Having just typed all of this, I realise that it could be Cayenne, and that
there is more I can do debugging wise before throwing my hands in the air!
I will go debug.
But at least you know where I'm coming from.
It seems ... weeeeird.
Neil
On Monday 11 Nov 2002 9:09 pm, Geoff Longman wrote:
What do you mean when you say "I've got some pages backed by Cayenne"?
What is being provided from the backend? Where is it getting put?
You can expire pages by calling
public void discardPage(String name)
on the request cycle although there may be side effects.
from the javadoc:
/**
* Finds the page and its page recorder, creating the page recorder if
necessary.
* The page recorder is marked for discard regardless of its current state.
*
* <p>This may make the application stateful even if the page recorder does
* not yet exist.
*
* <p>The page recorder will be discarded at the end of the current request
cycle.
Geoff
----- Original Message -----
From: "Neil Clayton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 11, 2002 2:59 PM
Subject: [Tapestry-developer] Cached Page State
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> What kind of caching does Tapestry perform per page?
>
> I've got some pages backed by Cayenne, and when I make changes, those
changes
> do not appear. If I switch browsers, or restart the web container they
do> appear. Also, they do appear if I set > - -Dnet.sf.tapestry.disable-caching=true. > > Is there a better way to selectively disable caching? Or expire pages? > > I've already got > <meta http-equiv="expires" content="0"/> > in the head section of the HTML (again, to little effect in terms ofthis> particular problem!)- --
>
> Am I going mad?
> Has computing suddenly got beyond me? [I am beginning to wonder!]
>
> - --
> Regards,
> Neil Clayton
>
> (PS: If you see strange text you don't understand underneath my email,
don't
> worry - it's just my PGP signature)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE90AwLLXcfQF3yrNoRAjmKAJ0cLhtCS4MHuLJYwnZTPCz0U1S5NgCeNPQi
> n9/j+vGHSVnDWElT3lwKHHU=
> =yS/w
> -----END PGP SIGNATURE-----
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
Regards,
Neil Clayton
(PS: If you see strange text you don't understand underneath my email, don't
worry - it's just my PGP signature)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE90LCgLXcfQF3yrNoRAlB6AJ0XajQYqkAOo6gfdAEQnbNJz2gMzQCcDzWL
8h8tsGQ6jhNJ3bOIiCOUMJk=
=YtDV
-----END PGP SIGNATURE-----
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
