public EJBHome getEJBHome() { return manager.getEJBHome(); }
public EJBLocalHome getEJBLocalHome() { return manager.getEJBLocalHome(); }
public TimerService getTimerService() { return getManager().getTimerService(); }
public Object lookup(String name) throws IllegalArgumentException { return getManager().lookup(name); }
public UserTransaction getUserTransaction() { return getManager().getUserTransaction(); }
public void setRollbackOnly() { getManager().setRollbackOnly(); }
public boolean getRollbackOnly() { return getManager().getRollbackOnly(); }
public boolean isCallerInRole(String roleName) { // TODO: really? return getManager().isCallerInRole(getCallerPrincipal(), roleName); }
/** * Returns {@link TimerService} for the current {@link EJBContext} */ @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception { // get hold of EJBContext EJBContext currentEJBContext = CurrentInvocationContext.get().getEJBContext(); // now get hold of the BeanManager from the EJBContext. // Note that we could have directly used EJBContext.getTimerService(), but that // won't work in all cases, because the EJBContext.getTimerService() is an user API // and the spec mandates that this API throw an exception when invoked during injection. // Internal implementation (like injectors) of EJB3 will require to get hold of the // TimerService during injection (to actually do the injection). Hence we bypass the user // API and instead use the BeanManager.getTimerService() which doesn't have a restriction // on using it during injection. BeanManager beanManager = currentEJBContext.getManager(); // now finally get hold of the timerservice return beanManager.getTimerService(); }
public Object lookup(String name) throws IllegalArgumentException { return getManager().lookup(name); }
public EJBLocalHome getEJBLocalHome() { return getManager().getEJBLocalHome(); }
public EJBHome getEJBHome() { return getManager().getEJBHome(); }