EJB -> Simple Class -> EJB calls in weblogic 6.0


EJB design: EJB -> Simple Class -> EJB calls in weblogic 6.0

  1. Hi ,

    I am using weblogic 6.0 with sp2 as Application Server for deploying me EJBeans .In my current design , there are many EJB <-> Simple Class <-> EJB calls per client request. But as all calls are by default RMI call . Every call is taking very high time for invoking method of called EJB from simple class.

    I have some questions regarding this .

    1.Can I can forcefully make 'Simple Class -> EJB' call by reference . (already tried call by reference tag of DD but not working)

    2. In above case if I logs timings for execution of diff methods of called EJBs or classes, Timings are not at all consistent . Method 'X' of some bean is taking 100 ms some time, next time it is taking 200 ms or 40 ms or 350 ms . Same thing is happening for EJB -> simple class method call too . why ?

    3.And First Request always takes maximum time to process . why ?

    I have gone through welogic 6.0 performance doc too .

    Please Reply

                                       - @bhijit


  2. Hi.

    1. In EJB2.0 there are local interfaces which support normal Java method invocations (still intercepted by container) which are faster. I know 6.1 supports EJB2.0 by default, I don't remember exactly about 6.0 - check the docs.
    2. These differences are not very big. They can result from many factors (garbage collection, background threads, OS slicing different times for WegLogic, etc). I wouldn't worry about it.
    3. A first request to an EJB may require instanciating a new bean. Other factors like starting a transaction, setting up socket connection with RMI, etc may be causing this effect.