Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) Part Number E13981-01 |
|
|
View PDF |
To improve performance of an EJB 2.1 entity bean with bean-managed persistence, consider the following:
For EJB 2.1 entity beans with bean-managed persistence that do not change after activation, you can specify the entity bean as read-only. When you configure an entity bean with bean-managed persistence as read-only, OC4J uses a special case of commit option A to improve performance by performing the following:
caching the instance;
not calling ejbLoad
after activation;
not updating the instance or calling ejbStore
when the transaction commits.
For more information, see "Configuring a Read-Only Entity Bean With Bean-Managed Persistence".
For EJB 2.1 BMP applications, you can configure the BMP commit option as A or C. Commit option A offers a performance improvement by postponing a call to ejbLoad
method. For more information, see "Commit Options and BMP Applications".
If you configure a read-only entity bean with bean-managed persistence to use commit option A, you can further improve performance by taking advantage of caching of the read-only entity bean with bean-managed persistence. For more information, see "Read-Only Entity Beans With Bean-Managed Persistence".