• Post Reply Bookmark Topic Watch Topic
  • New Topic

It's necesary stateless before Entity ?

 
Jose Jim�nez
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i have a doubt about entity...
I have a tipicall Entity Customer, account, contactinfo,...

Customer-->Account-->ContactInfo
Customer-->CreditCard

I have a sessionFacade before at this entityBeans. For retrieval data as all creditCards of one client or get all information of one customer is appropriate to use the find methods of Customer EntityBean or it is more right to use Stateless for retrieval data and to use Customer EntityBean to save data ???

Thanks.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For retrieval data as all creditCards of one client or get all information of one customer is appropriate to use the find methods of Customer EntityBean or it is more right to use Stateless for retrieval data and to use Customer EntityBean to save data ???

It is better to use session bean to access the local home interface of the Entity bean instead of directly accessing the home interface of the Entity bean from the client, as the data access should not be explosed to the "outsiders".

That's why EJB 2.0 introduced the concept of local home interface.

Nick
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!