2 Replies Latest reply on May 9, 2006 7:57 PM by Doug Schnelzer

    Struts, JSF or Spring for Portlets?

    Tomasz Cmok Newbie

      Hi,

      Can you pls advice which framework is best supported by JBPortal? I've read somewhere in this forum, that for instance, two JSF portlets doesnt work well on the same Portal page (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=67608) - how about Struts or Spring?

      Also, if I decide to use Spring + Hibernate:

      1) what is the best choice for UI components (i.e. like dataTable in myFaces)?
      2) if I use Hibernate, will it utilize all JBoss AS features like cache, clustering, etc, or shall I rather go for EJB3?

      Thanks,
      Tomasz

        • 1. Re: Struts, JSF or Spring for Portlets?
          Danny Hon Newbie

          I have a similar question. We would like to use JSF+Hibernate as our standard portlet framework. However, I am not sure where can we start and close a session. In a normal web application, we can use ServletFilter to accomplish this. In JBoss Portal, ServletFilter is not being invoked, so this approach does not work. We don't want to use JBP specific interceptor as we want our portlets vendor neutral. Any recommendations?

          • 2. Re: Struts, JSF or Spring for Portlets?
            Doug Schnelzer Newbie

            I recommend using JSF for the front end and EJB3 (which for JBoss uses Hibernate under the hood). We are using this architecture on a number of portal projects and it is working well. In my experience, JSF is the dominant model for building portlets, so you will get better support for JSF based portlet questions.

            Take a look at the EJB Trailblazer (http://trailblazer.demo.jboss.com/EJB3Trail/) for a good working overview of EJB3. EJB3 is better then just Hibernate. The EntityManger in EJB3 (using the @PersistanceContext injection) essentially provides what you are looking for with the ServletFilter. However it's better because it handles transactions for you and puts more of your architecture under a standards-based design.