Package org.omg.IOP

Examples of org.omg.IOP.ServiceContext


    private void receiveSFSBVersionNumber(String callName, ClientRequestInfo ri) {
        try {
            if (doesSFSBVersionPolicyExist(ri)) {
                EJBTargetKeyInfo oidInfo = new EJBTargetKeyInfo(ri.effective_target());
                ServiceContext ctx = ri.get_reply_service_context(
                        SFSBVersionConstants.SFSB_VERSION_SERVICE_CONTEXT_ID);
                if (ctx != null) {
                    long version = Utility.bytesToLong(ctx.context_data, 0);
                    SFSBClientVersionManager.setClientVersion(oidInfo.getContainerId(),
                        oidInfo.getInstanceKey(), version);
View Full Code Here


    // implementation of the ServerInterceptor interface.

    public void receive_request_service_contexts(ServerRequestInfo ri)
            throws ForwardRequest {
        try {
            ServiceContext serviceContext =
                ri.get_request_service_context(SFSBVersionConstants.SFSB_VERSION_SERVICE_CONTEXT_ID);
            if (serviceContext != null) {
                byte[] data = serviceContext.context_data;
                long version = Utility.bytesToLong(data, 0);
                SFSBVersionManager.setRequestClientVersion(version);
View Full Code Here

                SFSBVersionManager.getServiceContext();
            if (info != null) {
                long version = SFSBVersionManager.getResponseClientVersion();
                byte[] data = new byte[8];
                Utility.longToBytes(version, data, 0);
                ri.add_reply_service_context(new ServiceContext(
                        SFSBVersionConstants.SFSB_VERSION_SERVICE_CONTEXT_ID, data), false);
                if (_logger.isLoggable(Level.FINE)) {
                    _logger.log(Level.FINE, "SFSBServerReqInterceptor:: "
                            + callName + ": " + version);
                }
View Full Code Here

            ctxData = this.codec.encode_value(any);
        } catch (InvalidTypeForEncoding e) {
            throw new INTERNAL();
        }

        ServiceContext svc = new ServiceContext(TransactionServiceId, ctxData);
        ri.add_request_service_context(svc, false);
    }
View Full Code Here

    public void receive_reply(ClientRequestInfo ri) {

        // check if a tx svc context was received.

        ServiceContext svc = null;
        try {
            svc = ri.get_reply_service_context(TransactionServiceId);
        } catch (BAD_PARAM e) {
            return; // do nothing (no tx service context in reply).
            // REVISIT If a valid tx context was sent, and none was received
View Full Code Here

    public void receive_exception(ClientRequestInfo ri) throws ForwardRequest {

        // check if a tx svc context was received.

        ServiceContext svc = null;
        try {
            svc = ri.get_reply_service_context(TransactionServiceId);
        } catch (BAD_PARAM e) {
            return; // do nothing (no tx service context in reply).
            // REVISIT Exception replies may not carry a tx context back,
View Full Code Here

    public void receive_other(ClientRequestInfo ri) throws ForwardRequest {

        // check if a tx svc context was received.

        ServiceContext svc = null;
        try {
            svc = ri.get_reply_service_context(TransactionServiceId);
        } catch (BAD_PARAM e) {
            return; // do nothing (no tx service context in reply).
            // REVISIT If a valid tx context was sent, and none was received
View Full Code Here

            otsPolicyValue = otsPolicy.value();
        }

        // get the tx contxt, if one was received.

        ServiceContext svc = null;
        try {
            svc = ri.get_request_service_context(TransactionServiceId);
        } catch (BAD_PARAM e) {
            // ignore, svc == null will be handled later.
        }
View Full Code Here

        try {
            ctxData = this.codec.encode_value(any);
        } catch (InvalidTypeForEncoding e) {
            throw new INTERNAL(0, completionStatus);
        }
        ServiceContext svc = new ServiceContext(TransactionServiceId, ctxData);
        ri.add_reply_service_context(svc, false);
    }
View Full Code Here

            if (serverPolicy.getClassloader() != null) Thread.currentThread().setContextClassLoader(serverPolicy.getClassloader());

            if (log.isDebugEnabled()) log.debug("Found server policy");

            ServiceContext serviceContext = ri.get_request_service_context(SecurityAttributeService.value);
            if (serviceContext == null) return;

            if (log.isDebugEnabled()) log.debug("Found service context");

            Any any = Util.getCodec().decode_value(serviceContext.context_data, SASContextBodyHelper.type());
View Full Code Here

TOP

Related Classes of org.omg.IOP.ServiceContext

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.