Hi Rolan,

Your app will scale best if you recreate the ref to the remote interface as
required. You should not hold a handle to the actual ejb (unless you choose
to use a statefull ejb). To do so would add to the session size. 

If you plan to deploy to a cluster, session size should not exceed approx
4k. If you don't plan to deploy to a cluster then this is not so important.

Use stateless session ejbs in preference to statefull ejbs. Avoid
interacting directly with entities, go via a stateless facade that returns a
value object to the client (struts layer).

Jon

-----Original Message-----
From: Roland Chan [mailto:[EMAIL PROTECTED]] 
Sent: 06 February 2002 15:08
To: [EMAIL PROTECTED]
Subject: Struts/EJB (Yet another newbie question)

Hello, I am evaluating the usage of struts w/ JBOSS and have a design
question: 
Firstly, I am keeping all my EJB interaction in my Action classes. One
thing I am unsure of is what I should do on my ActionForward. That is,
should I be placing my EJB directly into the session, or should I be
re-populating some ActionForm w/ the values I received, or perhaps I
should be creating regular Java Beans as value objects??? 
Take for instance a login example. My action interacts with an entity
bean to authenticate the user. Shall I put the bean into the response?
I've read this as a practice in some cases, but would really like some
clarity? Or is it case driven? 
At any rate, when I try this approach in my JSP I always receive a
ClassCastException. Any thoughts would be appreciated. 
Thanks, Rock - the newbie
 

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

Reply via email to