7 Replies Latest reply on Jun 14, 2011 2:28 PM by tandraschko

    Migration Nightmare: Seam 2 -> 3, JSF 1 -> 2, Richfaces 3 -> 4

    miguelz
      Dear Seam Users and Developers:

      I have several Seam2 + JSF/Facelets + Richfaces3 applications that came a bit into the years and now would need a facelift, mobile functionality etc.

      My idea was to migrate to the new generations of the used frameworks to get new features and gain productivity. But even with the most simple of my applications I was not able to do this:


      I. JSF1 -> JSF2 with Seam2

      There seem to be dependency and listener issues that can only be resolved by hacking Seam2.

      --> waiting for Seam 2.3 to support JSF2 officially or using Seam3


      II. Seam2 -> Seam3

      Seam3 would have been better denominated Seam30 due to the large conceptual gap to the anterior version. Though I think that the Seam Team adopted the right JEE6 way, from an application developer's perspective it's not easy to understand. Now I know why there is no migration guide/tool...


      III. Richfaces3 -> Richaces4

      As Richfaces3 completely fails rendering some AJAX components (e.g. TabPanel) in IE9 (getting rolled out very fast), my idea was to just use Richfaces4:

      --> Richfaces4 depends on JSF2 so waiting for Seam 2.3 to support JSF2 officially (--> I.) or use Seam3 (--> II.)

      --> Beyond that, many of the Richfaces4 components do not yet offer the same features as their Richfaces3 counterparts (e.g. tree has only one global variable...)


      Yes, I got a bit stuck and maybe I'm not the only one.. and I was already thinking in switching to GWT, ExtJS, Jquery UI, pure JSF2, ...

      The main problem what I see is, that neither Seam2 nor Richfaces3 are maintained sufficiently and at the same time the respective successors are not yet ready for migration or maybe even for production in general.

      In my opinion priorities should be:

      - Seam2 support for JSF2 (no hack)
      - Seam3 functionality and stability
      - Seam3 migration guide/Wiki/Tool/Module

      - Richfaces3 IE9 issues (not only via IE8 compatibility mode)
      - Richfaces4 functionality and stability

      Don't forget the users!

      Comments? Anybody with the same experience? Solutions?

      MiguelZ
        • 1. Re: Migration Nightmare: Seam 2 -> 3, JSF 1 -> 2, Richfaces 3 -> 4
          jsoye

          Hi,
          I'm currently converting a Seam 2 application to Seam 3. Once you start, you'll really like CDI (The Weld Reference documentation is a great introduction, I think). As some modules, like the Mail Module, aren't ready yet, you might consider just writing them in Java EE 6 (Java Mail API, say), and adding in the Seam module and converting over at a later stage, when it's completed and there's documentation.


          But as for gaining productivity; you might be disappointed at the moment. You're not going to get the number of examples you have in Seam 2 at present, so if you're on a tight deadline, I wouldn't consider using Seam 3 to be a safe move right now - more for fear of the unknown, than anything else. Things might work, or might have sufficient documentation, but if they don't, how long will it take to resolve? Would it require a JIRA post, etc?


          My biggest showstopper, and consequently it would be my number 1 priority, would be to get hot deployment / incremental hot deployment incorporated into a Maven plugin. Developing without it is just painful, and ultimately may be the reason why I just postpone this until next year. I'd guess my friends in PHP land would have their projects comfortably completed (stress-free) before I've even got a build going (slight exaggeration, maybe ;-D).

          • 2. Re: Migration Nightmare: Seam 2 -> 3, JSF 1 -> 2, Richfaces 3 -> 4
            tandraschko

            I would not migrate to seam 3.


            It's still buggy.


            1) Seam Persistence fails in clustered envorionment (workaround available)
            2) org.jobss.weld.beans.ManagedBean is not serializable - You can not use @ViewScoped for JSF beans (which is really a showstopper for me!!!)
            3) Seam (Faces) does not work with OWB (i thought it could be a workaround for 2.)

            • 3. Re: Migration Nightmare: Seam 2 -> 3, JSF 1 -> 2, Richfaces 3 -> 4
              jsoye

              Thomas Andraschko wrote on Jun 14, 2011 10:29:


              2) org.jobss.weld.beans.ManagedBean is not serializable - You can not use @ViewScoped for JSF beans (which is really a showstopper for me!!!)



              Hi Thomas, Have a look at possible solutions to your problem here, in particular the 5th post from Steven Verborgh.

              • 4. Re: Migration Nightmare: Seam 2 -> 3, JSF 1 -> 2, Richfaces 3 -> 4
                tandraschko

                Hi,


                AFAIK the @ViewScoped support is already in Seam Faces?
                If i use the @ViewScoped on a bean, it will throw an exception because org.jobss.weld.beans.ManagedBean is not serializable. (Weld 1.1.1)
                It should be the same problem as: https://issues.apache.org/jira/browse/EXTCDI-118.
                I read on a mailinglist that it would be fixed with WELD 1.2.Beta1 but it isn't available!?

                • 5. Re: Migration Nightmare: Seam 2 -> 3, JSF 1 -> 2, Richfaces 3 -> 4
                  jsoye

                  You're right. It came in the Seam 3.0.0.Alpha2 release. Sorry for the false hope. Roll on WELD 1.2.Beta1 so. Guess who hasn't been using @ViewScoped?

                  • 6. Re: Migration Nightmare: Seam 2 -> 3, JSF 1 -> 2, Richfaces 3 -> 4
                    bleathem

                    I've been using @ViewScoped for a long time now, without any trouble.


                    Just make your @ViewScoped beans implement Serializable, and do not use the @ManagedBean annotation (used @Named instead).

                    • 7. Re: Migration Nightmare: Seam 2 -> 3, JSF 1 -> 2, Richfaces 3 -> 4
                      tandraschko

                      Which weld version do you use?
                      I used 1.1.1 and 1.1.2-SNAPSHOT