Jim is quite right, you should be able to remove references to EJB
structures, even from the the Action Servlets themselves.  I have had some
EJB experience, but am new to struts, but one of the nice things about
struts is its abilty to isolate most of the presentation logic from the
business and backend logic.  You should be able to design the struts sides
of things without knowing about how your data will be managed in the
backend, allowing you to plug in an EJB solution, direct JDBC calls, LDAP
etc modules.   

Most of the backend logic should be accessed within the Action classes,
which will have generic data methods, which in turn access the actual data
access classes you decide to go with.  You will have a few(one)
application/session/request context web tier controller classes which know
how to deal with the EJB tier objects. I have found it cleaner/easier to
have the web tier controller(s) talk to a sesssion bean controller object in
the EJB tier which in turn deals with the necessary session and entity beans
needed to actually manipulate your data, and like Jim, would be wary of
using too many entity beans, which have a relatively heavy overhead.



------Original Message-----
-From: Jim Richards [mailto:[EMAIL PROTECTED]]
-
-I'll be using ELB's for my application when I start building it
-in a few weeks time (still in the design stage). I expect to
-be using only EJBs from a action servlet, that are session
-beans, and those session beans use entity beans. From previous
-work I found there was too much overhead using the entity beans
-directly in the generation of a html page, and you rarely
-needed that direct conncetion to the database anyway.
-
-As for the references, I'm not sure what you mean. I'll be putting
-things like the JNDI and connection information into to web.xml
-as startup parameters.
-
-"Boulatian, Misak" wrote:
-> 
-> Hi all,
-> 
-> The application we design is quite large. I am still trying 
-to figure out
-> the question on EJB references. From the Craig Mcc.'s 
-comment I could put
-> those in one startup servlet. Is it a viable solution? I am 
-going to have
-> many session references. Where am I going to store those 
-references (in
-> servlet context)? How can I make those available to action 
-classes? Or I can
-> put only the handle in the servlet context and call lookup 
-in every action
-> class (any scalability problems with this approach?). I 
-cannot believe that
-> none of you worked in large applications and will not be 
-using EJBs for
-> business logic and did not go over this kind of issue.
-> 
-> I appreciate response,
-> Misak Boulatian
-

Reply via email to