/** * Pops EJB's ENC from the stack. Delegates to whatever implementation * is used to pop the EJB's ENC from the stock * */ protected void popEnc() { encFactory.popEnc(this); }
/** * Makes sure that EJB's ENC is available * Delegates to whatever implementation is used to push the ENC of the EJB * onto the stack * */ protected void pushEnc() { encFactory.pushEnc(this); }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if(encFactory == null) throw new IllegalStateException("EJBTHREE-2056: EjbEncFactory is null, usage of java:comp is not allowed before CREATE"); return method.invoke(encFactory.getEnc(EJBContainer.this), args); } catch(InvocationTargetException e) { throw e.getTargetException(); } } };
public void destroy() throws Exception { // Once enc is destroyed, the encInjectors are invalid as well. injectors = new ArrayList<Injector>(); encInjectors = new HashMap<String, EncInjector>(); encFactory.cleanupEnc(this); enc = null; // TODO: clean up BeanContainer? //super.cleanup(); /* * EJBTHREE-1984: Leave invocations blocked */ // Restore to pre- create() state // this.allowInvocations(); // EJBTHREE-1889: make the bean resurrectable resurrectMetaData = true; }
enc = encFactory.getEnc(this);