• Post Reply Bookmark Topic Watch Topic
  • New Topic

It's necesary stateless before Entity ?  RSS feed

 
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.
 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!