on 05-31-2006 1:12 PM
Hi all,
is it possible to update with EJB CMP?? If yes... how?
Thanks,
Vito
Hi Vito,
Why not, we can do that. Please refer some of the awesome links as i am listing below,
Concepts of CMP:
http://www.caucho.com/resin-3.0/cmp/tutorial/index.xtp
http://java.sun.com/products/jdo/JDOCMPFAQ.html
Some examples and source code :
http://java.sun.com/j2ee/sdk_1.3/1.3_01/techdocs/release/CMP-RI.html
http://java.sun.com/developer/technicalArticles/ebeans/EJB20CMP/index.html
I hope these will be good enough clear your doubts, if feel necessary reply back.
Regards,
Guru.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry Maksim,
for example, if I have a record in the table that has a primary key N, if I want to update this record with another one with the same value for primary key.....
...in this case I must generate the related entity bean (persistency layer) and use the set methods. Is this right? The record will be updated? <u>Is it the same like I write a record?</u> I don't worry if the record is present in the table(??)
Do you confirm? Thanks,
Vito
Hi Vito,
Are you familiar with enitiy beanse? First you have to get reference to home interface (through JNDI), call one of find methods (or create for enitity creation), get reference to component interface of entity bean (or collection of it if it is multiple entities finder), and afterwards call one of setter ot getter(update on DB level is done implicitly).
BTW, primary key MUST be unique.
Best regards, Maksim Rashchynski.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.