Examples of InvocationContext


Examples of org.infinispan.context.InvocationContext

   }

   @SuppressWarnings("unchecked")
   final V get(Object key, EnumSet<Flag> explicitFlags, ClassLoader explicitClassLoader) {
      assertKeyNotNull(key);
      InvocationContext ctx = getInvocationContextForRead(null, explicitClassLoader, 1);
      GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(key, explicitFlags, false);
      return (V) invoker.invoke(ctx, command);
   }
View Full Code Here

Examples of org.infinispan.context.InvocationContext

   }

   @Override
   public final CacheEntry getCacheEntry(Object key, EnumSet<Flag> explicitFlags, ClassLoader explicitClassLoader) {
      assertKeyNotNull(key);
      InvocationContext ctx = getInvocationContextForRead(null, explicitClassLoader, 1);
      GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(key, explicitFlags, true);
      Object ret = invoker.invoke(ctx, command);
      return (CacheEntry) ret;
   }
View Full Code Here

Examples of org.infinispan.context.InvocationContext

   public final V remove(Object key) {
      return remove(key, null, null);
   }

   final V remove(Object key, EnumSet<Flag> explicitFlags, ClassLoader explicitClassLoader) {
      InvocationContext ctx = getInvocationContextWithImplicitTransaction(false, explicitClassLoader, 1);
      return removeInternal(key, explicitFlags, ctx);
   }
View Full Code Here

Examples of org.infinispan.context.InvocationContext

   public final void clear() {
      clear(null, null);
   }

   final void clear(EnumSet<Flag> explicitFlags, ClassLoader explicitClassLoader) {
      InvocationContext ctx = getInvocationContextWithImplicitTransaction(false, explicitClassLoader, UNBOUNDED);
      clearInternal(explicitFlags, ctx);
   }
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.InvocationContext

                    final Iterator<Interceptor> iterator = interceptors.iterator();

                    if (iterator.hasNext()) {
                        Interceptor interceptor = iterator.next();

                        return interceptor.intercept(new InvocationContext() {

                            @Override
                            public Object invoke() throws Throwable {
                                if (iterator.hasNext()) {
                                    return iterator.next().intercept(this);
View Full Code Here

Examples of org.jboss.cache.InvocationContext

      }
   }

   private void assertInvocationContextInitState(Cache c)
   {
      InvocationContext ctx = c.getInvocationContext();
      InvocationContext control;
      control = ctx.copy();

      control.reset();

      assertEquals("Should be equal", control, ctx);
   }
View Full Code Here

Examples of org.jboss.cache.InvocationContext

      command.initialize(container);
   }

   public void testPerform()
   {
      InvocationContext ctx = new MVCCInvocationContext();
      ctx.putLookedUpNode(testFqn, null);
      assert !((Boolean) command.perform(ctx));

      ctx.putLookedUpNode(testFqn, new NodeSpiMock(testFqn));

      assert Boolean.TRUE == command.perform(ctx);
   }
View Full Code Here

Examples of org.jboss.ejb3.context.spi.InvocationContext

   @Override
   public EnterpriseBeanEffigy getEffigy()
   {
      // you've got to love the compiler
      InvocationContext ctx = ((org.jboss.ejb3.core.context.EJBInvocation) this).getInvocationContext();
      return ((EJBContainer) ctx.getEJBContext().getManager()).getEffigy();
   }
View Full Code Here

Examples of org.jboss.invocation.InvocationContext

  
   // Inner classes -------------------------------------------------
  
   static String getProxyFamilyName(Invocation invocation) throws Exception
   {
      InvocationContext ctx = invocation.invocationContext;
      Invoker invoker = ctx.getInvoker();
     
      // HACK!  Get the proxy family name via reflection. 
      // Works for the known InvokerProxyHA impls
      Method m = invoker.getClass().getDeclaredMethod("getProxyFamilyName", new Class[]{});
      String proxyFamilyName = (String) m.invoke(invoker, new Object[] {});
View Full Code Here

Examples of org.jboss.invocation.InvocationContext

    * @throws Throwable    Any exception or error thrown while processing.
    */
   public Object invoke(Invocation invocation)
      throws Throwable
   {
      InvocationContext ctx = invocation.getInvocationContext();
     
      Method m = invocation.getMethod();
     
      // Implement local methods
      if (m.equals(TO_STRING))
      {
         return toString(ctx);
      }
      else if (m.equals(EQUALS))
      {
         Object[] args = invocation.getArguments();
         String argsString = args[0] != null ? args[0].toString() : "";
         String thisString = toString(ctx);
         return new Boolean(thisString.equals(argsString));
      }
      else if (m.equals(HASH_CODE))
      {
         return new Integer(ctx.getCacheId().hashCode());
      }
      // Implement local EJB calls
      else if (m.equals(GET_HANDLE))
      {
         int objectName = ((Integer) ctx.getObjectName()).intValue();
         String jndiName = (String) ctx.getValue(InvocationKey.JNDI_NAME);
         Invoker invoker = ctx.getInvoker();
         Object id = ctx.getCacheId();
         return createHandle(objectName, jndiName, invoker, id, ctx);
      }
      else if (m.equals(GET_EJB_HOME))
      {
         return getEJBHome(invocation);
      }
      else if (m.equals(GET_PRIMARY_KEY))
      {
         throw new RemoteException("Call to getPrimaryKey not allowed on session bean");
      }
      else if (m.equals(IS_IDENTICAL))
      {
         Object[] args = invocation.getArguments();
         String argsString = args[0].toString();
         String thisString = toString(ctx);
         return new Boolean(thisString.equals(argsString));
      }
      // If not taken care of, go on and call the container
      else
      {
         // It is a remote invocation
         invocation.setType(InvocationType.REMOTE);
        
         // On this entry in cache
         invocation.setId(ctx.getCacheId());
        
         return getNext().invoke(invocation);
      }
   }
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.