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)); } }
public String toString() { return getContainer().getBeanMetaData().getEjbName() + '#' + getId(); }
public void synchronize(Thread thread, Transaction tx, EntityEnterpriseContext instance) throws Exception { EntityContainer container = (EntityContainer)instance.getContainer(); if(container.getPersistenceManager().isStoreRequired(instance)) { throw new EJBException("The instance of " + container.getBeanMetaData().getEjbName() + " with pk=" + instance.getId() + " was not stored to prevent potential inconsistency of data in the database:" + " the instance was evicted from the cache during the transaction" + " and the database was possibly updated by another process."); } }
public void invokeEjbStore(Thread thread, EntityEnterpriseContext instance) throws Exception { if(instance.getId() != null) { EntityContainer container = (EntityContainer) instance.getContainer(); // set the context class loader before calling the store method SecurityActions.setContextClassLoader(thread, container.getClassLoader()); container.pushENC(); try { // store it container.invokeEjbStore(instance); } finally { container.popENC(); } } }
public void synchronize(Thread thread, Transaction tx, EntityEnterpriseContext instance) throws Exception { // only synchronize if the id is not null. A null id means // that the entity has been removed. if(instance.getId() != null) { EntityContainer container = (EntityContainer) instance.getContainer(); // set the context class loader before calling the store method SecurityActions.setContextClassLoader(thread, container.getClassLoader()); container.pushENC(); try { // store it container.storeEntity(instance); instance.setTxAssociation(SYNCHRONIZED); } finally { container.popENC(); } } } };
try ctxContainer = (EntityContainer)ctx.getContainer(); if(!ctx.hasTxSynchronization())