• Post Reply Bookmark Topic Watch Topic
  • New Topic

advantages of EJB  RSS feed

 
kishani liyanage
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Please can someone tell me what are the advantages of using EJB's over JSP and servlets?

Thanx in advance
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In very few words, you should use ejbs in applications with intense transactions (how to measure that ...? depends on the kind of application your building).
Also, you'll gain a lot of other benefits from using ejbs. Basically, i'd say you'll end up with a more robust and scalable application.
You'll have a lot more options for "better design strategies".
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBs and Servlet/JSP are two completely different technologies with zero overlap. It makes no sense to compare the two.
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chris Mathews:
EJBs and Servlet/JSP are two completely different technologies with zero overlap. It makes no sense to compare the two.

True, but you can use the 2 technologies seperately or jointly.
1. EJB only (e.g. client-server)
2. Servlet/JSP only (Servlets handle business logic and persistence)
3. Servlet/JSP + EJB (EJB handle business logic and persistence)

I think Kishani may be trying to understand the benefits of option 3 vs option 2. If so, then Kishani, I would recommend a search of this forum and/or google because I believe there are many opinions on that question. Also, the J2EE tutorial gives some advantages of EJB and when you may/may not want to use them.
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Blake Minghelli:

True, but you can use the 2 technologies seperately or jointly.
1. EJB only (e.g. client-server)
2. Servlet/JSP only (Servlets handle business logic and persistence)
3. Servlet/JSP + EJB (EJB handle business logic and persistence)



Hi All,

In practical how will you choose technology in between the pt no.2 & 3, because at the end of the day customer wants the performance and in books I have read that using EJB's would affect the performance. So how will you choose for following cases:

1) Scalable users with less transactions.
2) less users with more transactions.

I believe that everyone will say that we can use option 3 for both cases to highlight the technology names in their cv's. But what is the reality?

Regards,
M.S.Raman
 
Damodar Periwal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Blake Minghelli:

True, but you can use the 2 technologies seperately or jointly.
1. EJB only (e.g. client-server)
2. Servlet/JSP only (Servlets handle business logic and persistence)
3. Servlet/JSP + EJB (EJB handle business logic and persistence)

I think Kishani may be trying to understand the benefits of option 3 vs option 2. If so, then Kishani, I would recommend a search of this forum and/or google because I believe there are many opinions on that question. Also, the J2EE tutorial gives some advantages of EJB and when you may/may not want to use them.


Option 3 can also have the following variation:
Servlet/JSP + Session EJBs + POJOs + OR-Mapper for persistence of POJOs

A recent report discusses the details of the remodeling of the Java Pet Store application using POJOs (Plain Old Java Objects) with JDX OR-Mapper instead of using Entity Beans with CMP.
[ June 02, 2004: Message edited by: Damodar Periwal ]
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the abbreviation for a POJO?
 
Damodar Periwal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kishore Dandu:
what is the abbreviation for a POJO?

POJO -> Plain Old Java Objects
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!