Examples of MARSHAL


Examples of org.omg.CORBA.MARSHAL

            try {
                id = typecode.id();
            } catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
            }

            throw new MARSHAL("cannot extract " + id + " ("
                    + typecode.kind().value() + ") value from Any");
        }
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

                try {
                    PortableRemoteObject.exportObject((java.rmi.Remote) obj);
                    objref = (javax.rmi.CORBA.Stub) PortableRemoteObject
                            .toStub((java.rmi.Remote) obj);
                } catch (java.rmi.RemoteException ex) {
                    throw new MARSHAL("cannot convert Remote to Object");
                }
            }

        } else {
            throw new MARSHAL(
                    "object is neither Remote nor org.omg.CORBA.Object: "
                            + obj.getClass().getName());
        }

        out.write_Object(objref);
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

                try {
                    PortableRemoteObject.exportObject((Remote) obj);
                    objref = (org.omg.CORBA.Object) PortableRemoteObject
                            .toStub((Remote) obj);
                } catch (RemoteException ex) {
                    throw new MARSHAL("unable to export object");
                }
            }

        }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

            }
        }

        CodeBase codebase = CodeBaseHelper.narrow(runtime);
        if (codebase == null) {
            throw new MARSHAL("cannot locate RunTime CodeBase");
        }

        FullValueDescription fvd = codebase.meta(repid);

        ValueDescriptor super_desc = null;
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

    private ValueDescriptor desc(Class clz, String repid, RunTime runtime) {
        try {
            return (ValueDescriptor) getRepository().getDescriptor(clz, repid,
                    runtime);
        } catch (ClassNotFoundException ex) {
            MARSHAL m = new MARSHAL("class not found " + ex.getMessage());
            m.initCause(ex);
            throw m;
        }
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

        } catch (INV_POLICY e) {
            if (log.isDebugEnabled()) log.debug("INV_POLICY");
            identity = defaultSubject;
        } catch (TypeMismatch tm) {
            log.error("TypeMismatch thrown", tm);
            throw new MARSHAL("TypeMismatch thrown: " + tm);
        } catch (FormatMismatch fm) {
            log.error("FormatMismatch thrown", fm);
            throw new MARSHAL("FormatMismatch thrown: " + fm);
        } catch (SASException e) {
            log.error("SASException", e);
            SASReplyManager.setSASReply(ri.request_id(), generateContextError(e, contextId));
            // rethrowing this requires some special handling.  If the root exception is a
            // RuntimeException, then we can just rethrow it.  Otherwise we need to turn this into
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

            } catch (AccessException e) {
                log.debug("AccessException", e);
                throw new NO_PERMISSION(e.toString());
            } catch (MarshalException e) {
                log.debug("MarshalException", e);
                throw new MARSHAL(e.toString());
            } catch (RemoteException e) {
                log.debug("RemoteException", e);
                e.printStackTrace();
                throw new UnknownException(e);
            } catch (RuntimeException e) {
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

            } catch (AccessException e) {
                log.debug("AccessException", e);
                throw new NO_PERMISSION(e.toString());
            } catch (MarshalException e) {
                log.debug("MarshalException", e);
                throw new MARSHAL(e.toString());
            } catch (RemoteException e) {
                log.debug("RemoteException", e);
                throw new UNKNOWN(e.toString());
            } finally {
                Thread.currentThread().setContextClassLoader(savedCL);
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

                InterfaceType servantType = servant.getInterfaceType();
                String deploymentId = servant.getEjbDeployment().getDeploymentId();
                try {
                    RefGenerator refGenerator = AdapterWrapper.getRefGenerator(deploymentId);
                    if (refGenerator == null) {
                        throw new MARSHAL("Could not find RefGenerator for deployment id: " + deploymentId);
                    }
                    if (InterfaceType.EJB_HOME == servantType) {
                        obj = refGenerator.genHomeReference();
                    } else if (InterfaceType.EJB_OBJECT == servantType) {
                        obj = refGenerator.genObjectReference(servant.getPrimaryKey());
                    } else {
                        log.error("Encountered unknown local invocation handler of type " + servantType + ":" + deploymentId);
                        throw new MARSHAL("Internal server error while marshaling the reply", 0, CompletionStatus.COMPLETED_YES);
                    }
                } catch (CORBAException e) {
                    log.error("Encountered unknown local invocation handler of type " + servantType + ":" + deploymentId);
                    throw new MARSHAL("Internal server error while marshaling the reply", 0, CompletionStatus.COMPLETED_YES);
                }
            }
            delegate.writeRemoteObject(out, obj);
        } catch (Throwable e) {
            log.error("Received unexpected exception while marshaling an object reference:", e);
            throw new MARSHAL("Internal server error while marshaling the reply", 0, CompletionStatus.COMPLETED_YES);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

        CoreDeploymentInfo deploymentInfo = ejbProxyHandler.getDeploymentInfo();
        String deploymentId = (String) deploymentInfo.getDeploymentID();
        try {
            RefGenerator refGenerator = AdapterWrapper.getRefGenerator(deploymentId);
            if (refGenerator == null) {
                throw new MARSHAL("Could not find RefGenerator for deployment id: " +deploymentId);
            }
            if (proxy instanceof EJBHome) {
                return refGenerator.genHomeReference();
            } else if (proxy instanceof EJBObject) {
                Object primaryKey = null;
                if (deploymentInfo.getComponentType() != BeanType.STATELESS) {
                    EJBObject ejbObject = (EJBObject) proxy;
                    primaryKey = ejbObject.getPrimaryKey();
                }
                return refGenerator.genObjectReference(primaryKey);
            } else {
                log.error("Encountered unknown local invocation handler of type " + proxy.getClass().getSuperclass() + ":" + deploymentId);
                throw new MARSHAL("Internal server error while marshaling the reply", 0, CompletionStatus.COMPLETED_YES);
            }
        } catch (CORBAException e) {
            log.error("Encountered unknown local invocation handler of type " + proxy.getClass().getSuperclass() + ":" + deploymentId);
            throw new MARSHAL("Encountered unknown local invocation handler of type " + proxy.getClass().getSuperclass() + ":" + deploymentId, 0, CompletionStatus.COMPLETED_YES);
        } catch (RemoteException e) {
            log.error("Unable to get primary key from bean from bean of type " + proxy.getClass().getSuperclass() + ":" + deploymentId);
            throw new MARSHAL("Unable to get primary key from bean from bean of type " + proxy.getClass().getSuperclass() + ":" + deploymentId, 0, CompletionStatus.COMPLETED_YES);
        }
    }
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.