Package org.jboss.invocation

Examples of org.jboss.invocation.Invocation


   protected void processInvocation() throws Exception
   {
      handlingResponse = true;
      // Ok, now read invocation and invoke
      Invocation invocation = (Invocation)in.readObject();
      in.readObject(); // for stupid ObjectInputStream reset
      Object response = null;
      try
      {
          // Make absolutely sure thread interrupted is cleared.
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

        {
           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

      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

      // Isn't this a bug in the proxy call??
      if (args == null)
         args = EMPTY_ARGS;

      // Create the invocation object
      Invocation invocation = new Invocation();
     
      // Contextual information for the interceptors
      invocation.setInvocationContext(context);
      invocation.setId(context.getCacheId());
      invocation.setObjectName(context.getObjectName());
      invocation.setMethod(m);
      invocation.setArguments(args);
      invocation.setValue(InvocationKey.INVOKER_PROXY_BINDING,
                          context.getInvokerProxyBinding(),
                          PayloadKey.AS_IS);

      // send the invocation down the client interceptor chain
      Object obj = next.invoke(invocation);
View Full Code Here

    * @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

      ClassLoader callerClassLoader = SecurityActions.getContextClassLoader();
      SecurityActions.setContextClassLoader(container.getClassLoader());
      container.pushENC();
      try
      {
         Invocation inv = new Invocation(timedObjectId.getInstancePk(), method, new Object[]{timer}, null, null, null);
         inv.setValue(InvocationKey.INVOKER_PROXY_BINDING, null, PayloadKey.AS_IS);
         inv.setType(InvocationType.LOCAL);
        
         BeanMetaData bmd = container.getBeanMetaData();
         SecurityIdentityMetaData ejbTimeoutIdentity = bmd.isEntity() ? null : bmd.getEjbTimeoutIdentity();
         if( ejbTimeoutIdentity != null && ejbTimeoutIdentity.getUseCallerIdentity() == false )
         {
View Full Code Here

  public TestInvocation(String serializationType, Object value)
  {
    InvocationContext context = new InvocationContext();
    context.setValue("SERIALIZATION_TYPE",serializationType);
    Invocation invocation = new Invocation();
   
    // Contextual information for the interceptors
    invocation.setInvocationContext(context);
    invocation.setObjectName("This is a test only");
    invocation.setMethod(TestInvocation.class.getMethods()[0]);
    invocation.setArguments(new Object[]{value});
     
    invocation.setValue(InvocationKey.INVOKER_PROXY_BINDING,
                          context.getInvokerProxyBinding(),
                          PayloadKey.AS_IS);
   
    this.invocation = new MarshalledInvocation(invocation);
    key = new Random().nextInt();
View Full Code Here

/*     */             }
/*     */           }
/*     */
/* 282 */           java.lang.Object[] params = op.readParams((org.omg.CORBA_2_3.portable.InputStream)in);
/*     */
/* 284 */           Invocation inv = new Invocation(null, op.getMethod(), params, tx, principal, password);
/*     */
/* 290 */           inv.setValue(InvocationKey.INVOKER_PROXY_BINDING, "iiop", PayloadKey.AS_IS);
/*     */
/* 293 */           inv.setType(InvocationType.HOME);
/* 294 */           retVal = this.mbeanServer.invoke(this.containerName, "invoke", new java.lang.Object[] { inv }, Invocation.INVOKE_SIGNATURE);
/*     */         }
/*     */
/* 299 */         out = (org.omg.CORBA_2_3.portable.OutputStream)handler.createReply();
/*     */
View Full Code Here

/*     */
/* 349 */       if (op == null) {
/* 350 */         throw new BAD_OPERATION(opName);
/*     */       }
/*     */
/* 353 */       Invocation inv = new Invocation(null, op.getMethod(), arguments, tx, null, null);
/*     */
/* 359 */       inv.setValue(InvocationKey.INVOKER_PROXY_BINDING, "iiop", PayloadKey.AS_IS);
/*     */
/* 362 */       inv.setType(InvocationType.HOME);
/* 363 */       java.lang.Object localObject1 = this.mbeanServer.invoke(this.containerName, "invoke", new java.lang.Object[] { inv }, Invocation.INVOKE_SIGNATURE);
/*     */       return localObject1;
/*     */     }
/*     */     catch (MBeanException e)
/*     */     {
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.