aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Why EJB ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Why EJB ?" Watch "Why EJB ?" New topic
Author

Why EJB ?

Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
Hi All,

I would like to clear my doubts about the usage of EJB in the J2EE application.

When to use EJB instead of servlets + javabeans + jdbc api? In my application which contains normal transactions (view/modify/delete, 10000 users + assumming max 100 users doing concurrent transaction), I have used the MVC architecture and deployed in weblogic app server and the application is currently running fine with out any problem.

What will happen if we replace the javabeans + jdbc api with EJB? Do the performance will improve? ( I have read that using Entity beans will affect the performance? Or making the servlet as a controller and put the business logic in the session bean just to differentiate control logic from bus logic.)

I read that EJB means for transactions, security, distributed computing and no need to be expert in SQL Language, But I think we will use the same transaction code in both cases as we are getting the connection from Connection pool(Assuming that I am not changing the transaction parameter in the deployment descriptor!!). Except the security and distributed computing do we need to use the EJB if the developer is well verse in SQL Coding?

In our application we are using our own security mechanism to authenticate & Authorize the users. I am using the servlets + javabeans for distributed computing. So why EJB?

Thanks & Regards,
M.S.Raman
Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
Can anyone suggests a better idea for using ejb's.
Francis Shillitoe
Greenhorn

Joined: Aug 30, 2002
Posts: 22
The choice to use EJBs or not shouldn't really be based on your team's SQL knowledge. The decision to use EJBs should be based on whether the following services are required:

- Transaction support
- Management of multiple instances (pooling)
- Persistence support
- Security support
- Multithreading support
- Synchronisation

The excellent book "Mastering Enterpise Jave Beans" can be downloaded FREE from:

http://www.theserverside.com/books/wiley/masteringEJB/index.tss

Francis


<a href="http://www.shillitoe.com" target="_blank" rel="nofollow">http://www.shillitoe.com</a>
Rohit Ahuja
Ranch Hand

Joined: Oct 04, 2001
Posts: 121
Malli,
Simply put i do not think ur project currently needs EJBs. People in India have a misconception that EJBs make things faster and use it where their existance is literally not needed. Moral of the story. if ur app is currently working fine dont try to do something funny with it and mess it up. 100 concurrent users can be handled by simple beans.No need of EJBs.


Face Off.
Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
Originally posted by Francis Shillitoe:

- Transaction support
- Management of multiple instances (pooling)
- Persistence support
- Security support
- Multithreading support
- Synchronisation



Thanks Francis,John for replying my query.

I think EJB can be used when the no of concurrent transaction is more, where you don't want to use multi threading(Container only can implement the multithreading).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why EJB ?