9 Replies Latest reply on Mar 21, 2007 4:26 PM by delphi'sghost

    Seam Tools, Project Structures, and IDEs

    delphi'sghost

      We are starting a new EJB project in Seam, and are wondering what type of project to use. Given the Exadel announcement we anticipate using Exadel initially until the formal release of RHDS as opposed to Netbeans. We felt that the final incarnation of Exadel studio as RHDS would be more in tune with our technology choices of JSF, Seam, Hibernate, Jbpm and probably JBoss.

      However, we are somewhat perplexed as to what type of project to use. Using Seam-Gen, or a homebrew ant-driven project structure means we can manipulate the project however we want through ant, but within Eclipse, it looks crappy with jar files everywhere (I know about the filters, but I want to see the jars organized, not included as top level items).
      Our other concern is with debugging the application within the IDE which is difficult/impossible? without using an IDE generated project as opposed to an ant based project.

      We tried starting with an Java Enterprise Application project, but couldn't get Eclipse to deploy it with the jboss-seam.jar & other jars in the root directory of the ear. I can manually export the project to an ear file, and they get included. However, if I just publish it to the web server, the jars aren't included. I've tried just about every combination of importing jars, including them in the EarContent directory, putting the names in application.xml but with no luck.

      Our only other concern is whether we need to go with an Ant driven project so we can get the benefits of exploded deployments.

      Doing this in Netbeans was easy, it just works, but we have no idea when Netbeans will support Seam for things like autocompletion in JSF pages, and the visual editor in Netbeans has plenty of flaws, while the exadel visual editor is just enough for you to get an idea of how the page looks.

      We have also considered bagging the idea of a visual editor in the IDE, and going with something like Dreamweaver with the Seam/JSF plugins.

      So, I'm wondering if anyone has any suggestions for an IDE friendly project structure that will work well with Exadel/Eclipse, and deploy to an Ear, with an exploded deployment option?

        • 1. Re: Seam Tools, Project Structures, and IDEs
          gavin.king

           

          We felt that the final incarnation of Exadel studio as RHDS would be more in tune with our technology choices of JSF, Seam, Hibernate, Jbpm and probably JBoss.


          Yes, of course, but this will take several months of work.

          However, we are somewhat perplexed as to what type of project to use.


          There really are a LOT of advantages to starting with the seam-gen structure. I did a lot of work on things that will take you a while to reproduce if you try to do it all from scratch. (like, weeks of work!)

          However, there's nothing magical about it, and other structures can work just as well.

          We tried starting with an Java Enterprise Application project, but couldn't get Eclipse to deploy it with the jboss-seam.jar & other jars in the root directory of the ear.


          Yes, the Eclipse WTP is crap, and doesn't work, AFAICT. They have no concept of an EAR, which is just totally broken and nonsense. I refuse to use this broken stuff.


          Our only other concern is whether we need to go with an Ant driven project so we can get the benefits of exploded deployments.


          Now that I use this stuff every day, I can't imagine not having it.

          • 2. Re: Seam Tools, Project Structures, and IDEs
            tony.herstell1

            I work in MyEclipse (as I found eclipse sucked!) and didn't really know of any others at the time.

            I started the personal IceFaces enabled project before the SeamGen was as good as it is now; but I really don't like having a build/deploy step so try to avoid Ant scripts (which is bad I suppose) :( also this is a problem as all the examples are ant based and configured in an odd way for moving into a "normal" project structure.

            I use exploded deployment (as MyEclipse does it very well) and with the moves in Seam (see Michael Yuans blog) to get hotdeploy working better, it will need a server re-start less often.

            I never run an ant script (I have included an awful one for people that needed to run ant build on the project) during the code/try cycle.

            I have three ( J2EE ;) ) projects in MyEclipse
            xxxx_ear
            xxxx_jar
            xxxx_war

            The ear references the jar and war modules.

            The jars needed in the JAR and WAR that are in the EAR reference them (import jar from workspace) (never have two of same jars in the projects).

            Disable MyEclispe from "helping" with application.xml as it gets it wrong (properties on the ear and check to box to tell MyEclipse NOT to manage the application.xml)

            Which file went where was discovered by hacking apart a generated .ear from an example!!! so anyone could actually do it!

            Anyhow, thats it..

            Run Jboss from inside the IDE (one click and no attaching to some Server somewhere!).
            Debug directly inside the IDE.
            xhtml changes don't require a restart, some code changes do but MyEclipse tells you to do it... and you click the button! - Easy!

            MyEclipse are soon to put in Exploded deployments that can pick and choose files (i.e. A test suite of jars for one deploy etc... so that really will make a difference as you can pick.choose files for each deployment [Test, Development, Live etc.]).

            I have had a LOT of issues along the way (IceFaces mainly) and they are sorting them out quite quickly now... even getting changes put into Facelets to support their model better!

            Since I had to learn, and am still learning, Facelets, EJB3, JSF, Seam, Transactions, IceFaces, etc. etc. etc. it's not that great pretty project... In fact it's organized quite differently to the seam examples but more logical for simple old ME!

            But... Send me an email and I can send the whole darn project to you to play with... fix and defects then I would liek to hear about it :)

            One day I might ask if it can be added to the wiki here but thats scary!

            • 3. Re: Seam Tools, Project Structures, and IDEs
              tony.herstell1

              O.M.G. Gavin will never speak to me again.
              :(

              • 4. Re: Seam Tools, Project Structures, and IDEs
                stu2

                 

                "Delphi's Ghost" wrote:
                Our other concern is with debugging the application within the IDE which is difficult/impossible? without using an IDE generated project as opposed to an ant based project.


                Not sure what you mean here. Eclipse debugs a seam-gen produced project just fine, "right out of the box."

                I also prefer a more WTP-like structure, but getting everything to work in that structure didn't seem worth it when seam-gen worked right away.



                • 5. Re: Seam Tools, Project Structures, and IDEs
                  tony.herstell1

                  whats WTP?

                  • 6. Re: Seam Tools, Project Structures, and IDEs
                    thejavafreak
                    • 7. Re: Seam Tools, Project Structures, and IDEs
                      tony.herstell1

                       

                      "thejavafreak" wrote:
                      "tony.herstell@gmail.com" wrote:
                      whats WTP?

                      http://www.eclipse.org/webtools/


                      cheers
                      I dont think I use that with MyEclipse it has its own suite I think.


                      • 8. Re: Seam Tools, Project Structures, and IDEs

                        Tony: I've actually done the exact same thing as you and it took a lot of time. I think the community would benefit if MyEclipses Enterprise Application Project layout with seam was on the seam wiki.

                        Question: have you found a way for MyEclipse to deploy your custom datasources to jboss appserver?

                        Cheers, Eirik

                        • 9. Re: Seam Tools, Project Structures, and IDEs
                          delphi'sghost

                          First off, thank you all for the replies.

                          Gavin, the release of RHDS may take months, but that isn't a problem. This project is in-house and will be in production for the next decade so it is still worth it for us to aim for RHDS as the tool to use long term.

                          While the Seam-Gen route is pretty easy, using the Seam reference guide and having a Seam-Gen app to look at, I found it pretty straight forward to create my own Ear project in Netbeans and get it up and running. Most of my delays were due to doing it piecemeal, when I should have just added all the elements at once.
                          The seam reference is a great document, and is very thorough in letting developers know which pieces go where and why. However, I'm sure without examples and documentation, it would take weeks to do, which is a testament to the quality of the Seam reference as I did it in about a week including interruptions, and making mistakes.

                          One problem with Seam-Gen is it looks ugly in eclipse (src folder at the top, 20+ jars, and then the view folders at the bottom). I suppose I could put the jars in a library for the purpose of being tidy in the IDE.

                          Good to know the WTP stuff in Eclipse is flawed, at least I know it's not just me messing it up.

                          Tony, your project type is the kind we want to use, but it looks like MyEclipse adds a few things to the standard Eclipse that makes it easier to use Ear projects. The problem in standard Eclipse was forcing it to put jars into the ear folder which it seems is no problem with MyEclipse. MyEclipse may be an option for us until RHDS comes out, especially as it has the exploded deployment options.

                          Stu2, you are correct. I just tried it again to check I wasn't mistaken as I'd mostly assumed that since you can't bind a Seam-Gen project to a server in the IDE, it couldn't debug it in the IDE, but obviously you can!. This changes a few things, since it means we can do a generic project with our own ant script, or use Seam-Gen and get the benefits of IDE debugging when needed.

                          Great stuff all,

                          Thanks