public ComponentInvocation getCurrentInvocation() { return _invManager.getCurrentInvocation(); }
/** * Instantiates and injects the given tag handler class for the given * WebModule */ public <T extends JspTag> T createTagHandlerInstance(WebModule module, Class<T> clazz) throws Exception { WebComponentInvocation inv = new WebComponentInvocation(module); try { invocationMgr.preInvoke(inv); return injectionMgr.createManagedObject(clazz); } finally { invocationMgr.postInvoke(inv); } }
public void register() { invManager.registerComponentInvocationHandler(ComponentInvocationType.SERVLET_INVOCATION, this); }
if (invocationManager.getCurrentInvocation() == null) { invocationManager.preInvoke(ejbInv); invocationManager.postInvoke(ejbInv); invocationManager.preInvoke(ejbInv); if (ejbInv != null) { try { invocationManager.postInvoke(ejbInv); if( initGotToPreInvokeTx ) { postInvokeTx(ejbInv);
invocation = (EjbInvocation) invocationManager.getCurrentInvocation(); if (invocation == null) { _logger.log(Level.SEVERE, "containers.mdb.no_invocation", invocationManager.postInvoke(invocation);
private void preInvoke(WebModule ctx) { WebModule wm = (WebModule)ctx; ComponentInvocation inv = new WebComponentInvocation(wm); invocationMgr.preInvoke(inv); }
private void postInvoke(WebModule ctx) { WebModule wm = (WebModule)ctx; ComponentInvocation inv = new WebComponentInvocation(wm); invocationMgr.postInvoke(inv); }
invocation = (EjbInvocation) invocationManager.getCurrentInvocation(); if (invocation == null) { _logger.log(Level.SEVERE, "containers.mdb.no_invocation", invocationManager.postInvoke(invocation);
public ComponentInvocation startInvocation() { // We need to split the preInvoke tasks into stages since handlers // need access to java:comp/env and method authorization must take // place before handlers are run. Note that the application // classloader was set much earlier when the invocation first arrived // so we don't need to set it here. EjbInvocation inv = container_.createEjbInvocation(); // Do the portions of preInvoke that don't need a Method object. inv.isWebService = true; inv.container = container_; inv.transactionAttribute = Container.TX_NOT_INITIALIZED; // AS per latest spec change, the MessageContext object in WebSvcCtxt // should be the same one as used in the ejb's interceptors' // TODO // inv.setContextData(wsCtxt); // In all cases, the WebServiceInvocationHandler will do the // remaining preInvoke tasks : getContext, preInvokeTx, etc. invManager_.preInvoke(inv); return inv; }
public void endInvocation(ComponentInvocation inv) { try { EjbInvocation ejbInv = (EjbInvocation) inv; // Only use container version of postInvoke if we got past // assigning an ejb instance to this invocation. This is // because the web service invocation does an InvocationManager // preInvoke *before* assigning an ejb instance. So, we need // to ensure that InvocationManager.postInvoke is always // called. It was cleaner to keep this logic in this class // and WebServiceInvocationHandler rather than change the // behavior of BaseContainer.preInvoke and // BaseContainer.postInvoke. if( ejbInv.ejb != null ) { container_.webServicePostInvoke(ejbInv); } else { invManager_.postInvoke(inv); } } catch(Throwable t) { logger_.log(Level.WARNING, "Unexpected error in EJB WebService endpoint post processing", t); } }
public ComponentInvocation getCurrentInvocation() { return _invManager.getCurrentInvocation(); }
/** * Instantiates and injects the given Servlet class for the given * WebModule */ <T extends Servlet> T createServletInstance(WebModule module, Class<T> clazz) throws Exception { validateJSR299Scope(clazz); WebComponentInvocation inv = new WebComponentInvocation(module); try { invocationMgr.preInvoke(inv); return injectionMgr.createManagedObject(clazz); } finally { invocationMgr.postInvoke(inv); } }
public ComponentInvocation startInvocation() { // We need to split the preInvoke tasks into stages since handlers // need access to java:comp/env and method authorization must take // place before handlers are run. Note that the application // classloader was set much earlier when the invocation first arrived // so we don't need to set it here. EjbInvocation inv = container_.createEjbInvocation(); // Do the portions of preInvoke that don't need a Method object. inv.isWebService = true; inv.container = container_; inv.transactionAttribute = Container.TX_NOT_INITIALIZED; // If the endpoint has at least one handler, method // authorization will be performed by a container-provided handler // before any application handler handleRequest methods are called. // Otherwise, the ejb container will do the authorization. inv.securityPermissions = Container.SEC_NOT_INITIALIZED; // AS per latest spec change, the MessageContext object in WebSvcCtxt // should be the same one as used in the ejb's interceptors' // TODO // inv.setContextData(wsCtxt); // In all cases, the WebServiceInvocationHandler will do the // remaining preInvoke tasks : getContext, preInvokeTx, etc. invManager_.preInvoke(inv); return inv; }
public void endInvocation(ComponentInvocation inv) { try { EjbInvocation ejbInv = (EjbInvocation) inv; // Only use container version of postInvoke if we got past // assigning an ejb instance to this invocation. This is // because the web service invocation does an InvocationManager // preInvoke *before* assigning an ejb instance. So, we need // to ensure that InvocationManager.postInvoke is always // called. It was cleaner to keep this logic in this class // and WebServiceInvocationHandler rather than change the // behavior of BaseContainer.preInvoke and // BaseContainer.postInvoke. if( ejbInv.ejb != null ) { container_.webServicePostInvoke(ejbInv); } else { invManager_.postInvoke(inv); } } catch(Throwable t) { logger_.log(Level.WARNING, "Unexpected error in EJB WebService endpoint post processing", t); } }
public void register() { invManager.registerComponentInvocationHandler(ComponentInvocationType.EJB_INVOCATION, this); }
private boolean inFinder() { boolean inFinder = false; ComponentInvocation ci = container.invocationManager.getCurrentInvocation(); if ( ci instanceof EjbInvocation ) { EjbInvocation inv = (EjbInvocation) ci; Method currentMethod = inv.method; inFinder = ( (currentMethod != null) && inv.isHome && currentMethod.getName().startsWith("find") ); } return inFinder; }
/** * Instantiates and injects the given Filter class for the given * WebModule */ <T extends Filter> T createFilterInstance(WebModule module, Class<T> clazz) throws Exception { validateJSR299Scope(clazz); WebComponentInvocation inv = new WebComponentInvocation(module); try { invocationMgr.preInvoke(inv); return injectionMgr.createManagedObject(clazz); } finally { invocationMgr.postInvoke(inv); } }
this.invocationManager.preInvoke(invocation);
invocationManager.postInvoke(((InvocationContext)contextHandle).getInvocation());
public void register() { invManager.registerComponentInvocationHandler(ComponentInvocationType.EJB_INVOCATION, this); }