Examples of SkeletonStrategy


Examples of org.jboss.iiop.rmi.marshal.strategy.SkeletonStrategy

/*     */
/* 343 */     ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
/* 344 */     Thread.currentThread().setContextClassLoader(this.containerClassLoader);
/*     */     try
/*     */     {
/* 347 */       SkeletonStrategy op = (SkeletonStrategy)this.methodInvokerMap.get(opName);
/*     */
/* 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);
View Full Code Here

Examples of org.jboss.iiop.rmi.marshal.strategy.SkeletonStrategy

/*     */
/* 221 */     ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
/* 222 */     Thread.currentThread().setContextClassLoader(this.containerClassLoader);
/*     */     try
/*     */     {
/* 225 */       SkeletonStrategy op = (SkeletonStrategy)this.methodInvokerMap.get(opName);
/* 226 */       if (op == null)
/*     */       {
/* 228 */         this.logger.debug("Unable to find opname '" + opName + "' valid operations:" + this.methodInvokerMap.keySet());
/* 229 */         throw new BAD_OPERATION(opName);
/*     */       }
/*     */       java.lang.Object id;
/*     */       try
/*     */       {
/* 235 */         id = ReferenceData.extractObjectId(this.poaCurrent.get_object_id());
/* 236 */         if ((this.traceEnabled) && (id != null)) {
/* 237 */           this.logger.trace("                      id class is " + id.getClass().getName());
/*     */         }
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 242 */         this.logger.error("Error getting EJBObject id", e);
/* 243 */         throw new UnknownException(e);
/*     */       }
/*     */
/* 247 */       ENCFactory.pushContextId(this.containerName);
/*     */       org.omg.CORBA_2_3.portable.OutputStream out;
/*     */       try
/*     */       {
/*     */         java.lang.Object retVal;
/*     */         java.lang.Object retVal;
/* 254 */         if (opName.equals("_get_handle"))
/*     */         {
/* 256 */           EJBObject obj = (EJBObject)PortableRemoteObject.narrow(_this_object(), EJBObject.class);
/*     */
/* 258 */           retVal = new HandleImplIIOP(obj);
/*     */         }
/*     */         else
/*     */         {
/* 262 */           Transaction tx = null;
/* 263 */           if (this.inboundTxCurrent != null)
/* 264 */             tx = this.inboundTxCurrent.getCurrentTransaction();
/* 265 */           SimplePrincipal principal = null;
/* 266 */           char[] password = null;
/* 267 */           if (this.sasCurrent != null)
/*     */           {
/* 269 */             byte[] username = this.sasCurrent.get_incoming_username();
/* 270 */             byte[] credential = this.sasCurrent.get_incoming_password();
/* 271 */             String name = new String(username, "UTF-8");
/* 272 */             int domainIndex = name.indexOf('@');
/* 273 */             if (domainIndex > 0)
/* 274 */               name = name.substring(0, domainIndex);
/* 275 */             if (name.length() == 0)
/*     */             {
/* 277 */               byte[] incomingName = this.sasCurrent.get_incoming_principal_name();
/*     */
/* 279 */               if (incomingName.length > 0)
/*     */               {
/* 281 */                 name = new String(incomingName, "UTF-8");
/* 282 */                 domainIndex = name.indexOf('@');
/* 283 */                 if (domainIndex > 0)
/* 284 */                   name = name.substring(0, domainIndex);
/* 285 */                 principal = new SimplePrincipal(name);
/*     */
/* 288 */                 password = name.toCharArray();
/*     */               }
/*     */             }
/*     */             else
/*     */             {
/* 293 */               principal = new SimplePrincipal(name);
/* 294 */               password = new String(credential, "UTF-8").toCharArray();
/*     */             }
/*     */           }
/*     */
/* 298 */           java.lang.Object[] params = op.readParams((org.omg.CORBA_2_3.portable.InputStream)in);
/*     */
/* 300 */           Invocation inv = new Invocation(id, op.getMethod(), params, tx, principal, password);
/*     */
/* 306 */           inv.setValue(InvocationKey.INVOKER_PROXY_BINDING, "iiop", PayloadKey.AS_IS);
/*     */
/* 309 */           inv.setType(InvocationType.REMOTE);
/* 310 */           retVal = this.mbeanServer.invoke(this.containerName, "invoke", new java.lang.Object[] { inv }, Invocation.INVOKE_SIGNATURE);
/*     */         }
/*     */
/* 316 */         out = (org.omg.CORBA_2_3.portable.OutputStream)handler.createReply();
/*     */
/* 318 */         if (op.isNonVoid())
/*     */         {
/* 320 */           op.writeRetval(out, retVal);
/*     */         }
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 325 */         if (this.traceEnabled)
/*     */         {
/* 327 */           this.logger.trace("Exception in EJBObject invocation", e);
/*     */         }
/* 329 */         if ((e instanceof MBeanException))
/*     */         {
/* 331 */           e = ((MBeanException)e).getTargetException();
/*     */         }
/* 333 */         RmiIdlUtil.rethrowIfCorbaSystemException(e);
/* 334 */         out = (org.omg.CORBA_2_3.portable.OutputStream)handler.createExceptionReply();
/*     */
/* 336 */         op.writeException(out, e);
/*     */       }
/* 338 */       e = out;
/*     */       return e;
/*     */     }
/*     */     finally
View Full Code Here

Examples of org.jboss.iiop.rmi.marshal.strategy.SkeletonStrategy

/*     */
/* 368 */     ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
/* 369 */     Thread.currentThread().setContextClassLoader(this.containerClassLoader);
/*     */     try
/*     */     {
/* 373 */       SkeletonStrategy op = (SkeletonStrategy)this.methodInvokerMap.get(opName);
/* 374 */       if (op == null)
/*     */       {
/* 376 */         throw new BAD_OPERATION(opName);
/*     */       }
/*     */       java.lang.Object id;
/*     */       try
/*     */       {
/* 382 */         id = ReferenceData.extractObjectId(this.poaCurrent.get_object_id());
/* 383 */         if ((this.traceEnabled) && (id != null))
/*     */         {
/* 385 */           this.logger.trace("                      id class is " + id.getClass().getName());
/*     */         }
/*     */
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 391 */         this.logger.error("Error getting EJBObject id", e);
/* 392 */         throw new UnknownException(e);
/*     */       }
/*     */
/* 395 */       Invocation inv = new Invocation(id, op.getMethod(), arguments, tx, null, null);
/*     */
/* 401 */       inv.setValue(InvocationKey.INVOKER_PROXY_BINDING, "iiop", PayloadKey.AS_IS);
/*     */
/* 404 */       inv.setType(InvocationType.REMOTE);
/* 405 */       java.lang.Object localObject1 = this.mbeanServer.invoke(this.containerName, "invoke", new java.lang.Object[] { inv }, Invocation.INVOKE_SIGNATURE);
View Full Code Here

Examples of org.jboss.iiop.rmi.marshal.strategy.SkeletonStrategy

/* 118 */     AttributeAnalysis[] attrs = interfaceAnalysis.getAttributes();
/* 119 */     for (int i = 0; i < attrs.length; i++) {
/* 120 */       OperationAnalysis op = attrs[i].getAccessorAnalysis();
/*     */
/* 122 */       log.debug("    " + op.getJavaName() + ": " + op.getIDLName());
/* 123 */       this.methodMap.put(op.getIDLName(), new SkeletonStrategy(op.getMethod()));
/*     */
/* 125 */       op = attrs[i].getMutatorAnalysis();
/* 126 */       if (op != null) {
/* 127 */         log.debug("    " + op.getJavaName() + ": " + op.getIDLName());
/* 128 */         this.methodMap.put(op.getIDLName(), new SkeletonStrategy(op.getMethod()));
/*     */       }
/*     */
/*     */     }
/*     */
/* 133 */     OperationAnalysis[] ops = interfaceAnalysis.getOperations();
/* 134 */     for (int i = 0; i < ops.length; i++) {
/* 135 */       log.debug("    " + ops[i].getJavaName() + ": " + ops[i].getIDLName());
/* 136 */       this.methodMap.put(ops[i].getIDLName(), new SkeletonStrategy(ops[i].getMethod()));
/*     */     }
/*     */   }
View Full Code Here

Examples of org.jboss.iiop.rmi.marshal.strategy.SkeletonStrategy

/*     */
/*     */   public org.omg.CORBA.portable.OutputStream _invoke(String opName, org.omg.CORBA.portable.InputStream in, ResponseHandler handler) throws SystemException
/*     */   {
/* 161 */     log.trace("invoke: " + opName);
/*     */
/* 163 */     SkeletonStrategy op = (SkeletonStrategy)this.methodMap.get(opName);
/* 164 */     if (op == null)
/*     */     {
/* 166 */       log.debug("Unable to find opname '" + opName + "' valid operations:" + this.methodMap.keySet());
/* 167 */       throw new BAD_OPERATION(opName);
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 173 */       java.lang.Object id = ReferenceData.extractObjectId(this.poaCurrent.get_object_id());
/* 174 */       log.trace("id = " + id);
/*     */
/* 176 */       Transaction tx = null;
/* 177 */       if (this.inboundTxCurrent != null)
/* 178 */         tx = this.inboundTxCurrent.getCurrentTransaction();
/* 179 */       log.trace("tx = " + tx);
/*     */
/* 181 */       if (this.sasCurrent != null)
/*     */       {
/* 183 */         byte[] username = this.sasCurrent.get_incoming_username();
/* 184 */         byte[] credentials = this.sasCurrent.get_incoming_password();
/* 185 */         byte[] principalName = this.sasCurrent.get_incoming_principal_name();
/*     */
/* 187 */         if ((username != null) && (username.length > 0))
/*     */         {
/* 189 */           String name = new String(username, "UTF-8");
/* 190 */           int domainIndex = name.lastIndexOf("@");
/* 191 */           if (domainIndex > 0)
/* 192 */             name = name.substring(0, domainIndex);
/* 193 */           log.debug("username = " + name);
/* 194 */           Principal principal = new SimplePrincipal(name);
/* 195 */           SecurityAssociation.setPrincipal(principal);
/*     */         }
/*     */
/* 198 */         if ((credentials != null) && (credentials.length > 0))
/*     */         {
/* 200 */           SecurityAssociation.setCredential(new String(credentials, "UTF-8").toCharArray());
/*     */         }
/*     */
/* 203 */         if ((principalName != null) && (principalName.length > 0)) {
/* 204 */           log.warn("principalName = " + new String(principalName, "UTF-8"));
/*     */         }
/*     */       }
/* 207 */       java.lang.Object[] args = op.readParams((org.omg.CORBA_2_3.portable.InputStream)in);
/*     */
/* 209 */       java.lang.Object retVal = invoke(tx, id, op.getMethod(), args);
/*     */
/* 211 */       out = (org.omg.CORBA_2_3.portable.OutputStream)handler.createReply();
/* 212 */       if (op.isNonVoid())
/* 213 */         op.writeRetval(out, retVal);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/*     */       org.omg.CORBA_2_3.portable.OutputStream out;
/* 218 */       t.printStackTrace();
/* 219 */       if ((t instanceof Exception))
/*     */       {
/* 221 */         Exception e = (Exception)t;
/* 222 */         RmiIdlUtil.rethrowIfCorbaSystemException(e);
/* 223 */         out = (org.omg.CORBA_2_3.portable.OutputStream)handler.createExceptionReply();
/* 224 */         op.writeException(out, e);
/*     */       }
/*     */       else {
/* 227 */         throw new RuntimeException("NYI");
/*     */       }
/*     */     }
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.