Bean is an overloaded term. You have Java beans which were not meant to have behavior but more like act like a dataholder class with getter/setters. Then you have EJBs which are alot more different and can act as stateless services or controllers.
To me an action is really similar to a controller because it is what binds with your view. If you add a JSF action on a command button, I would expect the action maps to a controller/action class.
The bean definition is so overloaded that I can't give a single explanation. But if you talk about a backing bean in JSF then usually the backing bean while hold the state for a view or a succession of views.
Without more details on your application I cannot really advise as to what to do with this exactly. Seam uses stateful beans to bind with the views, you can use SFSBs or plain java beans to fulfill this purpose. You can have both state and actions within the same class or you can organize differently. If you need to abstract the service layer you can always have the stateful bean delegate calls to your service layer.
The choice is yours.
Thanks for the reply. I'm on the same page and what you said makes me feel better about my understanding thus far. I think I'll just re-purpose my controllers as stateful session beans (EJB3) that make the calls to the service layer. The controllers are composite in the sense that they have instances of objects that are used directly in the views. So yeah, I think I'm looking good. :)
They don't even have to be EJB3's, can be normal pojos just like in your current app (simply remove the managed bean definitions in faces-confg.xml and annotate them).
That would definitely make the migration easier. Do you know what changes I need to make to a generated project from seam-gen in order to go from a ear deployed project to war based?
Afraid I don't, never used the seam-gen stuff myself. Never liked the directory layout (maven user :) ).
But there isn't much configuration needed to get things working. It is all under chapter 1.2 of the seam documentation (I'm using 2.0.1).
At my work we are migrating a legacy Struts application to JSF/Seam slowly and don't have the luxuory of using all the latest stuff like EJB3 and JPA.
But we are really happy with JSF/Seam with Pojos, so many nice things in Seam besides JPA and EJB3.
If you run into configuration problems, just post.
Going from an ear build.xml to a war build.xml is not easy, the best approach would be to rerun seam-gen and select war build instead of ear.
I meant to reply to this thread, hit the wrong reply :)
Ah forget it, the threading isn't what I expected anyways, ignore this and my previous post
I can't say I'm a complete fan of it either. How does the Maven structure look?
Have a look here maven2 directory layout.
And it just works when I do a
it generates a nice eclipse project which I just import into my workspace.
Only thing is that I don't think I can get all the features from the JBoss Tools plugin using this structure, think it expects stuff to be in the action and model directories. But that will hopefully change soon.
Just to add on my original post, what I meant by java bean I meant plain pojos. Now I'm sorry I can't help you on how to migrate from ear to war app, your best bet is to generate with seam-gen and war option I guess, though I never used this myself.