Package org.jboss.ejb3.async.spi

Examples of org.jboss.ejb3.async.spi.AsyncInvocationId


   {
      // Obtain the Map of current invocations
      final AsyncInvocationMap map = this.getContainer().getCurrentAsyncInvocations();

      // Get the current invocation in play
      final AsyncInvocationId id = CurrentAsyncInvocation.getCurrentAsyncInvocationId();
     
      // No async invocation in play
      if (id == null)
      {
         return false;
View Full Code Here


      // Mark that we've already been async'd, so when the invocation comes around again we don't infinite loop
      nextInvocation.getMetaData().addMetaData(INVOCATION_METADATA_TAG, INVOCATION_METADATA_ATTR,
            INVOCATION_METADATA_VALUE);

      // Make a new ID for the invocation
      final AsyncInvocationId id = new AsyncInvocationIdUUIDImpl();

      // Make the asynchronous task from the invocation
      final Callable<Object> asyncTask = new AsyncAOPInvocationTask<Object>(nextInvocation, sc, id);

      // Short-circuit the invocation into new Thread
View Full Code Here

      // Mark that we've already been async'd, so when the invocation comes around again we don't infinite loop
      nextInvocation.getMetaData().addMetaData(INVOCATION_METADATA_TAG, INVOCATION_METADATA_ATTR,
            INVOCATION_METADATA_VALUE);

      // Make a new ID for the invocation
      final AsyncInvocationId id = new AsyncInvocationIdUUIDImpl();

      // Make the asynchronous task from the invocation
      final Callable<Object> asyncTask = new AsyncInvocationTask<Object>(nextInvocation, sc, id);

      // Short-circuit the invocation into new Thread
View Full Code Here

   {
      // Precondition checks
      assert invocation != null : "Invocation must be specified";

      // Attempt to get from the Thread (local)
      AsyncInvocationId current = getCurrentAsyncInvocationId();

      // Attempt to get from the invocation
      if (current == null)
      {
         current = (AsyncInvocationId) invocation.getMetaData(AsyncInvocation.METADATA_GROUP_ASYNC,
View Full Code Here

      invocation.getMetaData().addMetaData(AsyncInvocation.METADATA_GROUP_ASYNC, AsyncInvocation.METADATA_KEY_ID, uuid);
   }

   public static AsyncInvocationId unmarkCurrentInvocationFromThread()
   {
      final AsyncInvocationId id = CURRENT_EXECUTING_INVOCATIONS.pop();
      if (log.isTraceEnabled())
      {
         log.trace("Removing current invocation from Thread " + Thread.currentThread() + ":  " + id);
      }
      return id;
View Full Code Here

   }

   public static AsyncInvocationId unmarkCurrentInvocation(final Invocation invocation)
   {
      // Pop off
      final AsyncInvocationId current = unmarkCurrentInvocationFromThread();

      // Remove metadata from the invocation
      invocation.getMetaData().removeMetaData(AsyncInvocation.METADATA_GROUP_ASYNC, AsyncInvocation.METADATA_KEY_ID);

      return current;
View Full Code Here

      // Mark that we've already been async'd, so when the invocation comes around again we don't infinite loop
      nextInvocation.getMetaData().addMetaData(INVOCATION_METADATA_TAG, INVOCATION_METADATA_ATTR,
            INVOCATION_METADATA_VALUE);

      // Make a new ID for the invocation
      final AsyncInvocationId id = new AsyncInvocationIdUUIDImpl();

      // Make the asynchronous task from the invocation
      final Callable<Object> asyncTask = new AsyncAOPInvocationTask<Object>(nextInvocation, sc, id);

      // Short-circuit the invocation into new Thread
View Full Code Here

   {
      // Precondition checks
      assert invocation != null : "Invocation must be specified";

      // Attempt to get from the Thread (local)
      AsyncInvocationId current = CurrentAsyncInvocation.getCurrentAsyncInvocationId();

      // Attempt to get from the invocation
      if (current == null)
      {
         current = (AsyncInvocationId) invocation.getMetaData(AsyncInvocation.METADATA_GROUP_ASYNC,
View Full Code Here

   }

   public static AsyncInvocationId unmarkCurrentInvocation(final Invocation invocation)
   {
      // Pop off
      final AsyncInvocationId current = CurrentAsyncInvocation.unmarkCurrentInvocationFromThread();

      // Remove metadata from the invocation
      invocation.getMetaData().removeMetaData(AsyncInvocation.METADATA_GROUP_ASYNC, AsyncInvocation.METADATA_KEY_ID);

      return current;
View Full Code Here

      // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String name = new Date().toString();
      String applicationClientName = "ee5client_test";
      String args[] = { name };
     
      ClientLauncher launcher = new ClientLauncher();
      Properties env = getENCProps(applicationClientName);
      launcher.launch(mainClassName, applicationClientName, args, env);
     
      Class<?> clientClass = ClientLauncher.getTheMainClass();
      Class<?> empty[] = {};
      {
         Method getResult = clientClass.getDeclaredMethod("getResult", empty);
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.async.spi.AsyncInvocationId

Copyright © 2018 www.massapicom. 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.