aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes when the CMR collection gets refreshed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "when the CMR collection gets refreshed?" Watch "when the CMR collection gets refreshed?" New topic
Author

when the CMR collection gets refreshed?

Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi all,
I have two CMR beans- Order and Item for e.g. As I created relation b/w them I have getItems() in Order entity bean that returns me Collection of Local Item EJB objects. Now, I have remove Item called directly on the item's local home interface from somewhere else (I don't use collection.remove() here) but as my Order had Collection referring to older Item, getItems() won't refer to the latest list anymore , right?
Does it mean that right after remove() I can't call getItems() here but I have to write a finder method for Item bean to get me all Items which will make sure everytime I get updated list of Items?
I know EJB Container has to refresh the entity bean at specified "refresh interval" but I am talking about the time in between I call remove() and container calls refresh...
I guess this would be all really container specific but any ideas referring to any specific container would be helpful to me...

Regards
Maulin
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
ok. i would answer it myself
I observed that it gets the correct collection (even if database in backend was modified) whenever get<<Collection>> method is called. This is in Sun ONE.
Regards
Maulin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: when the CMR collection gets refreshed?