Hi Navjot

I am late at answering this but still I thought I should.
I agree with the design you have provided, but I wonder why
are you using the ProductDelegate here.

Is your application too big, or do you have too many type of clients ?
Are you using some caching mechanism in business delegate ?
Are you using service locator pattern also ?

Harjot
----- Original Message ----- 
From: "Navjot Singh" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, June 05, 2004 9:17 PM
Subject: [OT] EJB/Struts Design Question


> Hi,
>
> I have a typical case of Category and Product entity bean established in
1:N
> relationship.
>
> In the client tier, I wish to display the list of products along with
their
> category names.
>
> 1. Struts Action make a call to ProductDelegate.
> 2. ProductDelgate to ProductManager (SessionBean).
> 3. ProductManager to ProductHome (to get entity refs of Product Entities)
>
> __My kind of solution__
>
> 1. I retreive collection of Product at ProductManager. All the product
> instances will have category as CMR.
> 2. In session bean, i will iterate over the collection of products.
> 3. For each product, i create a new ProductCategoryVO which will contain
> values from product and category entities.
> 4. Then return the collection of ProductCategoryVO to my action class.
> 5. Action class wll further pass on to JSP.
>
> To me, it sounds like heavy work. What's the best way to handle this?
> Any help/pointers are appreciated.
>
> ---------------
> regards
> Navjot Singh
> Net4India Ltd.
>
> If there's only one answer, then this must not be a very interesting
topic.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to