0

I have been working in a Government Project using EJBs. I have found some Server issues while deploying EJBs. People working in my project have thought about removing EJBs from between the RequestHandler & DAO and to directly call DAO methods from RequestHandler.

My argument with this matter is, how can we even think about removing EJBs from the project which itself has the base framework as EJB !!!

Please inform about the correct solution required to improve performance while deployment & also inform the other way to improve speed & performance.

Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225
Sarang
  • 339
  • 2
  • 6
  • 16

4 Answers4

1

Check whether you are doing remote EJB calls or local EJB calls. Doing remote calls within a project might lead to performance issues (if you are logically working locally).

lastcosmonaut
  • 208
  • 1
  • 7
1

I have worked on a few projects where removing EJB improved performance dramatically.

For me using EJBs is about improving productivity and the quality of the solution you produce rather than worrying about performance. Usually performance isn't a big issue, but if it is you can throw hardware at it and use a cloud/distributed solution, which costs less than it used to. i.e. it can be cheaper than spending more time developing.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
0

Depends on what EJBs you are talking about.

Session Beans : Having them or not will have barely any impact on performance.

Entity Beans : Entity beans can have a drastic effect on performance. I would use them in a situation where you are dealing with complex transactions in create, delete or update calls (CRUD). In situations where I am just calling a query (CRUD) which returns 1000s of records I might switch to pure JDBC.

A lot of JPA/EJB containers these days are pretty smart, so maybe they can delegate performance issues to the database level.

For example: If I return 10000 customer objects, and each customer has multiple addresses, I could join the customer and address objects in the EJB layer. This may be as fast as creating a join in the database level and returning data as a view if the EJB container is smart enough.

Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225
0

it's impossible to answer the question with no information provided. however, if you don't use the ejb services for anything you may as well get rid of them. it's not unlikely the reason to call your dao via ejb in the first place was to utilize CMT, so if you ditch ejb you need to handle transactions by other means.

in general, my advice is to try to figure out what the question/problem really is before you start looking for answers.

Jon Martin Solaas
  • 737
  • 1
  • 10
  • 19