• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Performance Problem with EJB--Need expert guidence

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on an enterprise application using following architecture-
Java Thin Client -> Session Beans (Stateless) -> Entity Beans -> Oracle 8.1.7
I am using VAJ 3.5 for application development with WebSphere application server 3.5.
I am facing following problem-
1.It takes about 65 seconds to return a create call for Session bean from client application.
2.A method call on this newly created session bean takes about 60-65 seconds to return.
3.Then onwards, any other method call to the same session bean takes only a fraction of a second to execute.
Now my question is why does it take so long to return a create call? And why does it take so long to return method call for the very first time?
How can this time be reduced?
WebSpere is running on HP-Ux with good amount of memory available to it (~500MB/processor).
4.The ejbCreate method does not have any implementation for it. So there is no chance of any cascade creates that might trigger in it.
5.I downloaded the Resource Analyzer from IBM site for WAS3.5. I am studying it to see how far can I use it to track down this performance problem.
My initial analysis shows that it takes only 390 msecs to execute the first time method is called (point 2 in my previous post).
Whereas Client Application waits for 60-65 seconds before method call returns.
So now my question is where is this time going in?
Why it takes that long for WAS to find the bean and execute the method call?
6.The subsequent calls to the same method takes even less time (point 3 in my earlier posting). Avg. 261 msecs for 2 method calls. This time client receives the returns immediately. (Just to clarify - it does not matter if I call the same method or a different method for SLSB, method returns immediately.)
I am not able to understand why would it take almost 60-65 seconds to call a method on newly created session bean.
Whereas it takes no time for subsequent method calls to complete.
My guess is it may be the similar case when client calls create method for SLSB.
Every method call does very much the same thing.
a.Lookup Entity Bean, call finders, collect/update data and return.
b.Sometimes create another session bean and call its methods, that in-tern perform step a.
I also checked (using resource analyzer) -
orb thread pool - is never maxed out.
Database connection pool - 0 wait time.
I know there is some bottleneck, but where? How to locate it?
I have following understanding of how a remote method is called. Broadly-
Client (1) -> remote method call (2) -> orb layer (3) -> container implementation (4) -> method execution (server) (5) -> return value (6) -> orb layer (7) -> return value to client (8)
Between step (1) to (8) it takes ~65 seconds - for "first time method call" (and for "create" also).
Step (5) takes only 0.39 secs for "first time call".
So where rest of the time is going?
What is happening at step (2), (3) and (4) and how to analyze it?
And why it happens only in the beginning of session bean life cycle?
Another interesting fact is that, this kind of delay does not happen when one session bean creates another session bean and executes its methods.
 
reply
    Bookmark Topic Watch Topic
  • New Topic