static void rcvCreateProducerSess(CommsByteBuffer request, Conversation conversation,
                                      int requestNumber, boolean allocatedFromBufferPool,
                                      boolean partOfExchange)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "rcvCreateProducerSess",
                        new Object[]
                        {
                         request,
                         conversation,
                         "" + requestNumber,
                         "" + allocatedFromBufferPool,
                         "" + partOfExchange
                        });

        ConversationState convState = (ConversationState) conversation.getAttachment();

        short connectionObjectID = request.getShort(); // BIT16 ConnectionObjectId
        short orderId = request.getShort(); // BIT32 MessageOrderId
        short destinationTypeShort = request.getShort(); // BIT16 DestinationType

        boolean bindToQueuePoint = false; // Default value                                             SIB0113.comms.1 start
        boolean preferLocalQueuePoint = true; // Default value
        final HandshakeProperties handshakeProps = conversation.getHandshakeProperties();
        if (handshakeProps.getFapLevel() >= JFapChannelConstants.FAP_VERSION_9) {
            final short producerFlags = request.getShort();

            if (producerFlags > CommsConstants.PF_MAX_VALID)
            {
                // The flags appear to be invalid
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "Producer flags (" + producerFlags + ") > " + CommsConstants.PF_MAX_VALID);

                SIErrorException e = new SIErrorException(nls.getFormattedMessage("INVALID_PROP_SICO8018", new Object[] { "" + producerFlags }, null));

                FFDCFilter.processException(e, CLASS_NAME + ".rcvCreateProducerSess", CommsConstants.STATICCATPRODUCER_CREATE_03);

                throw e;
            }

            bindToQueuePoint = (producerFlags & CommsConstants.PF_BIND_TO_QUEUE_POINT) != 0;
            preferLocalQueuePoint = (producerFlags & CommsConstants.PF_PREFER_LOCAL_QUEUE_POINT) != 0;
        } //SIB0113.comms.1 end

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        {
            SibTr.debug(tc, "ConnectionObjectID", connectionObjectID);
            SibTr.debug(tc, "MessageOrderId", orderId);
            SibTr.debug(tc, "DestinationType", destinationTypeShort);
            SibTr.debug(tc, "BindToQueuePoint", bindToQueuePoint); //SIB0113.comms.1
            SibTr.debug(tc, "PreferLocalQueuePoint", preferLocalQueuePoint); //SIB0113.comms.1
        }

        /**************************************************************/
        /* Destination Type */
        /**************************************************************/
        DestinationType destType = null;
        if (destinationTypeShort != CommsConstants.NO_DEST_TYPE)
        {
            destType = DestinationType.getDestinationType(destinationTypeShort);
        }

        try
        {
            /**************************************************************/
            /* Destination information */
            /**************************************************************/
            SIDestinationAddress destAddress = request.getSIDestinationAddress(conversation.getHandshakeProperties().getFapLevel());

            /**************************************************************/
            /* Discriminator */
            /**************************************************************/
            String discriminator = request.getString();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "Discriminator:", discriminator);

            /**************************************************************/
            /* Alternate User Id */
            /**************************************************************/
            String alternateUser = request.getString();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "Alternate User Id:", alternateUser);

            SICoreConnection connection =
                            ((CATConnection) convState.getObject(connectionObjectID)).getSICoreConnection();

            OrderingContext siOrder = null;
            if (orderId != CommsConstants.NO_ORDER_CONTEXT)
            {
                siOrder = ((CATOrderingContext) convState.getObject(orderId)).getOrderingContext();
            }

            ProducerSession prodSession = connection.createProducerSession(destAddress,
                                                                           discriminator,
                                                                           destType,
                                                                           siOrder,
                                                                           alternateUser,
                                                                           bindToQueuePoint, //SIB0113.comms.1
                                                                           preferLocalQueuePoint); //SIB0113.comms.1

            short prodSessionObjectID = (short) convState.addObject(prodSession);

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "Producer Session Id:", prodSessionObjectID);

            StaticCATHelper.sendSessionCreateResponse(JFapChannelConstants.SEG_CREATE_PRODUCER_SESS_R,
                                                      requestNumber,
                                                      conversation,
                                                      prodSessionObjectID,
                                                      prodSession,
                                                      destAddress);
        } catch (SINotAuthorizedException e)
        {
            // No FFDC Code Needed
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, e.getMessage(), e);

            StaticCATHelper.sendExceptionToClient(e,
                                                  null,
                                                  conversation, requestNumber);
        } catch (SIException e)
        {
            //No FFDC code needed - processor will have already FFDC'ed any interesting ones....
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, e.getMessage(), e);

            StaticCATHelper.sendExceptionToClient(e,
                                                  CommsConstants.STATICCATPRODUCER_CREATE_01,
                                                  conversation, requestNumber);

        } catch (ConversationStateFullException e)
        {
            SILimitExceededException ex = new SILimitExceededException(nls.getFormattedMessage("MAX_SESSIONS_REACHED_SICO1019", new Object[] { "" + Short.MAX_VALUE }, null));

            FFDCFilter.processException(ex,
                                        CLASS_NAME + ".rcvCreateProducerSess",
                                        CommsConstants.STATICCATPRODUCER_CREATE_02);

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, e.getMessage(), e);

            StaticCATHelper.sendExceptionToClient(e,
                                                  CommsConstants.STATICCATPRODUCER_CREATE_02,
                                                  conversation, requestNumber);

        }

        request.release(allocatedFromBufferPool);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "rcvCreateProducerSess");
    }
static void rcvCreateProducerSess ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvCreateProducerSess" , new Object [ ] { request , conversation , "" + requestNumber , "" + allocatedFromBufferPool , "" + partOfExchange } ) ; ConversationState convState = ( ConversationState ) conversation . getAttachment ( ) ; short connectionObjectID = request . getShort ( ) ; short orderId = request . getShort ( ) ; short destinationTypeShort = request . getShort ( ) ; boolean bindToQueuePoint = false ; boolean preferLocalQueuePoint = true ; final HandshakeProperties handshakeProps = conversation . getHandshakeProperties ( ) ; if ( handshakeProps . getFapLevel ( ) >= JFapChannelConstants . FAP_VERSION_9 ) { final short producerFlags = request . getShort ( ) ; if ( producerFlags > CommsConstants . PF_MAX_VALID ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Producer flags (" + producerFlags + ") > " + CommsConstants . PF_MAX_VALID ) ; SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INVALID_PROP_SICO8018" , new Object [ ] { "" + producerFlags } , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".rcvCreateProducerSess" , CommsConstants . STATICCATPRODUCER_CREATE_03 ) ; throw e ; } bindToQueuePoint = ( producerFlags & CommsConstants . PF_BIND_TO_QUEUE_POINT ) != 0 ; preferLocalQueuePoint = ( producerFlags & CommsConstants . PF_PREFER_LOCAL_QUEUE_POINT ) != 0 ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "ConnectionObjectID" , connectionObjectID ) ; SibTr . debug ( tc , "MessageOrderId" , orderId ) ; SibTr . debug ( tc , "DestinationType" , destinationTypeShort ) ; SibTr . debug ( tc , "BindToQueuePoint" , bindToQueuePoint ) ; SibTr . debug ( tc , "PreferLocalQueuePoint" , preferLocalQueuePoint ) ; } DestinationType destType = null ; if ( destinationTypeShort != CommsConstants . NO_DEST_TYPE ) { destType = DestinationType . getDestinationType ( destinationTypeShort ) ; } try { SIDestinationAddress destAddress = request . getSIDestinationAddress ( conversation . getHandshakeProperties ( ) . getFapLevel ( ) ) ; String discriminator = request . getString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Discriminator:" , discriminator ) ; String alternateUser = request . getString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Alternate User Id:" , alternateUser ) ; SICoreConnection connection = ( ( CATConnection ) convState . getObject ( connectionObjectID ) ) . getSICoreConnection ( ) ; OrderingContext siOrder = null ; if ( orderId != CommsConstants . NO_ORDER_CONTEXT ) { siOrder = ( ( CATOrderingContext ) convState . getObject ( orderId ) ) . getOrderingContext ( ) ; } ProducerSession prodSession = connection . createProducerSession ( destAddress , discriminator , destType , siOrder , alternateUser , bindToQueuePoint , preferLocalQueuePoint ) ; short prodSessionObjectID = ( short ) convState . addObject ( prodSession ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Producer Session Id:" , prodSessionObjectID ) ; StaticCATHelper . sendSessionCreateResponse ( JFapChannelConstants . SEG_CREATE_PRODUCER_SESS_R , requestNumber , conversation , prodSessionObjectID , prodSession , destAddress ) ; } catch ( SINotAuthorizedException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; StaticCATHelper . sendExceptionToClient ( e , null , conversation , requestNumber ) ; } catch ( SIException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; StaticCATHelper . sendExceptionToClient ( e , CommsConstants . STATICCATPRODUCER_CREATE_01 , conversation , requestNumber ) ; } catch ( ConversationStateFullException e ) { SILimitExceededException ex = new SILimitExceededException ( nls . getFormattedMessage ( "MAX_SESSIONS_REACHED_SICO1019" , new Object [ ] { "" + Short . MAX_VALUE } , null ) ) ; FFDCFilter . processException ( ex , CLASS_NAME + ".rcvCreateProducerSess" , CommsConstants . STATICCATPRODUCER_CREATE_02 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; StaticCATHelper . sendExceptionToClient ( e , CommsConstants . STATICCATPRODUCER_CREATE_02 , conversation , requestNumber ) ; } request . release ( allocatedFromBufferPool ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "rcvCreateProducerSess" ) ; }
Create a Synchronous Producer Session, assign the object to the conversation
state, and return the ID to client.

Fields:

BIT16 SIConnectionObjectId
BIT16 MessageOrderContextId
BIT16 DestinationType
BIT16 ProducerFlags

BIT16 Uuid Length
BYTE[] Uuid
BIT16 DestinationNameLength
BYTE[] DestinationName

BIT16 DiscriminatorLength
BYTE[] Discriminator

@param request
@param conversation
@param requestNumber
@param allocatedFromBufferPool
@param partOfExchange