This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
We are using db2 sequence for primary key generation. Session bean gets next sequence number and put it into create method of entity bean. I wonder if it make sense to put this call inside create method and remove pk from parameters list. Please keep in mind that it’s CMP. thx in advance
of course this would be the right approach , what is the use of passing one more parameter from bean to bo man ? and so what if it is cmp , u dont pass the primary key but pass all other things , and then take the key from ur id generator and use it there only. we do the same in our case so enjoy
WARNING! This will NOT work in all CMP implementations! For instance, WebSphere does not support this. Currently there are vendor-specific support for this in some servers, but not in all. This is outside the 2.0 CMP spec, and is not guaranteed to be portable!