📄 ejbcontext.txt
字号:
package javax.ejb;
import java.security.Identity;
import java.security.Principal;
import java.utilProperties;
import java.transaction.UserTransaction;
public interface EJBContext {
public abstract Identity getCallerIdentity();
//getCallerPrincipal()方法返回java.security.Principal,标志Bean实例对象
//的调用者。
public abstract Principal getCallerPrincipal();
//getEJBHome()方法返回Bean的远程主接口。
public abstract EJBHome getEJBHome();
//getEJBLocalHome()方法返回Bean的本地主接口。
public abstract EJBLocalHome getEJBLocalHome();
public abstract Properties getEnvironment();
public abstract boolean getRollbackOnly()
throws IllegalstateException;
//getUserTransaction()方法用于返回UserTransaction接口。
public abstract UserTransaction getUserTransaction()
throws IllegalstateException;
//isCallerInRole()方法测试会话Bean实例调用者是否有特定角色。
public abstract boolean isCallerInRole(String s);
public abstract boolean isCallerInRole(Identity identity);
//setRollbackOnly()方法让实例标识当前事务,使事务回滚。
public abstract void setRollbackOnly( )
throws IllegalstateException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -