Package org.jboss.invocation

Examples of org.jboss.invocation.Invocation


    * @return
    * @throws Throwable
    */
   public Object invoke(InvocationRequest invocationReq) throws Throwable
   {
      Invocation invocation = (Invocation) invocationReq.getParameter();
      Thread currentThread = Thread.currentThread();
      ClassLoader oldCl = currentThread.getContextClassLoader();
      ObjectName mbean = null;
      try
      {
         mbean = (ObjectName) Registry.lookup(invocation.getObjectName());

         // The cl on the thread should be set in another interceptor
         Object obj = getServer().invoke(mbean,
                                         "invoke",
                                         new Object[]{invocation},
View Full Code Here


      }

      @Override
      public Object invoke(InvocationRequest invocationReq) throws Throwable
      {
         Invocation invocation = (Invocation) invocationReq.getParameter();
         InvokerHaFailureType failureType = (InvokerHaFailureType)invocation.getValue("FAILURE_TYPE");
         if (failureType != null)
         {
            failureType.injectFailureIfExistsAfterServer((Integer)invocation.getAsIsValue("FAILOVER_COUNTER"));
         }
        
         log.debug("invoking on " + invocation.getObjectName());
        
         return super.invoke(invocationReq);
      }
View Full Code Here

      }

      @Override
      public Object invoke(Object param, Map metadata) throws Throwable
      {
         Invocation inv = (Invocation) param;
         inv.getTransientPayload().put("TEST_USED_TARGET", this.getInvoker().getLocator());
        
         /* Down the call stack in Remoting's Client.invoke, marshaller is
          * called which via org.jboss.invocation.unified.marshall.InvocationMarshaller
          * sets the transaction progagation context.
          *
 
View Full Code Here

      {
         NoSuchMethodException e = new NoSuchMethodException(actionName);
         throw new ReflectionException(e, actionName);
      }

      Invocation invocation = (Invocation) params[0];
      try
      {
         Object value = invoke(invocation);
         return value;
      }
View Full Code Here

        {
           InvocationRequest remoteInv = (InvocationRequest) dataObject;

           if(remoteInv.getParameter() instanceof Invocation)
           {
              Invocation inv = (Invocation) remoteInv.getParameter();

              MarshalledInvocation marshInv = new MarshalledInvocation(inv);

              if(inv != null)
              {
View Full Code Here

    * @return response of the invocation
    * @throws Throwable
    */
   public Object invoke(InvocationRequest invocationReq) throws Throwable
   {
      Invocation invocation = (Invocation) invocationReq.getParameter();
      Thread currentThread = Thread.currentThread();
      ClassLoader oldCl = currentThread.getContextClassLoader();
      ObjectName mbean = null;
      try
      {
         mbean = (ObjectName) Registry.lookup(invocation.getObjectName());

         /** Clustering **/
         long clientViewId = ((Long) invocation.getValue("CLUSTER_VIEW_ID")).longValue();
         HATarget target = (HATarget) beanMap.get(invocation.getObjectName());
         if(target == null)
         {
            // We could throw IllegalStateException but we have a race condition that could occur:
            // when we undeploy a bean, the cluster takes some time to converge
            // and to recalculate a new viewId and list of replicant for each HATarget.
View Full Code Here

      if (log.isTraceEnabled())
      {
         log.trace("Using legacy invoker method for getEJBObject() invocation.");
      }
      SecurityActions sa = SecurityActions.UTIL.getSecurityActions();        
      Invocation invocation = new Invocation(
            null,
            GET_EJB_OBJECT,
            new Object[]{id},
            //No transaction set up in here? it will get picked up in the proxy
            null,
            // fix for bug 474134 from Luke Taylor
            sa.getPrincipal(),
            sa.getCredential());

      invocation.setObjectName(new Integer(objectName));
      invocation.setValue(InvocationKey.INVOKER_PROXY_BINDING,
         invokerProxyBinding, PayloadKey.AS_IS);

      // It is a home invocation
      invocation.setType(InvocationType.HOME);

      // Create an invocation context for the invocation
      InvocationContext ctx = new InvocationContext();
      invocation.setInvocationContext(ctx);
     
      // Get the invoker to the target server (cluster or node)

      // Ship it
      if (isLocal())
View Full Code Here

      }

      @Override
      public Object invoke(Object param, Map metadata) throws Throwable
      {
         Invocation inv = (Invocation) param;
         inv.getTransientPayload().put("TEST_USED_TARGET", this.getInvoker().getLocator());
        
         /* Down the call stack in Remoting's Client.invoke, marshaller is
          * called which via org.jboss.invocation.unified.marshall.InvocationMarshaller
          * sets the transaction progagation context.
          *
 
View Full Code Here

      public void begin() throws NotSupportedException, SystemException
      {
         try
         {
            Invocation inv = infrastructure.createClientUserTransactionInvocation(null, null, invoker);
            UID uid = (UID) new MockClientUserTransactionStickyInterceptor(invoker).invoke(inv);
            tpcf.setUid(uid);
         }
         catch (Throwable e)
         {
View Full Code Here

   }

   protected void performCalls(int numberPairCalls,
         Transaction tx, Class<? extends LoadBalancePolicy> policyClass) throws Exception
   {
      Invocation inv;
     
      for (int i = 0; i < numberPairCalls; i++)
      {
         /* create invocation to date time teller */
         inv = infrastructure.createDateTimeTellerInvocation(tx, null, timeTellerProxy);
View Full Code Here

TOP

Related Classes of org.jboss.invocation.Invocation

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.