public EJBHome getEJBHome() { return manager.getEJBHome(); }
public EJBLocalHome getEJBLocalHome() { return manager.getEJBLocalHome(); }
public <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException { // we need an instance attached SessionContext ctx = getEJBContext(); return ctx.getManager().getBusinessObject(ctx, businessInterface); }
@Override public EnterpriseBeanEffigy getEffigy() { // you've got to love the compiler InvocationContext ctx = ((org.jboss.ejb3.core.context.EJBInvocation) this).getInvocationContext(); return ((EJBContainer) ctx.getEJBContext().getManager()).getEffigy(); }
public EJBLocalObject getEJBLocalObject() throws IllegalStateException { SessionContext ctx = getEJBContext(); return ctx.getManager().getEJBLocalObject(ctx); }
public EJBObject getEJBObject() throws IllegalStateException { SessionContext ctx = getEJBContext(); return ctx.getManager().getEJBObject(ctx); }
protected InvocationContext getCurrentInvocationContext() { InvocationContext current = CurrentInvocationContext.get(InvocationContext.class); assert current.getEJBContext() == this; return current; }
public boolean wasCancelCalled() { return getDelegate().wasCancelCalled(); } }
public EJBObject getEJBObject() throws IllegalStateException { // to allow override per invocation return getCurrentInvocationContext().getEJBObject(); }
public UserTransaction getUserTransaction() throws IllegalStateException { // to allow override per invocation return getCurrentInvocationContext().getUserTransaction(); }
public void setRollbackOnly() throws IllegalStateException { // to allow override per invocation getCurrentInvocationContext().setRollbackOnly(); } }
public <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException { // to allow override per invocation return getCurrentInvocationContext().getBusinessObject(businessInterface); }
public TimerService getTimerService() throws IllegalStateException { // to allow override per invocation return getCurrentInvocationContext().getTimerService(); }
@SuppressWarnings("deprecation") public Identity getCallerIdentity() { return getDelegate().getCallerIdentity(); }
@SuppressWarnings("deprecation") public boolean isCallerInRole(Identity role) { return getDelegate().isCallerInRole(role); }
protected SessionInvocationContext getCurrentInvocationContext() { SessionInvocationContext current = CurrentInvocationContext.get(SessionInvocationContext.class); assert current.getEJBContext() == this; return current; }
public EJBLocalObject getEJBLocalObject() throws IllegalStateException { // to allow override per invocation return getCurrentInvocationContext().getEJBLocalObject(); }
public Principal getCallerPrincipal() { // per invocation return getCurrentInvocationContext().getCallerPrincipal(); }
public boolean getRollbackOnly() throws IllegalStateException { // to allow override per invocation return getCurrentInvocationContext().getRollbackOnly(); }
public boolean isCallerInRole(String roleName) { // TODO: really? return getManager().isCallerInRole(getCallerPrincipal(), roleName); }