File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Purpose or j2ee and ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Purpose or j2ee and ejb" Watch "Purpose or j2ee and ejb" New topic

Purpose or j2ee and ejb

Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

What purpose does j2ee server. what purpose do EJBs serve?
I just dont understand what they are supposed to offer above basic java and jdbc.
Also if one knows and feels like offering supplimentary info, what role does the app server play? why do I need one? When do I need one? etc...
Greg Charles

Joined: Oct 01, 2001
Posts: 2968

That's a big question! There's no clear agreement on what exactly an app server does, but there are some basic things that most give you, and which help when developing large-scale client-server applications:
1. Transactions. Multiple database updates can be treated as one unit, so that if they don't all succeed, they are all rolled back.
2. Database pooling. You can keep a set of open connections to your database and share them among processes that need access.
3. Security. Parts of your application can be restricted to particular users, based on roles.
4. Clustering. Your application can be distributed to multiple servers, to increase availability to a large number of clients.

So if you're writing a stand-alone application, you keep using regular Java. If you are writing a simple client-server application with a browser interface, you go for Tomcat or other servlet runner. However, if you are writing a complex, mission-critical, client-server app., then an app server is the way to go.
I agree. Here's the link:
subject: Purpose or j2ee and ejb
It's not a secret anymore!