Examples of MarshalledInvocation


Examples of org.exolab.jms.net.connector.MarshalledInvocation

     * @throws MarshalException if the request can't be unmarshalled or the
     *                          response can't be marshalled
     */
    protected MarshalledObject invokeLocal(MarshalledObject request)
            throws MarshalException {
        MarshalledInvocation invocation
                = new MarshalledInvocation(request, _caller);

        _invoker.invoke(invocation);
        MarshalledObject response;
        try {
            response = invocation.getMarshalledResponse();
        } catch (Exception exception) {
            throw new MarshalException("Failed to marshal response",
                                       exception);
        }
        return response;
View Full Code Here

Examples of org.exolab.jms.net.connector.MarshalledInvocation

     * @return the wrapped <code>Response</code>
     * @throws MarshalException if the response can't be marshalled
     */
    protected MarshalledObject invokeLocal(MarshalledObject request)
            throws MarshalException {
        MarshalledInvocation invocation
                = new MarshalledInvocation(request, _caller);
        _invoker.invoke(invocation);

        MarshalledObject response;
        try {
            response = invocation.getMarshalledResponse();
        } catch (Exception exception) {
            throw new MarshalException("Failed to marshal response",
                                       exception);
        }
        return response;
View Full Code Here

Examples of org.jboss.invocation.MarshalledInvocation

   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 Naming method via reflection
      Method method = invocation.getMethod();
      Class methodClass = method.getDeclaringClass();
      Object[] args = invocation.getArguments();
View Full Code Here

Examples of org.jboss.invocation.MarshalledInvocation

   {
      ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
      try
      {
         // Deserialize the transaction if it is there
         MarshalledInvocation mi = (MarshalledInvocation) invocation;
         Object tpc = mi.getTransactionPropagationContext();
         Transaction tx = importTPC(tpc);
         invocation.setTransaction(tx);

         Integer nameHash = (Integer) invocation.getObjectName();
         ObjectName mbean = (ObjectName) Registry.lookup(nameHash);
View Full Code Here

Examples of org.jboss.invocation.MarshalledInvocation

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

Examples of org.jboss.invocation.MarshalledInvocation

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

Examples of org.jboss.invocation.MarshalledInvocation

          * transaction progagation context manually in the mock class.
          *
          * Not ideal, as I try avoiding production code in UTs as much as
          * possible, but makes the mock implementation a lot simpler.
          */
         MarshalledInvocation marshInv = new MarshalledInvocation(inv);
         marshInv.setTransactionPropagationContext(getTransactionPropagationContext());

         MockUnifiedInvokerHA invoker = ((MockInvokerLocator)getInvoker().getLocator()).getInvoker();
        
         return invoker.invoke(new InvocationRequest("", "", marshInv,
               metadata, null, null));
View Full Code Here

Examples of org.jboss.invocation.MarshalledInvocation

      // first invocation to a node or if it is a failovered call
      //
      int failoverCounter = 0;

      // We are going to go through a Remote invocation, switch to a Marshalled Invocation
      MarshalledInvocation mi = new MarshalledInvocation(invocation);        
      mi.setValue("CLUSTER_VIEW_ID", new Long(familyClusterInfo.getCurrentViewId()));
      String target = (String) getRemoteTarget(invocation);
      boolean failoverAuthorized = true;
      URL externalURL = Util.resolveURL(target);
      Exception lastException = null;
      while( externalURL != null && failoverAuthorized)
View Full Code Here

Examples of org.jboss.invocation.MarshalledInvocation

      Boolean returnValueAsAttribute = (Boolean) request.getAttribute("returnValueAsAttribute");
      try
      {
         response.setContentType(RESPONSE_CONTENT_TYPE);
         // See if the request already has the MarshalledInvocation
         MarshalledInvocation mi = (MarshalledInvocation) request.getAttribute("MarshalledInvocation");
         if( mi == null )
         {
            // Get the invocation from the post
            ServletInputStream sis = request.getInputStream();
            ObjectInputStream ois = new ObjectInputStream(sis);
            mi = (MarshalledInvocation) ois.readObject();
            ois.close();
         }
         /* If the invocation carries no auth context, look to to the auth
         context of this servlet as seen in the SecurityAssocation. This allows
         the web app authentication to transparently be used as the call
         authentication.
         */
         if (mi.getPrincipal() == null && mi.getCredential() == null)
         {
            mi.setPrincipal(GetPrincipalAction.getPrincipal());
            mi.setCredential(GetCredentialAction.getCredential());
         }
         Object[] params = {mi};
         String[] sig = {"org.jboss.invocation.Invocation"};
         ObjectName invokerName = localInvokerName;
         // If there is no associated invoker, get the name from the invocation
         if( invokerName == null )
         {
            Integer nameHash = (Integer) mi.getObjectName();
            invokerName = (ObjectName) Registry.lookup(nameHash);
            if( invokerName == null )
               throw new ServletException("Failed to find invoker name for hash("+nameHash+")");
         }
         // Forward the invocation onto the JMX invoker
View Full Code Here

Examples of org.jboss.invocation.MarshalledInvocation

   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 SRPRemoteServer method via reflection
      Method method = invocation.getMethod();
      Object[] args = invocation.getArguments();
      Object value = null;
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.