This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes J2EE is a TWO Tier Application What DO You SAY! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "J2EE is a TWO Tier Application What DO You SAY!" Watch "J2EE is a TWO Tier Application What DO You SAY!" New topic

J2EE is a TWO Tier Application What DO You SAY!

perry arora
Ranch Hand

Joined: Sep 18, 2003
Posts: 35
hi friends!!...
Would like to discuss or infact need your help on a very fundamental issue..

J2ee is defined to a three tier architecture ! mostly we can include many more tiers..

But lets discuss about an archirecture or i woud say structure for an WEB based j2ee application as follows.

We have a web based client lets say Jsp's and we are using OracleiAs as our web application server....

the Oracle9iAS provides containers fro J2ee components and also provides web support for jsp and servlets .. now if data base and oracle9iAs server are running on the same machine in that case
Can we define this application as a Two Tier application .. as the J2ee server and the database reside on the same machine,.
I mean to say that wat are the Factora that really demarcate the boundaries of three tier.
If it is location , in that case in above case we have both of (Database and the J2ee) running on the same machine ., and also our web based client is also on tha same machine!!!

I am developing an MIS .. and was confused on these issue!!! i have posted to threads on this forum and I


Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
There can be physical layering into tiers, and there can be logical layering into tiers. I don't remember seeing any strict rules or definitions for a boundary between two tiers.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Sri Basavanahally
Ranch Hand

Joined: Oct 07, 2003
Posts: 75
Hi !
When we say J2EE is n-tiered we are talking the application tiers not the machines. An application could be divided into Presentation, business logic, database, which makes it 3 tier OR if I have a fat client accessing a server(Database) it is 2-tier and so on. If I have the first scenario and business logic (app server) and DB are in the same machine, it is still 3 tier.
BTW , this is uncommon(and unwise) in the real world to have an app server and DB on the same machine. They are usually on separate machines.
Does that help ?!

Dave Cronin
Ranch Hand

Joined: Apr 25, 2003
Posts: 114
J2EE is intended for use with multiple tiers, and not just two tiers. If for example you have an application with business logic and database access (JDBC) code all contained in servlets and JSPs, then you actually have only one tier.
If you separate the presentation logic, business logic and database access logic into clearly separated packages with separate responsibilities, then you have three tiers. Even if this is all on the same machine, the tiers are logically separated. For many enterprise applications, these should be on separate machines, since each tier of the application can be better configured and load-balanced.
However, there are also cases where it makes sense to use just one machine with three logical tiers if the application is relatively small and light - it really depends on circumstances.

Dave Cronin
I agree. Here's the link:
subject: J2EE is a TWO Tier Application What DO You SAY!
It's not a secret anymore!