Examples of deactivate()


Examples of org.jboss.weld.context.bound.BoundRequestContext.deactivate()

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager.getBeans(
                        BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
                final BoundRequestContext requestContext = (BoundRequestContext) manager.getReference(requestContextBean,
                        BoundRequestContext.class, ctx);
                requestContext.deactivate();
                requestContext.dissociate(requestContexts.get());

                final Bean<BoundConversationContext> conversationContextBean = (Bean<BoundConversationContext>) manager
                        .resolve(manager.getBeans(BoundConversationContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(conversationContextBean);
View Full Code Here

Examples of org.jboss.weld.context.bound.BoundRequestContext.deactivate()

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager.getBeans(
                        BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
                final BoundRequestContext requestContext = (BoundRequestContext) manager.getReference(requestContextBean,
                        BoundRequestContext.class, ctx);
                requestContext.deactivate();
                requestContext.dissociate(requestContexts.get());

                final Bean<BoundConversationContext> conversationContextBean = (Bean<BoundConversationContext>) manager
                        .resolve(manager.getBeans(BoundConversationContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(conversationContextBean);
View Full Code Here

Examples of org.jboss.weld.context.bound.BoundSessionContext.deactivate()

                final Bean<BoundSessionContext> sessionContextBean = (Bean<BoundSessionContext>) manager.resolve(manager.getBeans(
                        BoundSessionContext.class, BoundLiteral.INSTANCE));
                CreationalContext<?> ctx = manager.createCreationalContext(sessionContextBean);
                final BoundSessionContext sessionContext = (BoundSessionContext) manager.getReference(sessionContextBean,
                        BoundSessionContext.class, ctx);
                sessionContext.deactivate();
                sessionContext.dissociate(sessionContexts.get());

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager.getBeans(
                        BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
View Full Code Here

Examples of org.jboss.weld.context.bound.BoundSessionContext.deactivate()

                final Bean<BoundSessionContext> sessionContextBean = (Bean<BoundSessionContext>) manager.resolve(manager.getBeans(
                        BoundSessionContext.class, BoundLiteral.INSTANCE));
                CreationalContext<?> ctx = manager.createCreationalContext(sessionContextBean);
                final BoundSessionContext sessionContext = (BoundSessionContext) manager.getReference(sessionContextBean,
                        BoundSessionContext.class, ctx);
                sessionContext.deactivate();
                sessionContext.dissociate(sessionContexts.get());

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager.getBeans(
                        BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
View Full Code Here

Examples of org.jboss.weld.context.ejb.EjbRequestContext.deactivate()

                    // An event with qualifier @Initialized(RequestScoped.class) is fired when the request context is initialized
                    getBeanManager().getGlobalLenientObserverNotifier().fireEvent(new Object(), InitializedLiteral.REQUEST);
                    return invocation.proceed();
                } finally {
                    requestContext.invalidate();
                    requestContext.deactivate();
                }
            } finally {
                requestContext.dissociate(invocation);
                // An event with qualifier @Destroyed(RequestScoped.class) when the request context is destroyed
                getBeanManager().getGlobalLenientObserverNotifier().fireEvent(new Object(), DestroyedLiteral.REQUEST);
View Full Code Here

Examples of org.jboss.weld.context.http.HttpRequestContext.deactivate()

   
    m1.persist(entity);
    assertTrue(m1.contains(entity));
   
    weldContext.invalidate();
    weldContext.deactivate();
   
    if (!weldContext.isActive()){
      weldContext.activate();
    }
   
View Full Code Here

Examples of org.jboss.weld.context.http.HttpSessionDestructionContext.deactivate()

    }

    private void deactivateSessionDestructionContext(HttpSession session) {
        HttpSessionDestructionContext context = getSessionDestructionContext();
        if (context.isActive()) {
            context.deactivate();
            context.dissociate(session);
        }
    }

    public void requestInitialized(HttpServletRequest request, ServletContext ctx) {
View Full Code Here

Examples of org.jboss.weld.context.http.LazyHttpConversationContextImpl.deactivate()

            // Only deactivate the context if one is already active, otherwise we get Exceptions
            if (conversationContext instanceof LazyHttpConversationContextImpl) {
                LazyHttpConversationContextImpl lazyConversationContext = (LazyHttpConversationContextImpl) conversationContext;
                if (!lazyConversationContext.isInitialized()) {
                    // if this lazy conversation has not been touched yet, just deactivate it
                    lazyConversationContext.deactivate();
                    return;
                }
            }
            boolean isTransient = conversationContext.getCurrentConversation().isTransient();
            if (ConversationLogger.LOG.isTraceEnabled()) {
View Full Code Here

Examples of org.jvnet.hk2.component.InhabitantActivator.deactivate()

            if (logger.isLoggable(Level.FINER)) {
              logger.log(Level.FINER, "releasing {0} - " + getDescription(true), i);
            }
           
            try{
              ia.deactivate(i);
//              assert(!i.isInstantiated());
              checkInterrupt(null, i, null);
            } catch (Exception e) {
              checkInterrupt(e, i, null);
            }
View Full Code Here

Examples of org.objectweb.celtix.transports.ServerTransport.deactivate()

        assertTrue("Did not read anything " + total, total > 0);
        assertEquals(new String(outBytes), new String(bytes, 0, total));

        outBytes = "Hello World!!!".getBytes();

        server.deactivate();

        try {
            ictx = doClientInvoke(client, octx, outBytes, true);
            len = ictx.getInputStream().read(bytes);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.