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.
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.
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 ----------