Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

when the CMR collection gets refreshed?

 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic