Package org.oasisopen.sca

Examples of org.oasisopen.sca.ServiceRuntimeException


            ref.setComponent(component);
            return new ServiceReferenceImpl<B>(businessInterface, ref, compositeContext);
        } catch (IllegalArgumentException iae) {
            throw iae;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here


        } catch (IllegalArgumentException iae) {
            throw iae;
        } catch (ServiceRuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e.getMessage(), e);
        }
    }
View Full Code Here

    public void init() {
        Message msgContext = ThreadMessageContext.getMessageContext();
        callbackEPR = selectCallbackEPR(msgContext);
        if (callbackEPR == null) {
            throw new ServiceRuntimeException("No callback binding found for " + msgContext.getTo().toString());
        }
        resolvedEndpoint = msgContext.getFrom().getCallbackEndpoint();
       
        // Capture the Message ID from the message which caused the creation of this CallBackServiceReference
        this.msgID = (String) msgContext.getHeaders().get(Constants.MESSAGE_ID);
View Full Code Here

    private RuntimeEndpointReference selectCallbackEPR(Message msgContext) {
        // look for callback binding with same name as service binding
        Endpoint to = msgContext.getTo();
        if (to == null) {
            //FIXME: need better exception
            throw new ServiceRuntimeException("Destination for forward call is not available");
        }
        for (EndpointReference epr : callbackEPRs) {
            if (epr.getBinding().getName().equals(to.getBinding().getName())) {
                return (RuntimeEndpointReference) epr;
            }
View Full Code Here

                RuntimeEndpointReference epr = (RuntimeEndpointReference)endpointReference.clone();
                epr.setTargetEndpoint(resolvedEndpoint);
                return epr;
            } catch (CloneNotSupportedException e) {
                // will not happen
                throw new ServiceRuntimeException(e);
            }
        } else {
            return null;
        }
    }
View Full Code Here

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if (Object.class == method.getDeclaringClass()) {
            return invokeObjectMethod(method, args);
        }
        if (source == null) {
            throw new ServiceRuntimeException("No runtime source is available");
        }
       
        if (source instanceof RuntimeEndpointReference) {
            RuntimeEndpointReference epr = (RuntimeEndpointReference)source;
            if (epr.isOutOfDate()) {
View Full Code Here

            invokeAsync(proxy, method, args, future, asyncMethod);
        } catch (Exception e) {
            future.setWrappedFault(new AsyncFaultWrapper(e));
        } catch (Throwable t) {
            Exception e =
                new ServiceRuntimeException("Received Throwable: " + t.getClass().getName()
                    + " when invoking: "
                    + asyncMethod.getName(), t);
            future.setWrappedFault(new AsyncFaultWrapper(e));
        } // end try
        return future;
View Full Code Here

                             Method method,
                             Object[] args,
                             AsyncInvocationFutureImpl<?> future,
                             Method asyncMethod) throws Throwable {
        if (source == null) {
            throw new ServiceRuntimeException("No runtime source is available");
        }

        if (source instanceof RuntimeEndpointReference) {
            RuntimeEndpointReference epr = (RuntimeEndpointReference)source;
            if (epr.isOutOfDate()) {
View Full Code Here

  
        // obtain a dedicated wire to be used for this callback invocation
        RuntimeEndpointReference wire = ((CallbackServiceReferenceImpl)callableReference).getCallbackEPR();
        if (wire == null) {
            //FIXME: need better exception
            throw new ServiceRuntimeException("No callback wire found");
        }

        setEndpoint(((CallbackServiceReferenceImpl)callableReference).getResolvedEndpoint());

        InvocationChain chain = getInvocationChain(method, wire);
View Full Code Here

            return providerClassName;
        }
       
        providerClassName = checkMETAINFServicesForSPIClassName(classLoader);
        if (providerClassName == null) {
            throw new ServiceRuntimeException(
              "Failed to find implementation for SCAClientFactory");
        }
       
        return providerClassName;
    }
View Full Code Here

TOP

Related Classes of org.oasisopen.sca.ServiceRuntimeException

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.