Package org.jboss.invocation

Examples of org.jboss.invocation.Invoker


/*  61 */     return createProxy(id, targetName, invoker, jndiName, proxyBindingName, interceptorClasses, loader, ifaces, null);
/*     */   }
/*     */
/*     */   public Object createProxy(Object id, ObjectName targetName, ObjectName invokerName, String jndiName, String proxyBindingName, ArrayList interceptorClasses, ClassLoader loader, Class[] ifaces)
/*     */   {
/*  78 */     Invoker invoker = (Invoker)Registry.lookup(invokerName);
/*  79 */     if (invoker == null)
/*  80 */       throw new RuntimeException("Failed to find invoker for name: " + invokerName);
/*  81 */     return createProxy(id, targetName, invoker, jndiName, proxyBindingName, interceptorClasses, loader, ifaces, null);
/*     */   }
View Full Code Here


      // Create the LoadBalancePolicy instance
      LoadBalancePolicy policy = (LoadBalancePolicy) policyClass.newInstance();

      // Finally, create the invoker proxy, a HttpInvokerProxyHA
      String clusterFamilyName = partitionName + "/" + wrappedJmxInvokerName.toString();
      Invoker delegateInvoker = new HttpInvokerProxyHA(invokerTarget.getReplicants(), invokerTarget.getCurrentViewId (),
                                                       policy, clusterFamilyName);
      return delegateInvoker;
   }
View Full Code Here

         MarshalledInvocation mi = new MarshalledInvocation(invocation);

         // Set the transaction propagation context
         mi.setTransactionPropagationContext(getTransactionPropagationContext());
         mi.setValue("CLUSTER_VIEW_ID", new Long(this.familyClusterInfo.getCurrentViewId ()));
         Invoker target = (Invoker)getRemoteTarget(invocation);
        
         boolean failoverAuthorized = true;
         Exception lastException = null;
         while (target != null && failoverAuthorized)
         {                       
            boolean definitivlyRemoveNodeOnFailure = true;
            try
            {
               if( trace )
                  log.trace("Invoking on target="+target);
               Object rtnObj = target.invoke(mi);
               HARMIResponse rsp = null;
               if (rtnObj instanceof MarshalledObject)
               {
                  rsp = (HARMIResponse)((MarshalledObject)rtnObj).get();
               }
View Full Code Here

      if (target == null)
      {
         throw new IllegalStateException("The targetName("+targetName
            + "), hashCode("+hash+") not found");
      }
      Invoker proxy = new HttpInvokerProxyHA(target.getReplicants(), target.getCurrentViewId (),
                                             policy, proxyFamilyName);
      return proxy;
   }
View Full Code Here

   // 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[] {});
     
      return proxyFamilyName;
   }
View Full Code Here

TOP

Related Classes of org.jboss.invocation.Invoker

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.