Package com.sun.xml.ws.api.tx.at

Examples of com.sun.xml.ws.api.tx.at.TransactionalFeature


        final Collection<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
        if (endpointKey == null || policyMap == null) {
            return features;
        }

        TransactionalFeature endpointFeature = getAtFeature(policyMap.getEndpointEffectivePolicy(endpointKey), false);
        if (endpointFeature != null) {
            features.add(endpointFeature);
        }

        for (PolicyMapKey key : policyMap.getAllOperationScopeKeys()) {
            if (!endpointKey.equals(key)) {
                continue;
            }

            final TransactionalFeature feature = getAtFeature(policyMap.getOperationEffectivePolicy(key), true);
            if (feature == null || !feature.isEnabled()) {
                continue;
            }

            if (endpointFeature == null) {
                endpointFeature = feature;
                features.add(endpointFeature);
            } else if (endpointFeature.getVersion() != feature.getVersion()) {
                throw LOGGER.logSevereException(new WebServiceException(LocalizationMessages.WSAT_1004_ENDPOINT_AND_OPERATION_POLICIES_DONT_MATCH(endpointKey, key)));
            }

            endpointFeature.setExplicitMode(true);
            String opName = key.getOperation().getLocalPart();
            feature.setFlowType(opName, feature.getFlowType());
            feature.setEnabled(opName, true);
        }

        return features;
    }
View Full Code Here


    private TransactionalFeature getAtFeature(final Policy policy, final boolean setExplictMode) throws WebServiceException, PolicyException {
        if (policy == null) {
            return null;
        }

        TransactionalFeature resultFeature = null;
        for (AssertionSet alternative : policy) {
            TransactionalFeature feature = getAtFeature(alternative, setExplictMode);
            if (feature == null) {
                continue;
            }
            if (resultFeature == null) {
                resultFeature = feature;
View Full Code Here

        return resultFeature;
    }

    private TransactionalFeature getAtFeature(final AssertionSet alternative, final boolean setExplicitMode) throws PolicyException {
        TransactionalFeature feature = null;
        for (PolicyAssertion assertion : alternative) {
            if (assertion instanceof AtAssertion) {
                if (feature != null) {
                    throw LOGGER.logSevereException(new WebServiceException(LocalizationMessages.WSAT_1001_DUPLICATE_ASSERTION_IN_POLICY(alternative.toString())));
                }

                feature = new TransactionalFeature(true);
                feature.setExplicitMode(setExplicitMode);
                WsatNamespace version = WsatNamespace.forNamespaceUri(assertion.getName().getNamespaceURI());

                feature.setVersion(Transactional.Version.forNamespaceVersion(version));
                feature.setFlowType(assertion.isOptional() ? TransactionFlowType.SUPPORTS : TransactionFlowType.MANDATORY);
            }
        } // next assertion

        return feature;
    }
View Full Code Here

     *
     * @param context wsit client tubeline assembler context
     * @return new tail of the client-side tubeline
     */
    public Tube createTube(ClientTubelineAssemblyContext context) {
        final TransactionalFeature feature = context.getBinding().getFeature(TransactionalFeature.class);
        if (isWSATPolicyEnabled(context.getPolicyMap(), context.getWsdlPort(), false)
                || (feature != null && feature.isEnabled())) { //todo add the case where policy is enabled but annotation is NEVER
            WSATGatewayRM.create();
            return new WSATClientTube(context.getTubelineHead(), context, feature);
        } else {
            return context.getTubelineHead();
        }
View Full Code Here

     *
     * @param context wsit service tubeline assembler context
     * @return new head of the service-side tubeline
     */
    public Tube createTube(ServerTubelineAssemblyContext context) {
        final TransactionalFeature feature = context.getEndpoint().getBinding().getFeature(TransactionalFeature.class);
        if (isWSATPolicyEnabled(context.getPolicyMap(), context.getWsdlPort(), true)
                || (feature != null && feature.isEnabled())) { //todo add the case where policy is enabled but annotation is NEVER
            WSATGatewayRM.create();
            return new WSATServerTube(context.getTubelineHead(), context, feature);
        } else {
            return context.getTubelineHead();
        }
View Full Code Here

    private static final Logger LOGGER = Logger.getLogger(WSATTubeHelper.class);

    public static TransactionalAttribute getTransactionalAttribute(TransactionalFeature feature, Packet packet, WSDLPort port) {
        if (feature == null) {
            feature =
                    new TransactionalFeature(true, Transactional.TransactionFlowType.SUPPORTS, Transactional.Version.DEFAULT);
        }
        //a dynamic service client can be created without a wsdl.
        if (port == null) {
            boolean isEnabled = feature.isEnabled() && Transactional.TransactionFlowType.NEVER != feature.getFlowType();
            boolean isRequired = Transactional.TransactionFlowType.MANDATORY == feature.getFlowType();
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.api.tx.at.TransactionalFeature

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.