Hi Shiva,
with Database.getCacheManager() you will get a instance of CacheManager
on which you can call one of the expireCache() methods.
The ObjectModifiedException may happen if your application holds a
reference to one of the expired objects and wants to update it later.
I hope this is what you wanted to know. If I should give you more hints
I will need as much information about your usecase as possible.
Are you using long transactions?
Do you need cache for the objects in question?
How many opbjects are in that table?
Does the problem only happen with maintanance?
Is there another application accessing the same table?
Do other objects have relations to the one in question?
Having said that I restart my application in those rare cases when I
have to change things by hand. For tables that are changed by other
applications I tend to switch of caching and in one case I issue SQL
update statements to change values in the other system. Still I have no
solution at hand that works in all cases.
Regards
Ralf
Shiva P. Kodityala schrieb:
-------------
There is also the option to expire objects from cache with CacheManager
to force reloading. When doing so you should be aware that objects
timestamp changes which may lead to ObjectModifiedExceptions on parallel
long transactions.
------------
Ralf
Pls let me know how to do it?
Thanks
Shiva.
-----Original Message-----
From: Ralf Joachim [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 20, 2005 11:55 PM
To: [email protected]
Subject: Re: [castor-user] manual Database changes Not getting
reflected.
Hi Shiva,
Castor trys to omit loading objects from database all the time you
request them. Therefore it caches objects and returnes them on your
request without loading them from database again. As a general rule:
- db.load() do only query database if object could not be found in cache
- query.execute() always queries database and should refresh object in
cache (not sure if that helps)
There is also the option to expire objects from cache with CacheManager
to force reloading. When doing so you should be aware that objects
timestamp changes which may lead to ObjectModifiedExceptions on parallel
long transactions.
Regards
Ralf
Castor JDO, committer
Shiva P. Kodityala schrieb:
Using Oracle database.
When i make modifications to the data directly from sqlplus (of course, commit
is done), these changes are not getting reflected when the same data is queried
from web application using castor jdo. When the app is restarted, then I can
see those changes through application.
Could you give me some clue what is the error I am making in application?
Thanks
------------------------------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------