Access intent best practices
This topic outlines issues to consider when applying access intent policies to Enterprise JavaBeans (EJB) methods.
- Start by configuring the default access intent policy for an entity. After your application is built and running, you can more finely tune certain access paths in your application using application profiling or method-level access intent.
- Don't mix access types. Avoid using both pessimistic and optimistic policies in the same transaction. For most databases, pessimistic and optimistic policies use different isolation levels. This can result in multiple database connections, which prevents you from taking advantage of the performance benefits possible through connection sharing.
- Take care when applying wsPessimisticUpdate-NoCollision. This policy does not ensure data integrity. No database locks are held, so concurrent transactions can overwrite each other's updates. Use this policy only if you can be sure that only one transaction attempts to update persistent store at any given time.