-
1. Re: callbacks from CMP or caching layer
mandrews-flarion Feb 25, 2004 1:16 PM (in response to mandrews-flarion)oh boy, silly me :-)
i realized the answer is clearly that i've got the wrong approach... i forgot that i can mix cmp and non-cmp fields in an entity bean, and that way i can have a non-cmp field provide the parsed xml DOM, storing it in an instance variable between invocations. then, the jboss CMP layer takes care of all the needed caching.
thanks!
mike -
2. Re: callbacks from CMP or caching layer
mandrews-flarion Feb 27, 2004 8:36 AM (in response to mandrews-flarion)hmmm... on second thought, i think i'm back to where i started from:
how would my non-cmp entity bean field know when to invalidate its privately stored preparsed DOM? some kind of callback from the CMP layer is the only way i can think of, so my bean can find out when one of its CMP fields was modified and then can reparse the CMP xml to DOM.
mike -
3. Re: callbacks from CMP or caching layer
kevinconner Feb 27, 2004 9:39 AM (in response to mandrews-flarion)Don't expose the CMP field in the interface, instead expose a method that sets the CMP field and your flag.
-
4. Re: callbacks from CMP or caching layer
kevinconner Feb 27, 2004 9:41 AM (in response to mandrews-flarion)Forgot to add that you also need to set your flag in the ejbCreates, the ejbLoad and the ejbActivate.
-
5. Re: callbacks from CMP or caching layer
mandrews-flarion Feb 27, 2004 11:02 AM (in response to mandrews-flarion)right ---
makes perfect sense; i forgot one could choose which CMP fields made it into the interfaces (i must have started to take my stock set or pattern of xdoclet tags for granted, and forgot the basics!).
thanks so much!
mike