Examples of ThreadContext


Examples of Rakudo.Runtime.ThreadContext

        CodeObjectUtility.LLCodeTypeObject = (RakudoCodeRef.Instance)settingContext.LexPad.GetByName("NQPCode");

        // Create an execution domain and a thread context for it.
        ExecutionDomain executionDomain  = new ExecutionDomain();
        executionDomain.Setting          = settingContext;
        ThreadContext threadContext      = new ThreadContext();
        threadContext.Domain             = executionDomain;
        threadContext.CurrentContext     = settingContext;
        threadContext.DefaultBoolBoxType = settingContext.LexPad.GetByName("NQPInt");
        threadContext.DefaultIntBoxType  = settingContext.LexPad.GetByName("NQPInt");
        threadContext.DefaultNumBoxType  = settingContext.LexPad.GetByName("NQPNum");
View Full Code Here

Examples of bitronix.tm.internal.ThreadContext

        BitronixTransaction currentTx = getCurrentTransaction();
        if (currentTx != null)
            throw new NotSupportedException("nested transactions not supported");
        currentTx = createTransaction();

        ThreadContext threadContext = ThreadContext.getThreadContext();
        ClearContextSynchronization clearContextSynchronization = new ClearContextSynchronization(currentTx, threadContext);
        try {
            currentTx.getSynchronizationScheduler().add(clearContextSynchronization, Scheduler.ALWAYS_LAST_POSITION -1);
            currentTx.setActive(threadContext.getTimeout());
            inFlightTransactions.put(currentTx, clearContextSynchronization);
            if (log.isDebugEnabled()) { log.debug("begun new transaction at " + new Date(currentTx.getResourceManager().getGtrid().extractTimestamp())); }
        } catch (RuntimeException ex) {
            clearContextSynchronization.afterCompletion(Status.STATUS_NO_TRANSACTION);
            throw ex;
View Full Code Here

Examples of com.sun.jdmk.ThreadContext

               (in particular the password), so this is if'd out for
               now.  */
            if (true)
                response = processPostRequest(request);
            else {
                ThreadContext oldThreadContext =
                    ThreadContext.push("AuthInfo", authInfo);
                try {
                    response = processPostRequest(request);
                } finally {
                    ThreadContext.restore(oldThreadContext);
View Full Code Here

Examples of com.sun.jmx.snmp.ThreadContext

        try {
            // Invoke a getBulk operation
            //
            /* NPCTE fix for bugId 4492741, esc 0, 16-August-2001 */
            final ThreadContext oldContext =
                ThreadContext.push("SnmpUserData",data);
            try {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpSubRequestHandler.class.getName(),
                        "run", "[" + Thread.currentThread() +
View Full Code Here

Examples of dk.brics.jwig.server.ThreadContext

    /**
     * Registers the current response object as dependent on the given object.
     */
    public void addResponseDependency(Object p) {
        Object proxy = getObject(p);
        ThreadContext context = ThreadContext.get();
        //The context may be null data is queried from the database by a thread that does not create a page
        if (context == null) {
            return;
        }
        String requestURL = context.getRequestURL();
        CacheObject c = new CacheObject(requestURL);
        XMLProducer producer = context.getProducer();
        if (producer != null) {
            c.setUrl(producer.getHandlerIdentifier());
            c.setHandler(true);
        }
        addDependency(c, proxy);
View Full Code Here

Examples of org.apache.excalibur.threadcontext.ThreadContext

        m_hierarchy = hierarchy;

        final DefaultThreadContextPolicy policy = new DefaultThreadContextPolicy();
        final HashMap map = new HashMap( 1 );
        map.put( DefaultThreadContextPolicy.CLASSLOADER, m_classLoader );
        m_threadContext = new ThreadContext( policy, map );
    }
View Full Code Here

Examples of org.apache.openejb.core.ThreadContext

        ContextManager.popCallers(null);
        return null;
    }

    public boolean isCallerAuthorized(Method method, InterfaceType typee) {
        ThreadContext threadContext = ThreadContext.getThreadContext();

        try {
            CoreDeploymentInfo deploymentInfo = threadContext.getDeploymentInfo();

            // if security is not enabled we are autorized
            EjbDeployment ejbDeployment = deploymentInfo.get(EjbDeployment.class);
            if (ejbDeployment == null || !ejbDeployment.isSecurityEnabled()) {
                return true;
View Full Code Here

Examples of org.apache.wicket.ThreadContext

   * @param event
   * @param resource
   */
  public void post(Object event, AtmosphereResource resource)
  {
    ThreadContext oldContext = ThreadContext.get(false);
    try
    {
      postToSingleResource(event, resource);
    }
    finally
View Full Code Here

Examples of org.araneaframework.framework.ThreadContext

 
  /**
   * @see org.araneaframework.servlet.PopupWindowContext#open(java.lang.String, org.araneaframework.servlet.support.PopupWindowProperties, org.araneaframework.Message)
   */
  public String open(String id, PopupWindowProperties properties, Message startMessage) throws Exception {
    ThreadContext currentThreadCtx = ((ThreadContext)getEnvironment().getEntry(ThreadContext.class));
   
    // append random suffix for requested service id
    String rndString = RandomStringUtils.random(8, false, true);
    id = (id != null) ? new StringBuffer(id).append(rndString).toString() : rndString;
   
    BeanFactory factory = (BeanFactory) getEnvironment().getEntry(BeanFactory.class);
    // TODO:: some better way in framework?
    Service service = (Service) factory.getBean("servletServiceAdapterComponent");
   
    currentThreadCtx.addService(id, service);
   
    if (startMessage != null)
      startMessage.send(null, service);
   
    //add new, not yet opened popup to popup and popup properties maps
View Full Code Here

Examples of org.araneaframework.framework.ThreadContext

    log.debug("popup with id = '" + id + "' was opened");
    return id;
  }
 
  public void close(String id) throws Exception {
    ThreadContext currentThreadCtx = ((ThreadContext)getEnvironment().getEntry(ThreadContext.class));
   
    if (!popupProperties.containsKey(id) || popupProperties.get(id) == null) {
      //XXX throw some exception - or better not?
      log.warn("Attempt to close non-owned, unopened or already closed popup +'" + id + "'.");
    } else {
      currentThreadCtx.close(id);
      popups.remove(id);
     
      popupProperties.remove(id);
      if (log.isDebugEnabled())
        log.debug("popup with id = '" + id + "' was closed");
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.