This task describes how to programmatically retrieve and call the AccessIntent API during the execution of BMP entity bean methods.
Steps for this task
InitialContext ic = new InitialContext(); AccessIntent ai = ic.lookup("java:comp/websphere/AppProfile/AccessIntent");
int concurrency = ai.getConcurrencyControl(); int accessType = ai.getAccessType(); if ( (concurrency == AccessIntent.CONCURRENCY_CONTROL_PESSIMISTIC) && (accessType == AccessIntent.ACCESS_TYPE_UPDATE) ) { int exclusive = ai.getPessimisticUpdateLockHint(); // . . . } // . . .
Result
Related information
Access intent with BMP entity beans
Access intent policies
Task overview: Application profiling