dcsimg
ejbStore() method in Entity BMP Bean with composite primary key, is not getting called at all at the time of update operation.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Prasanna_Hasabnis
Posted On:   Tuesday, January 28, 2003 06:50 AM

We have written an entity bean for a table which has a composit primary key. For this composite primary key, we have written a seperate class for checking the primary key. Through servlet when we are trying to set the values(i.e. trying to fire an update statement) of the ejbstore() method, we are not able to do so. On the server, it shows following sequence of execution :- EntityContext is called, then ejbActivate() is called, then ejbLoad() is called, then values are stored in the local variables of Entity Bean and after this it is expected to go to ejbStore() method where the actual update statement will be executed, but the very first line(i.e. System.out.println just to display a message) inside the ejbStore() method also doesn't get executed, i.e. control is not    More>>

We have written an entity bean for a table which has a composit primary key. For this composite primary key, we have written a seperate class for checking the primary key. Through servlet when we are trying to set the values(i.e. trying to fire an update statement) of the ejbstore() method, we are not able to do so. On the server, it shows following sequence of execution :- EntityContext is called, then ejbActivate() is called, then ejbLoad() is called, then values are stored in the local variables of Entity Bean and after this it is expected to go to ejbStore() method where the actual update statement will be executed, but the very first line(i.e. System.out.println just to display a message) inside the ejbStore() method also doesn't get executed, i.e. control is not passed to ejbStore() method at all. No error is given on the server too. In short, the execution never goes to ejbStore() method. We are able to do Insert(i.e. ejbCreate()), select(i.e. ejbLoad()) and Delete(i.e.ejbRemove()) functions very well. What could be the reason for the fail of ejbStore() method?

   <<Less

Re: ejbStore() method in Entity BMP Bean with composite primary key, is not getting called at all at the time of update operation.

Posted By:   Software_Framework  
Posted On:   Friday, January 31, 2003 03:45 PM

I don't have the exact answer because I don't know a lot about your situations. But you have all you need to figure this out.

Try the following:

Do you have a method name isModified that is return false and you're using Weblogic.

You should also check the docs of your app server to enable debug messages. Weblogic has a way to printout a lot of debug messages. Do a web search for "Weblogic ServerDebug DebugEJBCalls".

Most app servers have sample applications. You modify an ejb that is known to work and slowly convert it to be like your ejb. Change the primary key first, then add more logic like your ejb in small steps until you get the point where it doesn't work.

You can do the opposite, you can simplify the logic of your ejb until it does work.

I often find that I have to convince myself that is my problem before I can see it. As long as I think that it is somewhere else, I'm unable to find the problem. It is very unlikely that you found a bug in the application server.

About | Sitemap | Contact