I have an entity which contains a number of primitively typed attributes which I would obviously like to persist through CMP, however it also contains an attribute which is/will become a network of smaller
java objects. For the moment I can store this attirbute as a BLOB (byte array via CMP) but later in the project lifetime I am going to have to build a database structure to store these objects in a more relational manner (for reporting purposes). I would like the entity bean to control the existence of these (dependent) java objects but am concerned about transactional integrity. If I use
jdbc picking up a connection from the same DataSource as is used for the CMP will the persistence of the java objects over this connection be automatically part of the transaction that I used to access my entity bean to make the accessor/mutator calls or will I have to do something extra to ensure it is included in the transaction ?
Also although currently I will be doing the persistence during the ejbStore and ejbLoad methods I was intending to lazy load the java objects when required. In many cases they won't be required so it seems wasteful to tie them in to every access of the entity.
(If I do need to do something extra is this a weblogic fix or is it portable across
EJB servers, nb currently using Weblogic 5.1 )
[This message has been edited by Tim Crampin (edited October 12, 2000).]
[This message has been edited by Tim Crampin (edited October 12, 2000).]