tags:

views:

28

answers:

1

Has anyone had success building a SEAM Application without using Stateful session beans? There is some confusion on a new project in which I think several stakeholders have essentially 'banned' stateful session beans... but some development is being done in SEAM.

Most of the literature on SEAM encourages the use of Stateful Session Beans. Thoughts?

+2  A: 

You can absolutely use Seam without stateful session beans. You don't need any type of EJB at all, if you don't want them. Seam can be deployed on a variety of app servers, including Tomcat which doesn't support the use of EJBs. Seam has the ability to mimic a lot of the functionality that EJBs provide -- session scope, transactions, etc. -- without actually using an EJB.

Using Seam with Tomcat, for example, you can have a very robust application without EJBs that is lightweight, but acts in a manner similar to an application deployed on JBoss or Websphere that does make use of EJBs.

Shadowman
@Shadowman Just an additional comment: Seam examples directory has useful app build on top of Tomcat
Arthur Ronald F D Garcia
More than one, I believe. It's been a while since I built any of the examples, but I seem to recall quite a few of them can be built using Tomcat with no EJBs in site.
Shadowman
@Shadowman nice answer (+1)
kraftan
Also you can easily use Stateless Session Beans as well. Must not be stateful, however you will then not get the long-running conversation behavior or other goodies you get from Seam. Plain old java objects works just fine.
Shervin
@Shervin that is my main concern. I should have worded the question, "Succesfull SEAM development with Stateless Session Beans". All service code being called by FrontControllers resides in Stateless Session Beans. EAR - one war, one ejb.
Brian
@Brian: Well then you have some refactoring to do. Its ok to have service code in stateless ejb's. You can always use your EJB's in normal seam javabean components.
Shervin