Package org.oasisopen.sca

Examples of org.oasisopen.sca.SCARuntimeException


                List<Endpoint> endpoints = endpointRegistry.findEndpoint(endpointReference);

                // TODO - do we exepect to find more than one endpoint in
                //        anything other than the autowire case?
                if (endpoints.size() == 0) {
                    throw new SCARuntimeException("No endpoints found for EndpointReference " + endpointReference.toString());
                }

                if (endpoints.size() > 1) {
                    throw new SCARuntimeException("More than one endpoint found for EndpointReference" + endpointReference.toString());
                }

                endpointReference.setTargetEndpoint(endpoints.get(0));

                matchForwardBinding(endpointReference, false, monitor);

                matchCallbackBinding(endpointReference, monitor);
            }
        }

        if (endpointReference.isUnresolved()){
            throw new SCARuntimeException("Can't resolve " + endpointReference.toString());
        }
    }
View Full Code Here


                return null;
            } finally {
                closeStream(reader);
            }
        } catch (IOException ex) {
            throw new SCARuntimeException("Failed to discover SCAClientFactory provider", ex);
        } finally {
            closeStream(in);
        }
    }
View Full Code Here

        try {
            final Class<?> providerClass = classLoader.loadClass(factoryImplClassName);
            final Class<? extends SCAClientFactory> providerFactoryClass = providerClass.asSubclass(SCAClientFactory.class);
            return providerFactoryClass;
        } catch (ClassNotFoundException ex) {
            throw new SCARuntimeException("Failed to load SCAClientFactory implementation class " + factoryImplClassName, ex);
        } catch (ClassCastException ex) {
            throw new SCARuntimeException("Loaded SCAClientFactory implementation class " + factoryImplClassName
                + " is not a subclass of "
                + SCAClientFactory.class.getName(), ex);
        }
    }
View Full Code Here

        try {
            final SCAClientFactory provider = factoryImplClass.newInstance();
            return provider;
        } catch (Throwable ex) {
            throw new SCARuntimeException("Failed to instantiate SCAClientFactory implementation class " + factoryImplClass, ex);
        }
    }
View Full Code Here

    private static void closeStream(Closeable closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (IOException ex) {
                throw new SCARuntimeException("Failed to close stream", ex);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.oasisopen.sca.SCARuntimeException

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.