7 Replies Latest reply on Nov 1, 2010 10:40 AM by Marcio Dantas

    3 Tier Arquitecture

    Vasilica Petcu Newbie

      Greetings,


      One of the requirements of the client for a new project is to have a separate 3 tier archuitecture.
      1.Is is possible to run Seam in such an environment ???
      2.Are there any examples of running Seam in such way ???
      3.What are the down sides of using Seam in a 3 tier architecture.
      4.How should I deploy the application in this 


      Thanx to all.


        • 1. Re: 3 Tier Arquitecture
          Nicklas Karlsson Master

          1. Yes

          2. Hmm, not sure but you can add layers as you go. Why stop at 3 levels when you can have 5!

          3. Makes your code look like it came from Spring Framework

          4. Same as always



          Apply humor as required.

          • 2. Re: 3 Tier Arquitecture
            Vasilica Petcu Newbie

            Nicklas,


            Thanx for your answer. But I need a more descriptive answer.


            Greetings,
            Vali

            • 3. Re: 3 Tier Arquitecture
              Nicklas Karlsson Master

              Seam imposes very little restrictions as to how you architect your application. You can add levels of DAOs and services and inject them as you see fit. You can have an EAR and have service layers if you feel like it and it won't make the packaging etc any different from your regular EAR.

              • 4. Re: 3 Tier Arquitecture
                Vasilica Petcu Newbie

                Nicklas,


                I'm sorry, what I meant was 3 physical separate tier. Like a machine with a web tie, a machine with a business tier and a machine with a data tier

                • 5. Re: 3 Tier Arquitecture
                  Phillip Haines Newbie

                  Hi Vasillica,


                  People have different definitions of what three tier architecture means (the term feels very 90's now). From your final comment it appear that you want to put the database on one server, business logic on another (Application Server) and then finally serve the static content on a final web server.  This model easily achievable with Seam.


                  If you were meaning the more old fashioned view of three tier. Separation of presentation logic from business logic onto separate physical machines then this model is from what I understand less suited Seam as you would lose much of your ability to leverage hibernate. However Seam does allow you to have clear separation of your model and services from your presentation logic but still have it deployed in same deployment as Nicklas has pointed.


                  It would be helpful to describe the type of application you are trying to write when asking these types of questions as it helps put the question into context.


                  Cheers
                  Phillip

                  • 6. Re: 3 Tier Arquitecture
                    Chihpeng Lin Newbie

                    Hi


                    We are evaluating if we can adopt Seam framework in our applications.
                    In our current architecture, we use Struts2 and EJB3 and running on JBoss AP servers.
                    But in our deployment, we separate WEB and EJB tier in different physical servers.


                    The system architecture is:


                    WEB tier
                    ---------------
                    EJB tier
                    ---------------
                    Database Server


                    The static pages, JSP and Struts2 actions are deployed in WEB tier.
                    The EJB with business logic is deployed in EJB tier.


                    Is it possible to replace the Struts2 with Seam in WEB tier and keep WEB tier and EJB tier in two different servers?


                    Thanks!
                    Chihpeng Lin

                    • 7. Re: 3 Tier Arquitecture
                      Marcio Dantas Newbie

                      Separation between EJB tier and Database Server is easy, right?
                      Install the database in a different machine and configure your ejb tier to access it.
                      Nothing special regarding seam must be done here.


                      Physical separation between Web tier and EJB tier will require extra work to configure Seam.


                      I lately opened a topic on that subject:
                      Forum thread


                      Maybe it can help you.


                      There are different ways of acomplishing this.
                      One very know way is to integrate Spring and Seam, and then use a spring components to get the remote ejbs.


                      best regards