1 2 3 Previous Next 34 Replies Latest reply on Nov 25, 2011 1:09 AM by Angela Edwards

    Seam Wicket and Servlet

    Ove Ranheim Novice

      Hi,


      What's the relation between Seam Wicket and Servlet?


      I'm trying out Wicket and compiled Seam Wicket from sources (Nov 30). The NumberGuessDemo works fine when deployed in Jetty 6.1.26.


      I wrote a simple test case using Arquillian 1.0.0.Alpha4, and it's broken. My CDI Beans doesn't get any injections, however my JUnit Test case get injections in socpe of the test, but no Wicket objects receives any injections. Conversations are also broken in tests.


      Please note, Arquillian requires Jetty Eclipse 8.0.0.M1 in order to fire any test cases. So, there is one Jetty version for deployment and another for testing.


      If you add a test case to NumberGuessDemo with Arquilliant, he test case would be broken in conjunction with WicketTester, e.g. setStartPage(HomePage.class) and Seam conversations.


      Would it be possible to use Seam Servlet in conjunction with wicket? Or, would this be fixed for the planned late December beta release.


      Cheers,
      Ove

        • 1. Re: Seam Wicket and Servlet
          Dan Allen Master

          Seam Servlet is primarily focused on enhancements at the boundary of the requests and on providing injectable HTTP state. So yes, it can definitely be used in conjunction with a web framework like Wicket. There may be overlap, but certainly still useful bits.


          Seam Wicket is currently a bit out of date. In fact, it has never been released as Seam Wicket, only as Weld Wicket. We are focused on getting the foundation modules into beta, so Seam Wicket is further back in the queue atm. However, if someone in the community wants to look into upgrading it, we welcome it and will be responsive to that.

          • 2. Re: Seam Wicket and Servlet
            Kariem Hussein Newbie

            Dan Allen wrote

            Seam Wicket is currently a bit out of date [...] However, if someone in the community wants to look into upgrading it, we welcome it and will be responsive to that.


            In February and again in July, I have left a few comments in on this thread, but no response yet. The last comment has a link to the latest thread referring to wicket development on the seam mailing list (back in April).


            I think a few people would really like to look into upgrading seam-wicket, but hints on where to start or what essentially has to be done would certainly be helpful. Any similar seam extensions that showcase appropriate integration?


            As Dan said, the current numberguess example (refer to seam-wicket on github) does not even use CDI, Weld 1.1, nor even the API which lies in the same project.



            Cheers,

            Kariem

            • 3. Re: Seam Wicket and Servlet
              Dan Allen Master

              I'll be upgrading the Wicket module this week (or next week if I run short on time). If I run into problems, I'll post and hopefully get some community input.

              • 4. Re: Seam Wicket and Servlet
                Kariem Hussein Newbie

                Great, Dan! Thank you. If you need anything I would be happy to assist.


                Kariem

                • 5. Re: Seam Wicket and Servlet
                  Kariem Hussein Newbie

                  Hi,


                  Bumping this up again. Is there anything I could do to assist? I could even work from an unfinished upgrade :)


                  Thank you,

                  Kariem

                  • 6. Re: Seam Wicket and Servlet
                    Dan Allen Master

                    Good news! I finally got it working!


                    You can checkout the latest code from github and run the example (port 9090) as follows:


                    git clone git://github.com/seam/wicket.git
                    cd wicket
                    mvn install
                    cd examples/numberguess
                    mvn jetty:run -Pjetty



                    Alternatively, you can import the project into Eclipse and run the application by executing the Start class (in the normal Wicket way).


                    Finally, you can deploy the application to JBoss AS by building it with the jboss6 profile:


                    mvn package -Pjboss6



                    I'm touching base with Clint to get a thumbs up on a release. If he's in agreement, I'll push out 3.0.0.Beta1 tomorrow.


                    Also, Seam Wicket now has a module page!


                    Seam Wicket

                    • 7. Re: Seam Wicket and Servlet
                      Dan Allen Master

                      If you need support for Jetty 7 and/or 8 in the example, please file a JIRA. Thanks!


                      If you are interested in helping out with this module, please touch base with Clint. You can find his profile on the module page.


                      Fork away!

                      • 9. Re: Seam Wicket and Servlet
                        Kariem Hussein Newbie

                        Thank you very much, Dan. That's much more than I had expected. Very good work!


                        I played around with the current version and I really like it. I have not yet gotten around to replacing our patched version of 2.2.1 with the 3.0.0 beta, but I have put it on our plan and I am looking forward to the migration.


                        Thank you,

                        Kariem

                        • 10. Re: Seam Wicket and Servlet
                          Jason Porter Master

                          Kariem, what modifications have you done?  Also note if you're using Glassfish 3.0.1 you will need to stick with the older version for a time (or upgrade to Glassfish 3.1 build 37) until we can insure Seam Solder works correctly with Glassfish 3.0.1

                          • 12. Re: Seam Wicket and Servlet
                            Dan Allen Master

                            Jason Porter wrote on Jan 10, 2011 02:37:


                            Kariem, what modifications have you done?  Also note if you're using Glassfish 3.0.1 you will need to stick with the older version for a time (or upgrade to Glassfish 3.1 build 37) until we can insure Seam Solder works correctly with Glassfish 3.0.1


                            Don't get too scared away by the GlassFish problem. We'll have information soon, and I'm positive that it's all going to work in the long run, one way or another :)

                            • 13. Re: Seam Wicket and Servlet
                              Ove Ranheim Novice

                              Upgraded to Seam Solder and Wicket Beta1. IMHO, I it find a bit early to move from SNAPSHOT to Beta1, as no alpha release has ever been shipped for Seam Wicket? I would  except a beta to be feature complete, which is not the case here. Isn't this module more like an Alpha1 rather than Beta1?


                              At the top of this posting I pointed out issues with getting injections on Wicket Components satisfied in test cases (Arquillian). If you try the WicketTester.startPage(HomePage.class) running in Jetty in-container, you'll get NPEs. No injections will get satisfied. Another major issue with the NumberGuess example is lack of test case(s) and you can't,execute 'mvn clean install jetty:run', because the dependencies are not correctly set up. Moreover, there are no test cases at all in the Wicket module.


                              Here's the POM from my test project: http://pastebin.com/ZUptSEP1


                              SLF4J, Eclipse Jetty M1, Weld Servlet CR4 and probably some others are required getting the jetty run and test cases workin'.


                              Cheers,
                              Ove




                              • 14. Re: Seam Wicket and Servlet
                                Dan Allen Master

                                In this particular case, we are not treating Beta as feature complete. This module is a bit of an exception since it's been shifted around, so going back would have been equally confusing. Some people have reported using in deployment already. So it's probably somewhere in between Alpha and Beta.


                                Please report these issues in JIRA and attach the appropriate snippets and example projects. Also, please feel empowered to fork the project and track down a fix, if you need it sooner rather than later, or just want to get involved.


                                Thanks!

                                1 2 3 Previous Next