agreed, the solution is ugly: It simply smears the whole classpath into one huge ugly
beast. At least it works and if you don't have any code at all in your web-app,
I'm pretty sure you can get away with it.
Anyway, the problem is fundamental: Almost every more complex component makes specific
demands on your Datastructures. Seam suggests a deployment model where you have all of
your code, be it backing-beans (ejb or not-ejb) or models in one huge ejb-jar. I actually
find this model rather compelling: The layering-approach, that scatters your code over
several projects almost always leaves you with questions like "Where shall I put this
thing?!" and normally ends up with anaemic and not-object-oriented models. I think,
seam is a step into the right direction and gives you back some object-powers that where
previously hidden under the J2EE-Patterns-Catalog.
If you really want to be clean and have a UI-agnostic app, you should try to build an
adapter for these Component-Datastructures: There is nothing that prevents you from
putting your Backing-Beans into the web-layer and have them access normal beans in the
ejb-layer: Your backing bean transforms your (UI-agnostic) datastructures into UI-specific
structures. This way, your ejb-jar stays free of UI-related classes, the need to reference
the richfaces-*.jar vanishes, you can keep your classpath clean:
But then you have another class at another place to maintain: That's the reason why I
went with the classpath-hack - it was the most simple thing to do given our requirements.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065303#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...