When and why to use EJB in our project?

M

Matt

When we want to invoke a remote object on remote machine, most people
use EJB to do that. Other than EJB, what are the alternatives? RMI and
CORBA? The real question is when and why we need to use EJB in our
project? I know there are overheads if we over-use or mis-use EJB.

Please advise. Thanks!!
 
M

Michael Borgwardt

Matt said:
When we want to invoke a remote object on remote machine, most people
use EJB to do that.

Not really.

Other than EJB, what are the alternatives? RMI and
CORBA?

Or SOAP. Probably dozens more.

The real question is when and why we need to use EJB in our
project?

The main reasons to use EJBs are:

- Buzzword-compilance
- Easy distributed transaction management
- Easy clustering
 
B

Brock Heinz

The real question is when and why we need to use EJB in our
project? I know there are overheads if we over-use or mis-use EJB.

That's kind of up to you and the requirements that you have :) EJB
offers some implicit services, but often times it is a bit overkill.
I would advise reading the spec to see if it is a good fit:

http://java.sun.com/products/ejb/docs.html

Depending on your application - you'll have to decide which version of
EJB works best for you. I've been developing apps in JBoss 3.2.x and
Weblogic 8.1 so I often refer to the EJB 2.x spec.

There seems to be a bit of an industry trend towards IOC containers.
Although I've never personally developed anything in this fashion,
I've had it explained to me as J2EE a la carte. You can pick and
choose which services best apply to your application and they can then
be 'injected' with minimal code changes. A popular movement seems to
be towards the Spring Framework http://www.springframework.org/

As a general rule, you should use the technology to meet your
requirements - not use the technology and then realize what
requirements it can meet.
Please advise. Thanks!!

Brock
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top