Joachim Heidenreich wrote:Both seem fine to me. For the second one you would probably use a SFSB, but how are you going to keep reference to the SFSB for the duration of your Session? you would have to keep it somewhere, like your HttpSession. So you might aswell store all your temporary information in your HttpSession ie. use the first option.
Hi,
By SSFB, you mean an
EJB Statefull Session Bean, because I'm not using EJBs in my business Layer, I'm just using POJO's.
For the second method :
How I see it is that the business layer expose a method with the following signature
the presentation layer calls this method each time the user add an item, the method return the newly update PurchaseRequest and the presentation layer put the PurchaseRequest in the request scope.
Also There's no call from this method (addItem) to the integration layer, just some validation stuff and adding the (Item, Supplier, Quantity) combo.