Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Are EJBs really this slow?

843829Mar 19 2004 — edited Mar 26 2004
Hi,

I am having difficulty with the speed my application server is handling EJB access.

I am currently using JRun 4 (SP3), and have used its servlet/JSP, JDBC pooling, and a JMS facilities. For our next project I would like to make the move to using Session EJBs as the application breaks down into services quite well, and I would like the option to access these services from other servers as well as one day move to a clustered environment. My problem, as I have said, is one of speed.

I am only using Stateless Session EJBs as I am using JDO for persistence (JDOGenie). I am having trouble believing that EJB is this slow. If I access the service as a POJO from a JSP the response is quite acceptable (I am using grinder to create 20 processes with 20 threads each, cycling 20 times, so a total of 400 hits 20 times) at around 500ms to bring back and display the information. The same test in JRun using EJB (using the home locator pattern) takes over 2500ms mean response time.

At first I assumed it was either EJB or JRun so I decided to try JBoss 3.2 and WebLogic 8.1 as these are as far as I know more industrial standard app servers (JBoss is complicated but free, and WebLogic is nice but expensive). The results have confused me more� JBoss did a bit better than JRun at around 2000ms (although tomcat did not seem happy about the number of connections) and WebLogic flew through it at around 300ms!

JRun 4 (SP3) JSP mean response time ~500ms
JRun 4 (SP3) EJB mean response time ~3000ms
JBoss 3.2 EJB mean response time ~2000ms
WebLogic 8.1 EJB mean response time ~300ms

All this has been done on the same server, a 2.4 Gb Pentium 4, 1Gb Ram.

I have tried both local session beans and remote and the results hardly varied.

I must have missed something, as I can�t believe that WebLogic can be that much better than JBoss and JRun, am I wrong? Can anyone suggest a setting(s) that I should check, or even something in my EJB I should check?

I am very new to EJBs (though not Java) so I would appreciate any suggestions no matter how obvious they may be as I am very keen to use EJBs if I can, but we cannot move to something that under load performs so much worse than our current Servlet/JSP setup.

Thank you,

Ian Grant
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2004
Added on Mar 19 2004
11 comments
274 views