Originally posted by Maulin Vasavada:
If I create entity bean for ITEM object then ejbCreate() will try to insert the ITEM in database everytime I obtain the reference to the bean, right?
Originally posted by Maulin Vasavada:
I seem to get it. Entity beans are "shared". So the transaction mgmt would do the job I want and I can go with that "Serialized ITEM Object" return which is not an Entity bean...
slowly I'm getting it. Actually, I had this cache thing in mind which led me to confusing entity bean beliefs. I wanted to cache those ITEM objects so that my application doens't result into querying the whole database all the time but I guess that can be solved now as Entity beans for the corresponding ITEM object (or ITEM_COLLECTION however I model it) would be pooled. hence cached...
Originally posted by Maulin Vasavada:
Now, I have been generating the IDs for my record depending upon some logic so I guess that before calling create() I must get the new ID for the record and then call create() as otherwise create() can't magically know the ID of the record.
Originally posted by Maulin Vasavada:
I would create entity bean for ITEM within that ITEM_COLLECTION and in my case ITEM_COLLECTION would also be an entity bean. . . . In this case, I guess I would have creation of ITEM entity bean embedded in the ITEM_COLLECTION bean, right?
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|