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
-
weblogic ejbload problem (2 messages)
- Posted by: matt heaton
- Posted on: November 14 2000 20:30 EST
Threaded Messages (2)
- weblogic ejbload problem by matt heaton on November 15 2000 12:46 EST
- weblogic ejbload problem by John Harby on December 06 2000 19:54 EST
-
weblogic ejbload problem[ Go to top ]
- Posted by: matt heaton
- Posted on: November 15 2000 12:46 EST
- in response to matt heaton
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."
-
weblogic ejbload problem[ Go to top ]
- Posted by: John Harby
- Posted on: December 06 2000 19:54 EST
- in response to matt heaton
Try this link - there are some workarounds to this problem.
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#1046004