透過 SessionContext 或 EntityContext (繼承 EJBContext) 提供:
getRollbackOnly(), setRollbackOnly())getCallerIdentity(), isCallerInRole())getEnvironment())UserTransaction (BMT 用)重要:Bean 內需呼叫其他 Bean 或傳遞自身參考時,不可用 this,必須用 SessionContext.getEJBObject() 取得 EJBObject 參考。
weblogic.password.user=pass兩種方式:
weblogic.security.group.employees=userAweblogic.security.group.manager=userBisCallerInRole() 自行判斷宣告式授權分離安全邏輯與商業邏輯,符合 EJB 設計哲學;程式化授權提供細粒度控制但增加耦合。