You action classes perform function should do a jndi lookup of a session bean 
(stateless or not, I prefer stateless), passing a value object holding the relevant 
data.  Do not be tempted to use the form bean, create a value object with no struts 
stuff in.    The session bean should then do any data lookups via entity bean business 
fnuctions or whatever.   Again, any data returned should be within value objects which 
are then used to populate the form.

Why do all this?   Basically you are using an industry standard RPC mechanism to a 
middle tier (ie the EJB remote stuff with JNDI lookup).   You are decoupling the GUI 
from the data manipulation which theoretically gives you OO code reuse (like hell, but 
someone believes this stuff).  You do gain scalability advantages (kind of, but lets 
not think too hard about that eh).

Jonathan


---------------------------------------- Message History 
----------------------------------------


From: "Paul Idusogie" <[EMAIL PROTECTED]> on 13/02/2002 09:41 CST

Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]>

To:   <[EMAIL PROTECTED]>
cc:
Subject:  How do I leverage the struts approach within an EJB environment?


Could someone kindly provide an explanation on how to leverage the struts approach 
within an EJB environment?

we have the component diagram showing the main struts components
relative to the MVC pattern. Where do EJBs fit in?


ActionServlet ---------instantiate----------ActionForm
     |         |
     |send          |call
     |         |---------------------------------Action
     V         |                              |
     Jsp       |use                           |
     |         |-------------ActionMapping----------
     |use
     |
     V
     TagLib

Thanks,

Paul Idusogie
Technical Architect
Consulting Services
Stellent Inc.
7777 Golden Triangle Drive
Eden Prairie, MN 55104
Desk: 952.656.2755
Fax: 952.903.2115
Email: [EMAIL PROTECTED]
website: http://www.stellent.com

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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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

Reply via email to