Discussions

EJB programming & troubleshooting: weblogic ejbload problem

  1. weblogic ejbload problem (2 messages)

    I've been trying to track down the performance problems in a prototype application that a wrote and deployed on Weblogic 5.1 It turns out that everytime I make a method call to any Entity bean it calls EJB load on that bean, even if the EJB is already in the cache. This behavior seems to indicate that the EJB is participating in a transaction. I'm not declaring any transactions in my deployment descriptor and all the documentation says the TX_SUPPORTED is the default.

    For a test I tried telling all the beans never to participate in a transaction and they still call EJBLoad every time a method is called on them. I can even do something like this:


    for (int i=0; i<100; i++) {
           MyEJB myEJB = (MyEBJ) home.findByPrimaryKey (1);
           int i = myEJB.getSomeValue ();
    }

    And the ejbLoad method of MyEJB will be called 200 hundred times. This problem has been frustrating me all day so any insight would be appreciated.

    -Matt


    Threaded Messages (2)

  2. weblogic ejbload problem[ Go to top ]

    I was told by a BEA support person that this is a the correct behavior, but that doesn't make any sense since it both goes against everything I've read and would make caching of entity beans pointless in many cases.

    Here's what I was told would happen in an entity bean regardless of the transaction attribute you supplied. Is this true???

    "An entity bean that is not participating in a transaction acts like its running in a local transaction. i.e. There is a start-tx before the method call and a commit after. That's why you see the ejbLoad and ejbStore calls around the method. That's correct behavior."

  3. weblogic ejbload problem[ Go to top ]

    Try this link - there are some workarounds to this problem.

    http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#1046004