Hello All, i have develop a simple Entity, from Mastring_EJB2 by theserverside....
it is the very first example of entity bean what i am getting wrong when i change the client side code and use only findByPrimaryKey method to get a refference of remote interface...
account.getBalance(); //it will give the right output that is 100.
now when i call the deposit method on it like
it will give me the right output i-e 600 but record in the DB is not updated, when i see the output which is debugged on server side the ejbStore() gives the followin output
22:59:36,351 INFO [STDOUT] ejbStore() Called
22:59:36,351 INFO [STDOUT] Raheel 100.0 null
the third value that is null is the primary key, i don't no why it is shows null because i have the refference of remote interface when i call the ejbFindByPrimaryKey and when i query to get the OwnerName() after getting the refference it will give me a accurate result and also when deposit() method called it did the right thing by adding 500 but it add only in the entity bean instance not updated in the database....
any help will be great full.
with best regards.. and thanks in advacne...
What kind of entity bean is it?
CMP or BMP
Hi, the bean i made is BMP on Jboss 3.2.1 and mysql 3.23.46-nt
Just checking... You did write the SQL to store the bean in the database?
The other thing i notice that untill and unless container is running it shows the updated balance but record is not updated in the database table i am very much stuck because of that....
with best regards...
From your reply I believe your ejbStore has some problem. Check your SQL query