Examples of MARSHAL


Examples of org.omg.CORBA.MARSHAL

        byte[] data;
        try {
            data = codec.encode_value(a);
        }
        catch (UserException ex) {
            MARSHAL me = new MARSHAL("cannot encode local security descriptor",
                                     0, CompletionStatus.COMPLETED_NO);
            me.initCause(ex);
            throw me;
        }
        return new ServiceContext(SecurityAttributeService.value, data);
    }
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 (MARSHAL)new MARSHAL("Internal server error while marshaling the reply", 0, CompletionStatus.COMPLETED_YES).initCause(e);
                }
            }
            delegate.writeRemoteObject(out, obj);
        } catch (Throwable e) {
            log.error("Received unexpected exception while marshaling an object reference:", e);
            throw (MARSHAL)new MARSHAL("Internal server error while marshaling the reply", 0, CompletionStatus.COMPLETED_YES).initCause(e);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

        DeploymentInfo 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.STATEFUL) {
                    RegistryId id = (RegistryId)((EjbObjectProxyHandler)ejbProxyHandler).getRegistryId();
                    primaryKey = id.getPrimaryKey();
                }
                else 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 (MARSHAL)new MARSHAL("Encountered unknown local invocation handler of type " + proxy.getClass().getSuperclass() + ":" + deploymentId, 0, CompletionStatus.COMPLETED_YES).initCause(e);
        } catch (RemoteException e) {
            log.error("Unable to get primary key from bean from bean of type " + proxy.getClass().getSuperclass() + ":" + deploymentId);
            throw (MARSHAL)new MARSHAL("Unable to get primary key from bean from bean of type " + proxy.getClass().getSuperclass() + ":" + deploymentId, 0, CompletionStatus.COMPLETED_YES).initCause(e);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

            } catch (AccessException e) {
                log.debug("AccessException", e);
                throw (SystemException)new NO_PERMISSION(e.toString()).initCause(e);
            } catch (MarshalException e) {
                log.debug("MarshalException", e);
                throw (SystemException)new MARSHAL(e.toString()).initCause(e);
            } catch (RemoteException e) {
                log.debug("RemoteException", e);
                throw (SystemException)new UnknownException(e).initCause(e);
            } catch (RuntimeException e) {
                log.debug("RuntimeException", e);
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 (MARSHAL)new MARSHAL("Internal server error while marshaling the reply", 0, CompletionStatus.COMPLETED_YES).initCause(e);
                }
            }
            delegate.writeRemoteObject(out, obj);
        } catch (Throwable e) {
            log.error("Received unexpected exception while marshaling an object reference:", e);
            throw (MARSHAL)new MARSHAL("Internal server error while marshaling the reply", 0, CompletionStatus.COMPLETED_YES).initCause(e);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

        BeanContext beanContext = ejbProxyHandler.getBeanContext();
        String deploymentId = (String) beanContext.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 (beanContext.getComponentType() == BeanType.STATEFUL) {
                    RegistryId id = (RegistryId)((EjbObjectProxyHandler)ejbProxyHandler).getRegistryId();
                    primaryKey = id.getPrimaryKey();
                }
                else if (beanContext.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 (MARSHAL)new MARSHAL("Encountered unknown local invocation handler of type " + proxy.getClass().getSuperclass() + ":" + deploymentId, 0, CompletionStatus.COMPLETED_YES).initCause(e);
        } catch (RemoteException e) {
            log.error("Unable to get primary key from bean from bean of type " + proxy.getClass().getSuperclass() + ":" + deploymentId);
            throw (MARSHAL)new MARSHAL("Unable to get primary key from bean from bean of type " + proxy.getClass().getSuperclass() + ":" + deploymentId, 0, CompletionStatus.COMPLETED_YES).initCause(e);
        }
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

                            write_octet ((byte)0x03);
                            break;
                        }
                        default:
                        {
                            throw new MARSHAL ("Invalid SYNC_SCOPE: " + syncScope);
                        }
                    }
                }

                write_octet_array( reserved,0,3 );
                TargetAddressHelper.write( this, addr );
                write_string( operation );
                ServiceContextListHelper.write( this, Messages.service_context );

                markHeaderEnd(); //use padding if GIOP minor == 2

                break;
            }
            default :
            {
                throw new MARSHAL( "Unknown GIOP minor: " + giop_minor );
            }
        }
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

     * @param littleEndian true if the character is to be read low end first
     * @return the wide character.
     */
    public char read_wchar( InputBuffer buffer, int giop_minor, boolean littleEndian )
    {
        throw new MARSHAL( "Bad wide char codeSet: " + getName() );
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

     * @param littleEndian    true if the characters are to be read low end first
     * @return a string possibly containing wide characters.
     */
    public String read_wstring( InputBuffer buffer, int lengthIndicator, int giop_minor, boolean littleEndian )
    {
        throw new MARSHAL( "Bad wide char codeSet: " + getName() );
    }
View Full Code Here

Examples of org.omg.CORBA.MARSHAL

        public char read_wchar( InputBuffer buffer, int giop_minor, boolean littleEndian )
        {
            if (giop_minor < 2)
            {
                throw new MARSHAL( "GIOP 1." + giop_minor +
                                   " only allows 2 Byte encodings for wchar, but the selected TCSW is UTF-8" );
            }

            short value = (short) (0xff & buffer.readByte());
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.