How should complex find operations be implemented?
In bean-managed persistence (BMP) complex find operations are not difficult to implement, because you have complete control over how a find operation works through the ejbFind methods in the bean class. ejbFind methods in BMP entities can span multiple tables and even different data sources to locate the right entity beans. With container-managed persistence (CMP) its more difficult because you are dependent on the versatility of the EJB vendor. In other words, if the vendor does not support sophisticated find operations or syntax, its more difficult to declare complex find operations at deployment time. With CMP you have a couple options: · Convert the CMP bean to a BMP bean and hand code the ejbFind methods yourself. This is a classic scenario for using BMP over CMP; when the EJB vendor is not sophisticated enough to support a bean’s data access needs. · Use a session bean to obtain the data you need.
Related Questions
- There are a bunch of "sparse BLAS" operations in csr_matrix.h, like sparse matrix-vector multiply and sparse triangular solve. Why are they only implemented for CSR format sparse matrices?
- I would like to deploy an IPTV service for my network, but building a network appears too complex for my operations team. Does Minerva Networks offer installation and support services?
- How should complex find operations be implemented?