Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

storing of entity reference in cart

 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we store reference of entity bean in a cart ?
Also can we store or is it advisable to store list of entity reference in cart collection ?

Thanks
Dhiren
 
Josep Andreas
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dhiren,
I got the same question a while ago.
My understanding is that the answer would be yes. A sfsb can hold on to
a POJO, another SFSB and a (hanlde to an) enity bean and I think even a reference to a SLSB.
Only for the SLSB you never are certain that the same instance of the SLSB is used for each call to it!

A very basic example is here:
http://www.jguru.com/faq/view.jsp?EID=917

regards,
J
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dhiren Joshi:
Can we store reference of entity bean in a cart ?
Also can we store or is it advisable to store list of entity reference in cart collection ?

Thanks
Dhiren


Diren,

Where and why do u plan on keeping a collection of entity bean references?

regards,
Deepak
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where and why do u plan on keeping a collection of entity bean references?


If I have a list of itineraries for a customer where else do I store it if I am reading or holding on to itineraries as a list which is rettrievable ?
Thats where the need for the entity referencce arose.

Thanks
Dhiren
 
Josep Andreas
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dhiren,
Did you agree with my description about the references?

With respect to the cart holding references to Itineraries?
Isn't the ininerary the 'thing' that you get when you 'checkout' the items in your shoppingcart? Or is it your intend to hold on to
Itineraries that are already persisted to db?
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you agree with my description about the references?

With respect to the cart holding references to Itineraries?
Isn't the ininerary the 'thing' that you get when you 'checkout' the items in your shoppingcart? Or is it your intend to hold on to
Itineraries that are already persisted to db?


Yeah agree with ref to cart holding to itineraries that is what I am trying to do though slightly different I want to hold on to a list of ref of Entity beans.

Holding on to itineraries already persisting is also what I intend at the time I will load them up and for browsing list of customer itineraries thats where I need ref to a list of entity bean is it accepatable from a design prespective I dont know. ?
Thanks
Dhiren
 
Josep Andreas
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I understand.
I am also considerering not holding on to the complete list but only the one that you need for the particular action (pay, change..).
J
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic