private void sendUpdates()
    {
        ItemInfo itemInfo = null;
        // System.out.println("Updating " + _itemReqTable.size() + " items");
        Iterator<Token> iter = _itemReqTable.keySet().iterator();
        while (iter.hasNext())
        {
            Token rq = (Token)(iter.next());
            itemInfo = (ItemInfo)(_itemReqTable.get(rq));
            if (itemInfo == null)
                continue;

            for (int i = 0; i < _updateRate; i++)
            {
                itemInfo.increment(); // increment the canned data information
                                      // for this item.
                itemInfo.incrementUpdateCount();

                // The size is an estimate. The size MUST be large enough
                // for the entire message.
                // If size is not large enough, RFA will throw out exception
                // related to buffer usage.
                _encoder.initialize(OMMTypes.MSG, 500);
                
                OMMMsg outmsg = _pool.acquireMsg(); // OMMMsg is a poolable object.
                
                // Set the message type to be an update response.
                outmsg.setMsgType(OMMMsg.MsgType.UPDATE_RESP);
                
                // Set the message model to be MARKET_PRICE.
                // (all other item message models are not supported by this application
                outmsg.setMsgModelType(RDMMsgTypes.MARKET_PRICE);
                
                // Set the indication flag for data not to be conflated.
                outmsg.setIndicationFlags(OMMMsg.Indication.DO_NOT_CONFLATE);
                
                // Set the response type to be a quote update.
                outmsg.setRespTypeNum(RDMInstrument.Update.QUOTE);

                // set serviceinfo, if configured
                if( _bSetServiceIDOnUpdates  )
                {
                	_ommattrib.clear();

                	_ommattrib.setServiceID( _bUpdateServiceID );
                	_ommattrib.setName( itemInfo._name );
                	_ommattrib.setNameType( RDMInstrument.NameType.RIC );

                	outmsg.setAttribInfo( _ommattrib );
                }
                else if( _bSetServiceNameOnUpdates == true )
                {
                	outmsg.setAttribInfo(_bUpdateServiceName, itemInfo._name, RDMInstrument.NameType.RIC);
                }
                
                // if configured, set permission expression                
                if( _updateDacsLock != null )
                	outmsg.setPermissionData( _updateDacsLock );
                
                // Since no attribInfo is requested in the updates, don't set
                // attribInfo into the update response message.
                // No OMMAttribInfo in the message defaults to NO_DATA for OMMAttribInfo.
                // There will be data encoded to the update response message
                // (and we know it is FieldList), so
                // use FIELD_List for the data type of the update response message.
                _encoder.encodeMsgInit(outmsg, OMMTypes.NO_DATA, OMMTypes.FIELD_LIST);

                // Initialize the field list encoding.
                // Specifies that this field list has only standard data (data
                // that is not defined in a DataDefinition)
                // DictionaryId is set to 0. This means the data encoded in this
                // message used dictionary identified by id equal to 0.
                // Field list number is set to 1. This identifies the field list
                // (in case for caching in the application or downstream components).
                // Data definition id is set to 0 since standard data does not
                // use data definition.
                // Large data is set to false. This is used since updates in
                // general are not large in size. (If unsure, use true)
                _encoder.encodeFieldListInit(OMMFieldList.HAS_STANDARD_DATA, (short)0, (short)1,
                                             (short)0);

                // TRDPRC_1
                // Initialize the entry with the field id and data type
                // from RDMFieldDictionary for TRDPRC_1.
                _encoder.encodeFieldEntryInit((short)6, OMMTypes.REAL);
                
                double value = itemInfo.getTradePrice1();
                long longValue = Rounding.roundDouble2Long(value, OMMNumeric.EXPONENT_NEG4);
                
                // Encode the real number with the price and the hint value.
                _encoder.encodeReal(longValue, OMMNumeric.EXPONENT_NEG4);
                
                // BID
                // Initialize the entry with the field id and data type
                // from RDMFieldDictionary for BID.
                _encoder.encodeFieldEntryInit((short)22, OMMTypes.REAL);
                
                value = itemInfo.getBid();
                longValue = Rounding.roundDouble2Long(value, OMMNumeric.EXPONENT_NEG4);
                _encoder.encodeReal(longValue, OMMNumeric.EXPONENT_NEG4);
                
                // ASK
                // Initialize the entry with the field id and data type
                // from RDMFieldDictionary for ASK.
                _encoder.encodeFieldEntryInit((short)25, OMMTypes.REAL);
                
                value = itemInfo.getAsk();
                longValue = Rounding.roundDouble2Long(value, OMMNumeric.EXPONENT_NEG4);
                _encoder.encodeReal(longValue, OMMNumeric.EXPONENT_NEG4);
                
                // ACVOL_1
                // Initialize the entry with the field id and data type
                // from RDMFieldDictionary for ACVOL_1.
                _encoder.encodeFieldEntryInit((short)32, OMMTypes.REAL);
                
                _encoder.encodeReal(itemInfo.getACVol1(), OMMNumeric.EXPONENT_0);

                _encoder.encodeAggregateComplete(); // Complete the FieldList.
                
                // Set the update response message into OMMItemCmd.
                _cmd.setMsg((OMMMsg)_encoder.getEncodedObject());
                
                _cmd.setToken(rq); // Set the request token associated with this
                                   // item into the OMMItemCmd.

                // Submit the OMMItemCmd to RFAJ.
                // Note the closure of the submit is null. Any closure set by
                // the application must be long lived memory.
                if (_providerDemo._provider.submit(_cmd, null) == 0)
                {
                    System.err.println("Trying to submit for an item with an inactive handle.");
                    iter.remove();
                    break; // break out the for loop to get next request token
                }
                else
                {
                    System.out.println(itemInfo.updateString());
                }

                _pool.releaseMsg(outmsg);
            }
        }
    }