public Object lookup(String name) { try { return getContext().lookup(name); } catch (NamingException ignored) { } return null; }
/** * If transaction type is not Container or there is no transaction * then throw an exception. * * @throws IllegalStateException If transaction type is not Container, * or no transaction. */ public boolean getRollbackOnly() { if (isUserManagedTx()) throw new IllegalStateException("getRollbackOnly should not be access for user managed Tx"); AllowedOperationsAssociation.assertAllowedIn("getRollbackOnly", IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); // // jason: I think this is lame... but the spec says this is how it is. // I think it would be better to silently ignore... or not so silently // but still continue. // if (!isTxRequired()) { throw new IllegalStateException ("getRollbackOnly must only be called in the context of a transaction (EJB 2.0 - 15.5.1)"); } return super.getRollbackOnly(); }
public UserTransaction getUserTransaction() { if (isContainerManagedTx()) throw new IllegalStateException("getUserTransaction should not be access for container managed Tx"); AllowedOperationsAssociation.assertAllowedIn("getUserTransaction", IN_EJB_CREATE | IN_EJB_REMOVE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return super.getUserTransaction(); }
final UserTransaction ut = super.getUserTransaction(); return new UserTransaction()
/** * If transaction type is not Container or there is no transaction * then throw an exception. * * @throws IllegalStateException If transaction type is not Container, * or no transaction. */ public void setRollbackOnly() { if (isUserManagedTx()) throw new IllegalStateException("setRollbackOnly should not be access for user managed Tx"); AllowedOperationsAssociation.assertAllowedIn("getRollbackOnly", IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); if (!isTxRequired()) { throw new IllegalStateException ("setRollbackOnly must only be called in the context of a transaction (EJB 2.0 - 15.5.1)"); } super.setRollbackOnly(); }
/** Get the Principal for the current caller. This method cannot return null according to the ejb-spec. */ public Principal getCallerPrincipal() { AllowedOperationsAssociation.assertAllowedIn("getCallerPrincipal", IN_EJB_CREATE | IN_EJB_REMOVE | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_BUSINESS_METHOD | IN_AFTER_BEGIN | IN_BEFORE_COMPLETION | IN_AFTER_COMPLETION); return super.getCallerPrincipal(); }
public Principal getCallerPrincipal() { AllowedOperationsAssociation.assertAllowedIn("getCallerPrincipal", IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD); return super.getCallerPrincipal(); }
public Principal getCallerPrincipal() { AllowedOperationsAssociation.assertAllowedIn("getCallerPrincipal", IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return super.getCallerPrincipal(); }
public boolean getRollbackOnly() { AllowedOperationsAssociation.assertAllowedIn("getRollbackOnly", IN_EJB_CREATE | IN_EJB_POST_CREATE | IN_EJB_REMOVE | IN_EJB_FIND | IN_EJB_HOME | IN_EJB_LOAD | IN_EJB_STORE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return super.getRollbackOnly(); }
public boolean getRollbackOnly() { AllowedOperationsAssociation.assertAllowedIn("getRollbackOnly", IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD); return super.getRollbackOnly(); }
public boolean isCallerInRole(String id) { AllowedOperationsAssociation.assertAllowedIn("getCallerInRole", IN_EJB_CREATE | IN_EJB_POST_CREATE | IN_EJB_REMOVE | IN_EJB_FIND | IN_EJB_HOME | IN_EJB_LOAD | IN_EJB_STORE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return super.isCallerInRole(id); }
public EJBLocalHome getEJBLocalHome() { AllowedOperationsAssociation.assertAllowedIn("getEJBLocalHome", IN_SET_ENTITY_CONTEXT | IN_UNSET_ENTITY_CONTEXT | IN_EJB_CREATE | IN_EJB_POST_CREATE | IN_EJB_REMOVE | IN_EJB_FIND | IN_EJB_HOME | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_EJB_LOAD | IN_EJB_STORE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return super.getEJBLocalHome(); }
public EJBHome getEJBHome() { AllowedOperationsAssociation.assertAllowedIn("getEJBHome", IN_SET_ENTITY_CONTEXT | IN_UNSET_ENTITY_CONTEXT | IN_EJB_CREATE | IN_EJB_POST_CREATE | IN_EJB_REMOVE | IN_EJB_FIND | IN_EJB_HOME | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_EJB_LOAD | IN_EJB_STORE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return super.getEJBHome(); }
public EJBHome getEJBHome() { AllowedOperationsAssociation.assertAllowedIn("getEJBHome", IN_SET_SESSION_CONTEXT | IN_EJB_CREATE | IN_EJB_REMOVE | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_BUSINESS_METHOD | IN_AFTER_BEGIN | IN_BEFORE_COMPLETION | IN_AFTER_COMPLETION); return super.getEJBHome(); }
public Principal getCallerPrincipal() { AllowedOperationsAssociation.assertAllowedIn("getCallerPrincipal", IN_EJB_CREATE | IN_EJB_POST_CREATE | IN_EJB_REMOVE | IN_EJB_FIND | IN_EJB_HOME | IN_EJB_LOAD | IN_EJB_STORE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return super.getCallerPrincipal(); }
public EJBLocalHome getEJBLocalHome() { AllowedOperationsAssociation.assertAllowedIn("getEJBLocalHome", IN_SET_SESSION_CONTEXT | IN_EJB_CREATE | IN_EJB_REMOVE | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_BUSINESS_METHOD | IN_AFTER_BEGIN | IN_BEFORE_COMPLETION | IN_AFTER_COMPLETION); return super.getEJBLocalHome(); }
public TimerService getTimerService() throws IllegalStateException { AllowedOperationsAssociation.assertAllowedIn("getTimerService", IN_EJB_CREATE | IN_EJB_REMOVE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD); return new TimerServiceWrapper(this, super.getTimerService()); }
public Principal getCallerPrincipal() { EJBContextImpl ctxImpl = (EJBContextImpl) getEJBContext(); return ctxImpl.getCallerPrincipalInternal(); }
public boolean isCallerInRole(String id) { AllowedOperationsAssociation.assertAllowedIn("isCallerInRole", IN_EJB_CREATE | IN_EJB_REMOVE | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_BUSINESS_METHOD | IN_AFTER_BEGIN | IN_BEFORE_COMPLETION | IN_AFTER_COMPLETION); return super.isCallerInRole(id); }
public boolean isCallerInRole(String id) { AllowedOperationsAssociation.assertAllowedIn("isCallerInRole", IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD); return super.isCallerInRole(id); }