public TimerService getTimerService() throws IllegalStateException { AllowedOperationsAssociation.assertAllowedIn("getTimerService", IN_EJB_CREATE | IN_EJB_REMOVE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return new TimerServiceWrapper(this, super.getTimerService()); }
/** * Create a new instance synchronization instance. */ InstanceSynchronization(Transaction tx, EntityEnterpriseContext ctx) { this.tx = tx; this.ctx = ctx; this.lock = container.getLockManager().getLock(ctx.getCacheKey()); }
public EJBLocalObject getEJBLocalObject() { if(ejbLocalObject == null && con.getLocalHomeClass() != null) { ejbLocalObject = ((EntityContainer)con).getLocalProxyFactory().getEntityEJBLocalObject(id); } return ejbLocalObject; }
/** * This method does invocation interpositioning of tx and security, * retrieves the instance from an object table, and invokes the method * on the particular instance */ public Object internalInvoke(Invocation mi) throws Exception { // Invoke through interceptors return getInterceptor().invoke(mi); }
/** * Invokes ejbStore method on the instance * @param ctx the instance to invoke ejbStore on * @throws Exception */ public void invokeEjbStore(EntityEnterpriseContext ctx) throws Exception { if (ctx.getId() != null) { final EntityPersistenceManager pm = getPersistenceManager(); pm.invokeEjbStore(ctx); } }
public TimerService getTimerService() throws IllegalStateException { AllowedOperationsAssociation.assertAllowedIn("getTimerService", IN_EJB_CREATE | IN_EJB_POST_CREATE | IN_EJB_REMOVE | IN_EJB_HOME | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_EJB_LOAD | IN_EJB_STORE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); return new TimerServiceWrapper(this, getContainer().getTimerService(id)); } }
protected boolean canPassivate(EnterpriseContext ctx) { if (ctx.isLocked()) { // The context is in the interceptor chain return false; } if (ctx.getTransaction() != null) { return false; } Object key = ((EntityEnterpriseContext)ctx).getCacheKey(); return m_container.getLockManager().canPassivate(key); }
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 boolean isCallerInRole(String id) { AllowedOperationsAssociation.assertAllowedIn("isCallerInRole", IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD); return super.isCallerInRole(id); }
public void setRollbackOnly() { AllowedOperationsAssociation.assertAllowedIn("setRollbackOnly", IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD); super.setRollbackOnly(); }
public UserTransaction getUserTransaction() { AllowedOperationsAssociation.assertAllowedIn("getUserTransaction", IN_EJB_CREATE | IN_EJB_REMOVE | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_BUSINESS_METHOD); return super.getUserTransaction(); }
public EJBHome getEJBHome() { AllowedOperationsAssociation.assertAllowedIn("getEJBHome", IN_SET_SESSION_CONTEXT | IN_EJB_CREATE | IN_EJB_REMOVE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD); return super.getEJBHome(); }
public boolean getRollbackOnly() { AllowedOperationsAssociation.assertAllowedIn("getRollbackOnly", IN_BUSINESS_METHOD | IN_AFTER_BEGIN | IN_BEFORE_COMPLETION); return super.getRollbackOnly(); }
/** * A default implementation of stopping the container service (no-op). The * concrete container classes should override this method to introduce * implementation specific stop behaviour. */ protected void stopService() throws Exception { localProxyFactory.stop(); removeTimerService(null); teardownEnvironment(); }
/** * associate instance with transaction */ private void associate(Transaction tx, EntityEnterpriseContext entity) throws RollbackException, SystemException { GlobalTxSynchronization globalSync = getGlobalSynchronization(tx); //There should be only one thread associated with this tx at a time. //Therefore we should not need to synchronize on entityFifoList to ensure exclusive //access. entityFifoList is correct since it was obtained in a synch block. globalSync.associate(entity); }
public EJBObject getEJBObject() { // Context can have no EJBObject (created by finds) in which case // we need to wire it at call time if(ejbObject == null && con.getProxyFactory() != null) { ejbObject = (EJBObject)con.getProxyFactory().getEntityEJBObject(id); } return ejbObject; }
protected void setKey(Object id, EnterpriseContext ctx) { ((EntityEnterpriseContext)ctx).setCacheKey(id); ctx.setId(id); }
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 void setRollbackOnly() { AllowedOperationsAssociation.assertAllowedIn("setRollbackOnly", IN_BUSINESS_METHOD | IN_AFTER_BEGIN | IN_BEFORE_COMPLETION); super.setRollbackOnly(); }
public UserTransaction getUserTransaction() { AllowedOperationsAssociation.assertAllowedIn("getUserTransaction", NOT_ALLOWED); return super.getUserTransaction(); }