• 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

Why EJB ?

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone suggests a better idea for using ejb's.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic