简体   繁体   中英

Java EJB entity beans performance

How performant is the entity bean? Would it be too much to ask if I want 1000 objects per table (probably about 20 tables) across 5 processes where some processes might be changing the objects as often as 60 times a second?

Are there any resources out there on the limitations of the entity bean?

Thanks for any help!

Performance is not really limited by the entities, but the JPA provider's implementation and your database.

It's impossible to give performance estimation, because so many factors affect it:

  • JPA implementation
  • JPA settings (like caching and batch writing)
  • Server hardware
  • Network
  • Database type
  • Database settings
  • Application server vendor
  • Number of threads

etc.

This test could give you some indication on performance of different JPA providers:

http://terrazadearavaca.blogspot.com/2008/12/jpa-implementations-comparison.html

I have not tested the performance too much personally, but I measured one of my processes. It executes one query to each insert, and uses an Oracle database. It's running in one thread and is doing more than 250 inserts (+250 queries) per second. I would expect that using several threads the performance would be much better, but I have not so far had the need to try it.

Apart from the technical context, an important factor is you application's design. A lot of early EJB applications suffered from horrendous performance because they carelessly used remote methods for everything, ie setting 5 attributes on a single EJB resulted in 5 network roundtrips.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM