Examples of AsyncInvocationId


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

    * @see org.jboss.aop.advice.Interceptor#invoke(org.jboss.aop.joinpoint.Invocation)
    */
   public Object invoke(final Invocation invocation) throws Throwable
   {
      // Get the current invocation ID
      final AsyncInvocationId id = CurrentAsyncInvocation.getCurrentAsyncInvocationId(invocation);

      // Get at the current invocations via the container
      final Advisor advisor = invocation.getAdvisor();
      final EJBContainer ejbContainer = EJBContainer.getEJBContainer(advisor);
      if (ejbContainer instanceof ServiceContainer || ejbContainer instanceof MessagingContainer)
View Full Code Here

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

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

    * @see org.jboss.aop.advice.Interceptor#invoke(org.jboss.aop.joinpoint.Invocation)
    */
   public Object invoke(final Invocation invocation) throws Throwable
   {
      // Get the current invocation ID
      final AsyncInvocationId id = CurrentAsyncAOPInvocation.getCurrentAsyncInvocationId(invocation);

      // Get at the current invocations via the container
      final Advisor advisor = invocation.getAdvisor();
      final EJBContainer ejbContainer = EJBContainer.getEJBContainer(advisor);
      if (ejbContainer instanceof ServiceContainer || ejbContainer instanceof MessagingContainer)
View Full Code Here

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

     
      // Get the Security Context
      final SecurityContext sc = SecurityActions.getSecurityContext();

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

      // Submit as async
      final Future<?> returnValue = es.submit(new AsyncInvocationTask<Object>(session,method,args, sc, id));

      // Return
View Full Code Here

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

    * @see org.jboss.aop.advice.Interceptor#invoke(org.jboss.aop.joinpoint.Invocation)
    */
   public Object invoke(final Invocation invocation) throws Throwable
   {
      // Get the current invocation ID
      final AsyncInvocationId id = CurrentAsyncAOPInvocation.getCurrentAsyncInvocationId(invocation);

      // Get at the current invocations via the container
      final Advisor advisor = invocation.getAdvisor();
      final EJBContainer ejbContainer = EJBContainer.getEJBContainer(advisor);
      if (ejbContainer instanceof ServiceContainer || ejbContainer instanceof MessagingContainer)
View Full Code Here

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

     
      // Get the Security Context
      final SecurityContext sc = SecurityActions.getSecurityContext();

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

      // Submit as async
      final Future<?> returnValue = es.submit(new AsyncInvocationTask<Object>(session,method,args, sc, id));

      // Return
View Full Code Here

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

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

      // 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

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

      // 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

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

   {
      // 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
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.