Examples of Context


Examples of com.arjuna.mw.wsc11.context.Context

      try
      {
          if (_ctxManager.currentTransaction() != null)
            throw new WrongStateException();

          Context ctx = startTransaction(timeout);

          _ctxManager.resume(new TxContextImple(ctx));
      }
      catch (InvalidCreateParametersException ex)
      {
View Full Code Here

Examples of com.astamuse.asta4d.Context

        }
        readySnippetCount = readySnippetCount - blockedSnippetCount;

        String renderDeclaration;
        Renderer renderer;
        Context context = Context.getCurrentThreadContext();
        Configuration conf = Configuration.getConfiguration();
        final SnippetInvoker invoker = conf.getSnippetInvoker();

        String refId;
        Element renderTarget;
        for (Element element : snippetList) {
            if (!conf.isSkipSnippetExecution()) {
                // for a faked snippet node which is created by template
                // analyzing process, the render target element should be its
                // child.
                if (element.attr(ExtNodeConstants.SNIPPET_NODE_ATTR_TYPE).equals(ExtNodeConstants.SNIPPET_NODE_ATTR_TYPE_FAKE)) {
                    renderTarget = element.children().first();
                } else {
                    renderTarget = element;
                }
                context.setCurrentRenderingElement(renderTarget);
                renderDeclaration = element.attr(ExtNodeConstants.SNIPPET_NODE_ATTR_RENDER);
                refId = element.attr(ExtNodeConstants.ATTR_SNIPPET_REF);
                try {
                    if (element.hasAttr(ExtNodeConstants.SNIPPET_NODE_ATTR_PARALLEL)) {
                        ConcurrentRenderHelper crHelper = ConcurrentRenderHelper.getInstance(context, doc);
                        final Context newContext = context.clone();
                        final String declaration = renderDeclaration;
                        crHelper.submitWithContext(newContext, declaration, refId, new Callable<Renderer>() {
                            @Override
                            public Renderer call() throws Exception {
                                return invoker.invoke(declaration);
View Full Code Here

Examples of com.basho.riak.client.api.commands.datatypes.Context

            @Override
            protected FetchSet.Response convertResponse(DtFetchOperation.Response coreResponse)
            {
                RiakDatatype element = coreResponse.getCrdtElement();
               
                Context context = null;
                if (coreResponse.hasContext())
                {
                    context = new Context(coreResponse.getContext());
                }

                RiakSet datatype = extractDatatype(element);

                return new Response(datatype, context);
View Full Code Here

Examples of com.bazoud.elasticsearch.river.git.beans.Context

                if (closed) {
                    return;
                }

                try {
                    Context context = Context.context()
                        .name(name)
                        .uri(uri)
                        .workingDir(workingDir)
                        .client(client)
                        .indexName(indexName)
View Full Code Here

Examples of com.bea.canvas.Context

*
*/
public class TestCanvas {
 
  public void test1(String templatePath) {
    Context ctx = new Context();
    ctx.put("firstName", "Cedric");
    Company p = new Company();
    p.setName("BEA Systems");
    p.setLocation("San Jose");
    ctx.put("company", p);
    List l = new ArrayList();
    l.add("Cedric");
    l.add("Alois");   
    ctx.put("family", l);

    List l2 = new ArrayList();
    Company p2 = new Company();
    p2.setName("FFT");
    p2.setLocation("Paris");
    l2.add(p);
    l2.add(p2);
    ctx.put("companies", l2);
   
    Map m = new HashMap();
    m.put("Cedric", "San Francisco");
    m.put("Alois", "Paris");
    ctx.put("workplaces", m);

   
    String expected = "My name is Cedric Beust.\n" +
      "Cedric lives in San Francisco\n" +
      "Cameron lives in Boston\n" +
View Full Code Here

Examples of com.canoo.webtest.engine.Context

    /**
     * looks for missing images referenced in the page
     */
    public void doExecute() {
        nullResponseCheck();
        final Context context = getContext();
        final WebClient conversation = context.getWebClient();
        final HtmlPage currentResponse = context.getCurrentHtmlResponse(this);

        context.suspendWindowListener();
        final Collection colFailedImagesSrc = checkImages(conversation, currentResponse);
        context.restoreWindowListener();

        if (!colFailedImagesSrc.isEmpty()) {
          final StepFailedException sfe = new StepFailedException(colFailedImagesSrc.size() + " missing image(s) in page "
              + currentResponse.getWebResponse().getRequestUrl());

View Full Code Here

Examples of com.cloudera.flume.conf.Context

        try {
          List<FlumeNodeSpec> cfgs = FlumeSpecGen.generate(argv[0]);
          // check all cfgs to make sure they are valid
          for (FlumeNodeSpec spec : cfgs) {
            // TODO: first arg should be physical node
            Context ctx = new LogicalNodeContext(spec.node, spec.node);
            FlumeBuilder.buildSource(ctx, spec.src);
            FlumeBuilder.buildSink(ctx, spec.sink);
          }

          // set all cfgs to make sure they are valid.
View Full Code Here

Examples of com.codahale.metrics.Timer.Context

                sendOK( message ) ;
                break ;

            // Stop a timer
            case "stop" :
                Context c = timers.remove( name ) ;
                if( c != null ) {
                    c.stop() ;
                }
                sendOK( message ) ;
                break ;

            // Remove a metric if it exists
View Full Code Here

Examples of com.codingcrayons.aspectfaces.configuration.Context

    AFWeaver.setDefaultCacheProvider(afCache);

    AFWeaver.addStaticConfiguration(getConfig(CONFIG));
    AFWeaver afWeaver = new AFWeaver(CONFIG, new JavaInspector(Administrator.class));

    Context context = new Context(Administrator.class.getName(), null, null, null, false);

    String fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);
    fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);
View Full Code Here

Examples of com.cognifide.slice.api.context.Context

   * Update Context instance for current thread to use current request and response values.
   */
  @Override
  public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
      throws IOException, ServletException {
    final Context previous = contexts.get();

    try {
      final Context context = (new SliceContextFactory()).getServletRequestContext(request, response);
      contexts.set(context);
      chain.doFilter(request, response);
    } finally {
      contexts.set(previous);
    }
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.