Did you take a look at Caching Data Objects with Frameworks
http://www.javaworld.com/javaworld/jw-05-2004/jw-0531-cache.html
Of course you can re-org your application to classic 'Request', 'Session' and 'Application' scopes and gc the objects based on release of scope-
HTH,
Martin-
----- Original Message ----- From: "Mike Wannamaker" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, May 16, 2005 10:15 AM
Subject: [castor-user] [JDO] - Clearing cache.
Is there a programmatically way for me to remove objects from cache? Can I
release specific objects or object types IE: Address #1 or Address.class
types?
--ekiM
-----Original Message----- From: Stuart [mailto:[EMAIL PROTECTED] Sent: May 16, 2005 9:49 AM To: [email protected] Subject: RE: [castor-user] Is Castor Thread Safe?
Andy,
Thanks very much for your reply. Based on what you say I take it that it is
safe to use multiple separate instances of Marshaller or Unmarshaller in
separate threads (and as you said I can cache the descriptors). Good.
Regarding the objects - I am using the SourceGenerator (*8-)). With the generated objects you say they use ArrayList but I'm assuming this would only be a problem with multiple threads writing to these object. Multiple threads reading should be ok?
Thanks a lot for your help.
Stuart
-----Original Message----- From: Andrew Fawcett [mailto:[EMAIL PROTECTED] Sent: Monday, May 16, 2005 9:40 PM To: [email protected] Subject: RE: [castor-user] Is Castor Thread Safe?
Hi Stuart,
(1) and (2) no, best use new instances per thread, not you can cache class descriptors by providing the same class resolver to each instance.
(3) and (4) depends who's objects your talking about... Castor can use reflection over your own classes and as such question is back towards you. ;-) It can also use generated classes from Castor SourceGenerator, these use java.util.ArrayList so would be an issue.
Andy.
-----Original Message----- From: Stuart [mailto:[EMAIL PROTECTED] Sent: 16 May 2005 14:23 To: [email protected] Subject: RE: [castor-user] Is Castor Thread Safe?
All Hi can someone take a stab an answering this for me? Thanks, Stuart ====
All,
Can anyone tell me which parts of Castor's XML framework are thread safe (or not)? Actually let me ask some specific questions:
(1) Can multiple threads use the same Unmarshaller? (2) Can multiple threads use the same Marshaller? (3) Can the unmarshalled objects be read (get field values etc...) by multiple threads safely? (4) Can the unmarshalled objects be changed (change field values) by multiple threads safely?
Since I am only using the XML framework I think the above is all I need to worry about.
Thanks for your help.
Stuart
The information in this message is confidential and may be legally
privileged. It may not be disclosed to, or used by, anyone other than the
addressee. If you receive this message in error, please advise us
immediately. Internet emails are not necessarily secure. CODA does not
accept responsibility for changes to any email which occur after the email
has been sent. Attachments to this email may contain software viruses, which
could damage your systems. CODA has checked the attachments for viruses
before sending, but you should virus-check them before opening.

