Documentos de Académico
Documentos de Profesional
Documentos de Cultura
myBeanHome1.create(....);
myBeanHome2.create(...);
tran.commit();
}catch(...){}
You may want to check if you're already running in a transaction by
calling tran.getStatus().
When should I adopt BMP and when I should use CMP?
You can use CMP and BMP beans in the same application... obviously, a
bean can be BMP or CMP, not both at the same time (they are mutually
exclusive).
There is a common approach that is normally used and considered a good
one. You should start developing CMP beans, unless you require some
kind of special bean, like multi-tables, that cannot be completely realized
with a single bean. Then, when you realize that you need something more
or that you would prefer handling the persistence (performanbce issue
are the most common reason), you can change the bean from a CMP to a
BMP.