Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I am not alone, Sun make the same mistake in PetStore1.1.2

 
guowei zhang
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In PetStore1.1.2,when I noticed that Customer
is moduled as SessionBean,I am a bit surprised,
but when Account is moduled as a EntityBean,
with Order also EnityBean, it make sense to
module Customer as SessionBean, which represent
a session for client to make online order,
so Customer sessionbean's methods includes
createOrder(),creatAccount(), getOrderDetails()
and getOrderDetails(), which is very typical of
a customers online activity, i think it is very
easy for people to module Cusomter as a EnityBean
,at least for me, I will try that way first. and
I think petstore is writen by serval people from
sun, the atuher for the Customer bean I think
is different guy from ShoppingClientController
SessionBean's, and in the later class( sccEjb), there is one line comment which is like this
/** @return the Customer entity bean for this user. */
public Customer getCustomer() throws EStoreAppException {
......
so I think the author made a mistake
the question is how to avoid it, any guideline?.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic