Package org.omg.CORBA

Examples of org.omg.CORBA.NO_PERMISSION


            }

            if (contextBody.discriminator() == MTContextError.value) {
                // should not happen.
                log.warn("Unexpected ContextError in SAS reply");
                throw new NO_PERMISSION("Unexpected ContextError in SAS reply", MinorCodes.SAS_CSS_FAILURE,
                        CompletionStatus.COMPLETED_YES);
            }
        } catch (BAD_PARAM e) {
            // no service context with sasContextId: do nothing.
        } catch (FormatMismatch e) {
View Full Code Here


            }

            if (contextBody.discriminator() == MTContextError.value) {
                // should not happen.
                log.warn("Unexpected ContextError in SAS reply");
                throw new NO_PERMISSION("Unexpected ContextError in SAS reply", MinorCodes.SAS_CSS_FAILURE,
                        CompletionStatus.COMPLETED_YES);
            }
        } catch (BAD_PARAM e) {
            // no service context with sasContextId: do nothing
        } catch (FormatMismatch e) {
View Full Code Here

            if (contextBody != null) {
                if (contextBody.discriminator() == MTMessageInContext.value) {
                    // should not happen, as stateful context requests are always negotiated down to stateless in this implementation.
                    long contextId = contextBody.in_context_msg().client_context_id;
                    threadLocal.sasReply = createMsgCtxError(contextId, 4 /* major status: no context */);
                    throw new NO_PERMISSION("SAS context does not exist.");
                } else if (contextBody.discriminator() == MTEstablishContext.value) {
                    EstablishContext message = contextBody.establish_msg();
                    threadLocal.contextId = message.client_context_id;
                    threadLocal.sasContextReceived = true;

                    if (message.client_authentication_token != null && message.client_authentication_token.length > 0) {
                        if (traceEnabled) {
                            log.trace("received client authentication token");
                        }
                        InitialContextToken authToken = CSIv2Util.decodeInitialContextToken(
                                message.client_authentication_token, codec);
                        if (authToken == null) {
                            threadLocal.sasReply = createMsgCtxError(message.client_context_id, 2 /* major status: invalid mechanism */);
                            throw new NO_PERMISSION("Could not decode initial context token.");
                        }
                        threadLocal.incomingUsername = authToken.username;
                        threadLocal.incomingPassword = authToken.password;
                        threadLocal.incomingTargetName = CSIv2Util.decodeGssExportedName(authToken.target_name);
                        if (threadLocal.incomingTargetName == null) {
                            threadLocal.sasReply = createMsgCtxError(message.client_context_id, 2 /* major status: invalid mechanism */);
                            throw new NO_PERMISSION("Could not decode target name in initial context token.");
                        }


                        threadLocal.authenticationTokenReceived = true;
                    }
                    if (message.identity_token != null) {
                        if (traceEnabled) {
                            log.trace("received identity token");
                        }
                        threadLocal.incomingIdentity = message.identity_token;
                        if (message.identity_token.discriminator() == ITTPrincipalName.value) {
                            // Extract the RFC2743-encoded name from CDR encapsulation.
                            Any a = codec.decode_value(message.identity_token.principal_name(),
                                    GSS_NT_ExportedNameHelper.type());
                            byte[] encodedName = GSS_NT_ExportedNameHelper.extract(a);

                            // Decode the principal name.
                            threadLocal.incomingPrincipalName = CSIv2Util.decodeGssExportedName(encodedName);

                            if (threadLocal.incomingPrincipalName == null) {
                                threadLocal.sasReply = createMsgCtxError(message.client_context_id, 2 /* major status: invalid mechanism */);
                                throw new NO_PERMISSION("Could not decode incoming principal name.");
                            }
                        }
                    }
                    threadLocal.sasReply = (threadLocal.contextId == 0) ? msgCtx0Accepted :
                            createMsgCtxAccepted(threadLocal.contextId);
View Full Code Here

          + get_uid());
    }

    if (ArjunaTransactionImple._checkedTransactions && !checkAccess())
    {
      throw new NO_PERMISSION(0, CompletionStatus.COMPLETED_NO);
    }

    int outcome = super.status();

    if ((outcome == ActionStatus.RUNNING)
View Full Code Here

          + get_uid());
    }

    if (ArjunaTransactionImple._checkedTransactions && !checkAccess())
    {
      throw new NO_PERMISSION(0, CompletionStatus.COMPLETED_NO);
    }

    int status = super.status();

    if ((status == ActionStatus.RUNNING)
View Full Code Here

            mappedException = new OBJECT_NOT_EXIST(MAPEXCEPTION_CODE,
                CompletionStatus.COMPLETED_MAYBE);
        } else if ( exception instanceof java.rmi.AccessException
            || exception instanceof javax.ejb.AccessLocalException )
        {
            mappedException = new NO_PERMISSION(MAPEXCEPTION_CODE,
                CompletionStatus.COMPLETED_MAYBE);
        } else if ( exception instanceof java.rmi.MarshalException ) {
            mappedException = new MARSHAL(MAPEXCEPTION_CODE,
                CompletionStatus.COMPLETED_MAYBE);
        } else if ( exception instanceof javax.transaction.TransactionRolledbackException
View Full Code Here

TOP

Related Classes of org.omg.CORBA.NO_PERMISSION

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.