Which method from EntityContext interface must NOT be invoked from within the EJBLoad method? answer is : getUserTransaction() for BMT only. The answer also refers to page 180 of ejb spec, but I couldn't find that anywhere. Will anyone help me out verify the answer. Secondly, I would like to know from what methods getUserTransaction could be called. EJBLoad always runs in a transaction context so it not being able to call getUserTransaction() doesn't seem logical to me. thanks. - walk rustin
This is because entity beans are allowed to use only CMT transactions and in CMT transactions you cannot obtain reference to the usertransactions. In Pg 180 of the spec table 4 list all the methods which can be invoked from the methods of entity beans
Hi, I am new to Javaranch. I've just started preparing for SCBCD. I do not have much experience in EJB. But, what I understood from HF book is that, ejbLoad and ejbStore are called by the container when you use CMT. But, getUserTransaction can only be used with BMT, because the bean provider has to deal with the transaction. If you invoke getUserTransaction from ejbLoad, you are trying to use userTransaction for CMT, which doesn't make sense. I am not sure if this is the correct answer to your question, but this is what I understood goign through the HF book.
--------------<br />Sany Bel<br />SCJP 1.4, SCBCD
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!