wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes EJB vs Java Beans--design choice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB vs Java Beans--design choice" Watch "EJB vs Java Beans--design choice" New topic
Author

EJB vs Java Beans--design choice

Yan Lee
Ranch Hand

Joined: Sep 15, 2003
Posts: 94
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.
B Wask
Greenhorn

Joined: Oct 08, 2003
Posts: 5
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.
Viswanatha GB
Greenhorn

Joined: Sep 19, 2001
Posts: 16
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
----------


==============(**)=================<br />Viswanatha.G.B<br />Sr.Software Engineer<br />IBM<br />==============(**)=================
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB vs Java Beans--design choice
 
Similar Threads
EJB - Local interface
Using JavaBean with Java classes, JSP and MS Access
Should I use EJB ?
Query rgarding some Patterns
MVC Design Isssue