Examples of ServiceRuntimeException


Examples of org.osoa.sca.ServiceRuntimeException

            }
            return body;
        } catch (InvocationTargetException e) {
            throw e;
        } catch (Throwable e) {
            throw new ServiceRuntimeException(e);
        } finally {
            try {
                conversationPostInvoke(msg);
            } catch (TargetDestructionException e) {
                throw new ServiceRuntimeException(e);
            } finally {
                ThreadMessageContext.setMessageContext(msgContext);
            }
        }
    }
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

        for (RuntimeWire wire : wires) {
            if (callbackEPR.getURI().equals(wire.getTarget().getURI())) {
                try {
                    return (RuntimeWire)wire.clone();
                } catch (CloneNotSupportedException e) {
                    throw new ServiceRuntimeException(e);
                }
            }
        }

        // no exact match, so find callback binding with same name as service binding
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

        // wire not pre-selected, so select a wire now to be used for the callback
        Message msgContext = ThreadMessageContext.getMessageContext();
        RuntimeWire wire = ((CallbackReferenceImpl)callableReference).selectCallbackWire(msgContext);
        if (wire == null) {
            //FIXME: need better exception
            throw new ServiceRuntimeException("No callback wire found for " + msgContext.getFrom().getURI());
        }

        // set the conversational state based on the interface that
        // is specified for the reference that this wire belongs to
        init(wire);
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

    @Override
    public <B> B getService(Class<B> businessInterface, String serviceName) {
        ServiceReference<B> serviceReference = getServiceReference(businessInterface, serviceName);
        if (serviceReference == null) {
            throw new ServiceRuntimeException("Service not found: " + serviceName);
        }
        return serviceReference.getService();
    }
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

            binding.setURI(targetURI);
            reference.getBindings().add(binding);
            return new ServiceReferenceImpl<B>(businessInterface, component, reference, binding, runtime
                .getProxyFactory(), runtime.getCompositeActivator());
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

                    }
                    break;
                }
            }
            // No matching service is found
            throw new ServiceRuntimeException("Composite service not found: " + name);
        } else {
            componentContext = ((RuntimeComponent)component).getComponentContext();
            if (serviceName != null) {
                return componentContext.createSelfReference(businessInterface, serviceName);
            } else {
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

            System.out.println("Total Value=USD " + value);

            return value * rate;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

            Node rateNode = (Node)exp.evaluate(node, XPathConstants.NODE);
            double rate = Double.valueOf(rateNode.getTextContent().trim());
            System.out.println("Exchange rate: USD 1.0=" + currency + " " + rate);
            return rate;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

    @Override
    public <B> B getService(Class<B> businessInterface, String serviceName) {
        ServiceReference<B> serviceReference = getServiceReference(businessInterface, serviceName);
        if (serviceReference == null) {
            throw new ServiceRuntimeException("Service not found: " + serviceName);
        }
        return serviceReference.getService();
    }
View Full Code Here

Examples of org.osoa.sca.ServiceRuntimeException

            binding.setURI(targetURI);
            reference.getBindings().add(binding);
            return new ServiceReferenceImpl<B>(businessInterface, component, reference, binding, runtime
                .getProxyFactory(), runtime.getCompositeActivator());
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
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.