Package org.jboss.invocation

Examples of org.jboss.invocation.MarshalledInvocation$DeclaredMethodsAction


    */
   public Object invoke(Invocation invocation)
      throws Exception
   {
      // We are going to go through a Remote invocation, switch to a Marshalled Invocation
      MarshalledInvocation mi = new MarshalledInvocation(invocation);

      // Set the transaction propagation context
      //  @todo: MOVE TO TRANSACTION
      mi.setTransactionPropagationContext(getTransactionPropagationContext());

      // RMI seems to make a connection per invocation.
      // If too many clients are making an invocation
      // at same time, ConnectionExceptions happen
      for (int i = 0; i < MAX_RETRIES; i++)
View Full Code Here


   public Object invoke(Invocation invocation) throws Exception
   {
      // Set the method hash to Method mapping
      if (invocation instanceof MarshalledInvocation)
      {
         MarshalledInvocation mi = (MarshalledInvocation) invocation;
         mi.setMethodMap(marshalledInvocationMapping);
      }
      // Invoke the method via reflection
      Method method = invocation.getMethod();
      Object[] args = invocation.getArguments();
      Object value = null;
View Full Code Here

     
    invocation.setValue(InvocationKey.INVOKER_PROXY_BINDING,
                          context.getInvokerProxyBinding(),
                          PayloadKey.AS_IS);
   
    this.invocation = new MarshalledInvocation(invocation);
    key = new Random().nextInt();
  }
View Full Code Here

/*     */   public Object invoke(Invocation invocation)
/*     */     throws Exception
/*     */   {
/*  88 */     if ((invocation instanceof MarshalledInvocation))
/*     */     {
/*  90 */       MarshalledInvocation mi = (MarshalledInvocation)invocation;
/*  91 */       mi.setMethodMap(this.marshalledInvocationMapping);
/*     */     }
/*     */
/*  94 */     Method method = invocation.getMethod();
/*  95 */     Object[] args = invocation.getArguments();
/*  96 */     Object value = null;
View Full Code Here

/*     */   }
/*     */
/*     */   public Object invoke(Invocation invocation)
/*     */     throws Exception
/*     */   {
/* 120 */     MarshalledInvocation mi = new MarshalledInvocation(invocation);
/*     */
/* 124 */     mi.setTransactionPropagationContext(getTransactionPropagationContext());
/*     */
/* 129 */     for (int i = 0; i < MAX_RETRIES; i++)
/*     */     {
/*     */       try
/*     */       {
View Full Code Here

/*     */   }
/*     */
/*     */   public Object invoke(Invocation invocation)
/*     */     throws Exception
/*     */   {
/* 112 */     MarshalledInvocation mi = new MarshalledInvocation(invocation);
/*     */
/* 114 */     if (this.externalURL == null)
/* 115 */       this.externalURL = Util.resolveURL(this.externalURLValue);
/*     */     try
/*     */     {
View Full Code Here

/*     */   {
/* 405 */     ClassLoader oldCl = JRMPInvoker.TCLAction.UTIL.getContextClassLoader();
/* 406 */     ObjectName mbean = null;
/*     */     try
/*     */     {
/* 410 */       MarshalledInvocation mi = (MarshalledInvocation)invocation;
/* 411 */       invocation.setTransaction(importTPC(mi.getTransactionPropagationContext()));
/*     */
/* 413 */       mbean = (ObjectName)Registry.lookup(invocation.getObjectName());
/*     */
/* 416 */       Object obj = this.serverAction.invoke(mbean, "invoke", new Object[] { invocation }, Invocation.INVOKE_SIGNATURE);
/*     */
View Full Code Here

/*     */     throws Exception
/*     */   {
/* 139 */     ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
/*     */     try
/*     */     {
/* 143 */       MarshalledInvocation mi = (MarshalledInvocation)invocation;
/* 144 */       Object tpc = mi.getTransactionPropagationContext();
/* 145 */       Transaction tx = importTPC(tpc);
/* 146 */       invocation.setTransaction(tx);
/*     */
/* 148 */       Integer nameHash = (Integer)invocation.getObjectName();
/* 149 */       ObjectName mbean = (ObjectName)Registry.lookup(nameHash);
View Full Code Here

/* 55 */       InvocationRequest remoteInv = (InvocationRequest)ret;
/* 56 */       Object param = remoteInv.getParameter();
/*    */
/* 58 */       if ((param instanceof MarshalledInvocation))
/*    */       {
/* 60 */         MarshalledInvocation mi = (MarshalledInvocation)param;
/* 61 */         Object txCxt = mi.getTransactionPropagationContext();
/* 62 */         if (txCxt != null)
/*    */         {
/* 64 */           TransactionPropagationContextImporter tpcImporter = TransactionPropagationContextUtil.getTPCImporter();
/* 65 */           mi.setTransaction(tpcImporter.importTransactionPropagationContext(txCxt));
/*    */         }
/*    */       }
/*    */     }
/*    */
/* 70 */     return ret;
View Full Code Here

/*     */
/*  72 */       if ((remoteInv.getParameter() instanceof Invocation))
/*     */       {
/*  74 */         Invocation inv = (Invocation)remoteInv.getParameter();
/*     */
/*  76 */         MarshalledInvocation marshInv = new MarshalledInvocation(inv);
/*     */
/*  78 */         if (inv != null)
/*     */         {
/*     */           try
/*     */           {
/*  86 */             marshInv.setTransactionPropagationContext(getTransactionPropagationContext());
/*     */           }
/*     */           catch (SystemException e)
/*     */           {
/*  90 */             log.error("Error setting transaction propagation context.", e);
/*  91 */             throw new IOException("Error setting transaction context.  Message: " + e.getMessage());
View Full Code Here

TOP

Related Classes of org.jboss.invocation.MarshalledInvocation$DeclaredMethodsAction

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.