/** * Marshals into an output stream an exception thrown by the method. * * @param out a CDR output stream * @param e the exception to be written. */ public void writeException(OutputStream out, Throwable e) { int len = excepWriters.length; for (int i = 0; i < len; i++) { if (excepWriters[i].getExceptionClass().isInstance(e)) { excepWriters[i].write(out, e); return; } } throw new UnknownException(e); }
/** * Marshals into an output stream an exception thrown by the method. * * @param out a CDR output stream * @param e the exception to be written. */ public void writeException(OutputStream out, Throwable e) { int len = excepWriters.length; for (int i = 0; i < len; i++) { if (excepWriters[i].getExceptionClass().isInstance(e)) { excepWriters[i].write(out, e); return; } } throw new UnknownException(e); }
/** * Marshals into an output stream an exception thrown by the method. * * @param out a CDR output stream * @param e the exception to be written. */ public void writeException(OutputStream out, Throwable e) { int len = excepWriters.length; for (int i = 0; i < len; i++) { if (excepWriters[i].getExceptionClass().isInstance(e)) { excepWriters[i].write(out, e); return; } } throw new UnknownException(e); }
public java.io.Serializable writeReplace(java.io.Serializable val) { if (_write_replace_method != null) { try { return (java.io.Serializable) _write_replace_method.invoke(val, NO_ARGS); } catch (java.lang.IllegalAccessException ex) { throw (MARSHAL)new MARSHAL("cannot call " + _write_replace_method).initCause(ex); } catch (IllegalArgumentException ex) { throw (MARSHAL)new MARSHAL(ex.getMessage()).initCause(ex); } catch (InvocationTargetException ex) { throw new org.omg.CORBA.portable.UnknownException(ex .getTargetException()); } } return val; }
public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException { try { org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream) _in; switch (method.length()) { case 43: if (method.equals("executeCommand__org_omg_boxedRMI_seq1_octet")) { return executeCommand__org_omg_boxedRMI_seq1_octet(in, reply); } case 69: if (method.equals("executeCommand__org_eclipse_persistence_sessions_coordination_Command")) { return executeCommand__org_eclipse_persistence_sessions_coordination_Command(in, reply); } } throw new BAD_OPERATION(); } catch (SystemException ex) { throw ex; } catch (Throwable ex) { throw new UnknownException(ex); } }
public java.io.Serializable readResolve(java.io.Serializable val) { if (_read_resolve_method != null) { try { return (java.io.Serializable) _read_resolve_method.invoke(val, NO_ARGS); } catch (java.lang.IllegalAccessException ex) { throw (MARSHAL)new MARSHAL("cannot call " + _read_resolve_method).initCause(ex); } catch (IllegalArgumentException ex) { throw (MARSHAL)new MARSHAL(ex.getMessage()).initCause(ex); } catch (InvocationTargetException ex) { throw new org.omg.CORBA.portable.UnknownException(ex .getTargetException()); } } return val; }
public java.io.Serializable createBlankInstance() { if (_constructor != null) { try { return (java.io.Serializable) _constructor .newInstance(new Object[0]); } catch (java.lang.IllegalAccessException ex) { throw (MARSHAL)new MARSHAL("cannot call " + _constructor).initCause(ex); } catch (IllegalArgumentException ex) { throw (MARSHAL)new MARSHAL(ex.getMessage()).initCause(ex); } catch (InstantiationException ex) { throw (MARSHAL)new MARSHAL(ex.getMessage()).initCause(ex); } catch (InvocationTargetException ex) { throw new org.omg.CORBA.portable.UnknownException(ex .getTargetException()); } catch (NullPointerException ex) { logger.log(Level.WARNING, "unable to create instance of " + getJavaClass().getName(), ex); logger.warning("constructor => " + _constructor); throw ex; } } else { return null; } }
public org.omg.CORBA.portable.OutputStream writeException( org.omg.CORBA.portable.ResponseHandler response, Throwable ex) { for (int i = 0; i < exception_types.length; i++) { if (exception_types[i].getJavaClass().isInstance(ex)) { org.omg.CORBA.portable.OutputStream out = response .createExceptionReply(); org.omg.CORBA_2_3.portable.OutputStream out2 = (org.omg.CORBA_2_3.portable.OutputStream) out; out2 .write_string(exception_types[i] .getExceptionRepositoryID()); out2.write_value((java.io.Serializable) ex); return out; } } logger.log(Level.WARNING, "unhandled exception: " + ex.getMessage(), ex); throw new org.omg.CORBA.portable.UnknownException(ex); }
public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException { try { org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream)_in; if (method.equals("executeCommand")) { Command arg0 = (Command)in.read_value(Command.class); Object result = target.executeCommand(arg0); OutputStream out = reply.createReply(); Util.writeAny(out, result); return out; } throw new BAD_OPERATION(); } catch (SystemException ex) { throw ex; } catch (Throwable ex) { throw new UnknownException(ex); } } }
public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException { try { org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream)_in; if (method.equals("executeCommand")) { Command arg0 = (Command)in.read_value(Command.class); Object result = target.executeCommand(arg0); OutputStream out = reply.createReply(); Util.writeAny(out, result); return out; } throw new BAD_OPERATION(); } catch (SystemException ex) { throw ex; } catch (Throwable ex) { throw new UnknownException(ex); } } }
return os ; } else throw new UnknownException( thr ) ;
protected void writeValue(ObjectWriter writer, java.io.Serializable val) throws java.io.IOException { if (_is_externalizable) { writer.invokeWriteExternal((java.io.Externalizable) val); return; } if (_super_descriptor != null) { _super_descriptor.writeValue(writer, val); } if (_write_object_method != null) { try { writer.invokeWriteObject(this, val, _write_object_method); } catch (IllegalAccessException ex) { throw (MARSHAL)new MARSHAL(ex.getMessage()).initCause(ex); } catch (IllegalArgumentException ex) { throw (MARSHAL)new MARSHAL(ex.getMessage()).initCause(ex); } catch (InvocationTargetException ex) { throw new org.omg.CORBA.portable.UnknownException(ex .getTargetException()); } } else { defaultWriteValue(writer, val); } }
throw new UnknownException(thr);
throw (MARSHAL)new MARSHAL(ex.getMessage()).initCause(ex); } catch (InvocationTargetException ex) { throw new org.omg.CORBA.portable.UnknownException(ex .getTargetException());
logger.throwing(RMIServant.class.getName(), "_invoke", ex .getUndeclaredThrowable()); throw new org.omg.CORBA.portable.UnknownException(ex .getUndeclaredThrowable()); } catch (RuntimeException ex) {
static org.omg.CORBA.SystemException mapRemoteException(RemoteException rex) { if (rex.detail != null && rex.detail instanceof org.omg.CORBA.SystemException) return (org.omg.CORBA.SystemException) rex.detail; if (rex.detail != null && rex.detail instanceof RemoteException) rex = (RemoteException) rex.detail; if (rex instanceof java.rmi.NoSuchObjectException) { throw new org.omg.CORBA.INV_OBJREF(rex.getMessage()); } else if (rex instanceof java.rmi.AccessException) { throw new org.omg.CORBA.NO_PERMISSION(rex.getMessage()); } else if (rex instanceof java.rmi.MarshalException) { throw new org.omg.CORBA.MARSHAL(rex.getMessage()); } else if (rex instanceof javax.transaction.TransactionRequiredException) { throw new org.omg.CORBA.TRANSACTION_REQUIRED(rex.getMessage()); } else if (rex instanceof javax.transaction.TransactionRolledbackException) { throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK(rex.getMessage()); } else if (rex instanceof javax.transaction.InvalidTransactionException) { throw new org.omg.CORBA.INVALID_TRANSACTION(rex.getMessage()); /* * } else if (rex.detail != null) { throw new * org.omg.CORBA.portable.UnknownException (rex.detail); */ } else { throw new org.omg.CORBA.portable.UnknownException(rex); } }
throw ex; } catch (Throwable ex) { throw new UnknownException(ex);
throw ex; } catch ( Throwable ex ) { throw new UnknownException ( ex );
UnknownException ue = new UnknownException(unknown);