Package org.apache.tuscany.sca.host.corba

Examples of org.apache.tuscany.sca.host.corba.CorbaHostException


    }

    private void handleException(Exception e) throws CorbaHostException {
        // The cause of the Exception is JDK specific
        if (e instanceof NotFound) {
            throw new CorbaHostException(CorbaHostException.NO_SUCH_OBJECT, e);
        } else if (e instanceof InvalidName) {
            throw new CorbaHostException(e);
        } else {
            throw new CorbaHostException(e);
        }
    }
View Full Code Here


                new NameComponent(details.getNamePath().get(details.getNamePath().size() - 1), "");
            try {
                namingCtx.resolve(new NameComponent[] {finalName});
                // no exception means that some object is already registered
                // under this name, we need to crash here
                throw new CorbaHostException(CorbaHostException.BINDING_IN_USE);
            } catch (NotFound e) {
                namingCtx.bind(new NameComponent[] {finalName}, servantObject);
                registerURI(uri);
            }
        } catch (CorbaHostException e) {
View Full Code Here

        } catch (Exception e) {
            // e.printStackTrace();
            handleException(e);
        }
        if (result == null) {
            throw new CorbaHostException(CorbaHostException.NO_SUCH_OBJECT);
        }
        return result;
    }
View Full Code Here

    }

    private void handleException(Exception e) throws CorbaHostException {
        // The cause of the Exception is JDK specific
        if (e instanceof NotFound) {
            throw new CorbaHostException(CorbaHostException.NO_SUCH_OBJECT, e);
        } else if (e instanceof InvalidName) {
            throw new CorbaHostException(e);
        } else {
            throw new CorbaHostException(e);
        }
    }
View Full Code Here

                new NameComponent(details.getNamePath().get(details.getNamePath().size() - 1), "");
            try {
                namingCtx.resolve(new NameComponent[] {finalName});
                // no exception means that some object is already registered
                // under this name, we need to crash here
                throw new CorbaHostException(CorbaHostException.BINDING_IN_USE);
            } catch (NotFound e) {
                namingCtx.bind(new NameComponent[] {finalName}, servantObject);
            }
        } catch (CorbaHostException e) {
            throw e;
View Full Code Here

            result = context.resolve_str(url.getName());
        } catch (Exception e) {
            handleException(e);
        }
        if (result == null) {
            throw new CorbaHostException(CorbaHostException.NO_SUCH_OBJECT);
        }
        return result;
    }
View Full Code Here

    }

    private void handleException(Exception e) throws CorbaHostException {
        // The cause of the Exception is JDK specific
        if (e instanceof NotFound) {
            throw new CorbaHostException(CorbaHostException.NO_SUCH_OBJECT, e);
        } else if (e instanceof InvalidName) {
            throw new CorbaHostException(e);
        } else {
            throw new CorbaHostException(e);
        }
    }
View Full Code Here

                new NameComponent(details.getNamePath().get(details.getNamePath().size() - 1), "");
            try {
                namingCtx.resolve(new NameComponent[] {finalName});
                // no exception means that some object is already registered
                // under this name, we need to crash here
                throw new CorbaHostException(CorbaHostException.BINDING_IN_USE);
            } catch (NotFound e) {
                namingCtx.bind(new NameComponent[] {finalName}, servantObject);
                registerURI(uri);
            }
        } catch (CorbaHostException e) {
View Full Code Here

        } catch (Exception e) {
            // e.printStackTrace();
            handleException(e);
        }
        if (result == null) {
            throw new CorbaHostException(CorbaHostException.NO_SUCH_OBJECT);
        }
        return result;
    }
View Full Code Here

        Context ctx;
        try {
            ctx = new InitialContext();
            orb = (ORB)PortableRemoteObject.narrow(ctx.lookup(ORB_NAME), org.omg.CORBA.ORB.class);
        } catch (Exception e) {
            throw new CorbaHostException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.host.corba.CorbaHostException

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.