• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB vs Java Beans--design choice

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
I am designing/coding a J2EE application. I am currently designing the business logic layer.
My requirements from the Business Logic Layer:
. interact with the database (CRUD operations) and create/update complex
composite value objects.
. perform standard shopping cart operations
So far, I have figured the following
. EJB Pros: container managed transaction management, connection pooling.
. Java Beans pros: No need for App server.
I wanted to know the pros-cons of using EJB's or Java Beans to execute the business logic of the application. What are the factors that will help me decide whether to use one or the other?
Thanks in advance.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Keep in mind that without EJBs, you'd have to write all of the persistence logic yourself, so you wouldn't really be saving any processing time. What sort of an application is this? If it's a web (JSP/Servlet) based app, then you're going to have to run Tomcat or somethine similar, so again you're really not gaining anything by not having an app server. I think you will find that, in virtually every case, the EJB based app provides a cleaner, more manageable solution.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Intelli,
Here You have TWO quesrtions
1. Whether to go for Application Server/EJB container Or NOT
2. if you go for App Server, Is EJB is realy need or NOT.
It is all based on the kind of Application you are developing.
If your application need the following capabilities such as:
Clustering
Session-level fail-over
Management consoles
Connection pooling
Load balancing
Fault-tolerance
the go for App Server with EJB.
Else you can do it only a Java Class.
Regards
Viswa
----------
 
reply
    Bookmark Topic Watch Topic
  • New Topic