wood burning stoves 2.0*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes shopping cart items (ref Petstore) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "shopping cart items (ref Petstore)" Watch "shopping cart items (ref Petstore)" New topic
Author

shopping cart items (ref Petstore)

Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
The shopping cart items of petstore are used to create the order.
Until the order is created no EJB's are created. Looking at this example I am confused how we can create flight EJB or seat EJB b4 the order completion. (until the customer has completed and paid for the transaction.)

Can some one please explain this?
Thanks
Dhiren
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Not exactly an answer to your question, but I think you are clearly going down the slope of "everything is an EJB". Does flight and Seat have to be an EJB?


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
Not exactly an answer to your question, but I think you are clearly going down the slope of "everything is an EJB". Does flight and Seat have to be an EJB?

Thanks Ajith that does give me a direction. I thought they needed to be EJB's as I saw from varies posts and could not relate it with what I was designing.
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
Originally posted by Ajith Kallambella:
Not exactly an answer to your question, but I think you are clearly going down the slope of "everything is an EJB". Does flight and Seat have to be an EJB?


Hi Ajith,

I see your point that "not everything qualifies for an EJB".

But I think Flight is definitely a "Business Object". Whether it gets implemented as a remote entity bean, local entity bean or a simple bean could be debatable.

For example: if down the road, the system requires some maintenance modules for maintaining/publishing flight information then planning a "Business Object" called Flight or FlightDescription helps.

In Petstore, the famous "Customer" diagram depicts 5-6 different objects. Sun implemented all of them as Local Entity beans. May be just 2 or 3 objects would have met the requirement.

regards,
Deepak
Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
Ajith/Deepak
On the same track I tried to find who creates the shoppingCartModel.
I couldnt find a single reference and I always thought that would be some session bean doing it.
Can anyone who has loooked in petstore in detail give me some inputs on this class and its creation .

Thanks
Dhiren
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
Dhiren,

No I have not explored Petstore to such depths.

regards,
Deepak
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Originally posted by Deepak Pant:

But I think Flight is definitely a "Business Object". Whether it gets implemented as a remote entity bean, local entity bean or a simple bean could be debatable.


Sure, Flight is a business object. As you have rightly said, modeling every single business object as an entity bean is actually an antipattern. While crossing the chasm between design and implementation, one has to consider other alternatives such as POJOs and coarse grained entity beans.
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
Originally posted by Ajith Kallambella:


Sure, Flight is a business object. As you have rightly said, modeling every single business object as an entity bean is actually an antipattern. While crossing the chasm between design and implementation, one has to consider other alternatives such as POJOs and coarse grained entity beans.


Thanks for the clarification !!!. Appreciate it
Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
Ajith/Deepak,
I proceeded further and it looks to be convenient if seat is made an EJB..

any thoughts. Ajith especially remarked that one should not jump into everything an EJB then how is one to keep track of seats being taken empty etc. I couldnt figure a better way but not to keen to go for EJB becuase then I am tied to having seats reserved even if they r not paid for.

Thanks
Dhiren
 
Don't get me started about those stupid light bulbs.
 
subject: shopping cart items (ref Petstore)