MVC in EJB

I have implemented a small size project using the MVC architecture. It seems clear to me that the Model part would be some sort of EJB bean. What I am wondering about is would I need to create the servlet controler as an EJB too? Really I guess the question is if you are going EJB, is everything an EJB of some sort? Is the controller a stateless session bean?

Thank you

[392 byte] By [dupdup] at [2007-9-26 1:42:01]
# 1
You could use the servlet as a controller combined with a stateless session bean (SLSB). If you are not using servlets then just the SLSB would be sufficient. It is a good idea to have a stateless session bean act as a facade to your entity beans.
swatdba at 2007-6-29 2:34:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Hi,I agree with swatdba. Thanks
satnamk at 2007-6-29 2:34:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

Thank you for the replies. I guess I'm still wondering what the reasons for making something an ejb or a servlet. Sounds like from your responses I could have ejbs and regular sevlets existing in the same EJB container. Are there distributed system issues to consider? If any one could point me to a good article which describes this decision process, I would greatly apprectiate it.

Thanks,

dupdup

dupdup at 2007-6-29 2:34:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

From what I have been able of find. There is no problem delploying a servlet to an EJB container. If a JSP is just using HTTP to access the servlet there is not a problem. Using a stateless session bean as a controller seems to be required if you want to use RMI, which might be better for something like a Swing front end.

Any corrections or additional info would be greatly appreciated.

Thanks,

Dupdup

dupdup at 2007-6-29 2:34:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...