EJB programming & troubleshooting: max-beans-in-cache

  1. max-beans-in-cache (2 messages)


    I have recently started trying out EJB on Weblogic 5.1 server. In case of stateful session beans, I provided the value for the property "max-beans-in-cache" as 2 in the file "weblogic-ejb-jar.xml" and instantiated 3 objects of my bean from a client. Inspite of this, the ejbPassivate() and ejbActivate() methods do not get executed. Is there anything else I need to do to make this happen?


    Threaded Messages (2)

  2. max-beans-in-cache[ Go to top ]

    Did u call any methods on the Bean...?
    I think only when u call methods on the bean will you actually see the EJBs getting created....untill then its just the Stubs that are responding to your call....

    - more doubts ...
  3. max-beans-in-cache[ Go to top ]

    First of all, thanks for your reply.
    Well, when I instantiated 3 objects from the client, ejbCreate() was indeed executed 3 times (I have included print messages in each of the ejb...() methods). After that, I called a business method of the bean from the client for all three instances and then, removed the instances (by ejbRemove()). Again, all the three business method calls were executed as well as the ejbRemove() was executed three times. My problem is that since I have specified max-beans-in-cache as 2, I expect ejbPassivate() and ejbActivate() also to be executed. Do I need to do anything else, apart from specifying the value for the property max-beans-in-cache in the file weblogic-ejb-jar.xml?