Package com.sun.messaging.jmq.io

Examples of com.sun.messaging.jmq.io.SysMessageID


     */
    public void moveMessage( Connection conn, Packet message,
        DestinationUID fromDst, DestinationUID toDst, ConsumerUID[] conUIDs,
        int[] states ) throws IOException, BrokerException {

  SysMessageID sysMsgID = (SysMessageID)message.getSysMessageID().clone();
        String id = sysMsgID.getUniqueName();
        int size = message.getPacketSize();

        boolean myConn = false;
        PreparedStatement pstmt = null;
        String sql = selectForUpdateSQL;
View Full Code Here


            rs = pstmt.executeQuery();

            while ( rs.next() ) {
                ConsumerUID conID = new ConsumerUID( rs.getLong( 1 ) );
                try {
                    SysMessageID msgID = SysMessageID.get( rs.getString( 2 ) );
                    data.add( new TransactionAcknowledgement( msgID, conID, conID ) );
                } catch ( Exception e ) {
                    // fail to parse one object; just log it
                    logger.logStack( Logger.ERROR,
                        BrokerResources.X_PARSE_TXNACK_FAILED, txnUID, e );
View Full Code Here

            while ( rs.next() ) {
                TransactionUID txnUID = new TransactionUID( rs.getLong( 1 ) );
                ConsumerUID conID = new ConsumerUID( rs.getLong( 2 ) );
                try {
                    SysMessageID msgID = SysMessageID.get( rs.getString( 3 ) );

                    List ackList = (List)data.get( txnUID );
                    if ( ackList == null ) {
                        // Create a new list of acks for this txn
                        ackList = new ArrayList(25);
View Full Code Here

    void moveMessage(Packet message, DestinationUID from,
  DestinationUID to, ConsumerUID[] ints, int[] states, boolean sync)
  throws IOException, BrokerException {

  SysMessageID mid = message.getSysMessageID();

  // sanity check
  // get from cache; instantiate=true, load=true, create=false
  DstMsgStore fromdst = getDstMsgStore(from, true, true, false);
  if (fromdst == null || !fromdst.containsMsg(mid)) {
View Full Code Here

           s = new HashSet(destMessages.keySet());
           }
           long removedCount = 0L;
           long indeliveryCount = 0L;
           RemoveMessageReturnInfo ret = null;
           SysMessageID sysid = null;
           Iterator itr = s.iterator();
           while (itr.hasNext()) {
               sysid = (SysMessageID)itr.next();
               ret = _removeMessage(sysid, RemoveReason.PURGED, null, null, true);
               if (ret.removed) {
View Full Code Here

    public static void remoteCheckTakeoverMsgs(Map msgs, String brokerid) throws BrokerException {
        Set destroyConns = new HashSet();
        Iterator msgitr =  msgs.keySet().iterator();
        while (msgitr.hasNext()) {
            SysMessageID sysid = SysMessageID.get((String)msgitr.next());
            PacketReference ref = (PacketReference)Destination.get(sysid);
            if (ref == null) continue;
            Iterator cnitr = ref.getRemoteConsumerUIDs().values().iterator();
            while (cnitr.hasNext()) {
                destroyConns.add(cnitr.next());
View Full Code Here

      if (messageID == null)  {
    throw new BrokerException("Message ID not specified");
      }

      SysMessageID sysMsgID = SysMessageID.get(messageID);
      PacketReference pr = Destination.get(sysMsgID);

      if (pr != null)  {
                d.removeMessage(sysMsgID, RemoveReason.REMOVED_OTHER);
          logger.log(Logger.INFO, "Deleted from destination "
View Full Code Here

    throw new BrokerException("New message body not specified");
      }

      d.load();

      SysMessageID sysMsgID = SysMessageID.get(messageID);
      PacketReference pr = Destination.get(sysMsgID);

      if (pr != null)  {
    /*
     * Need to check if message types match
View Full Code Here

 
  public void readWork(DataInputStream dis) throws IOException,
      BrokerException {
    String dest = dis.readUTF();
    destUID = new DestinationUID(dest);
    sysMessageID = new SysMessageID();
    sysMessageID.readID(dis);
    long cid = dis.readLong();
    consumerID = new ConsumerUID(cid);
  }
View Full Code Here

              TransactionUID txnUID = null;

            if (transactionId != 0)  {
                  txnUID = new TransactionUID(transactionId);
            }
                SysMessageID ids[] = new SysMessageID[1];
                ids[0] = ((Packet)msg).getSysMessageID();
                ConsumerUID cids[] = new ConsumerUID[1];
                cids[0] = conUID;
                Globals.getProtocol().acknowledge(cxn, txnUID, false, AckHandler.ACKNOWLEDGE_REQUEST, null, null, 0, ids, cids);
            }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.io.SysMessageID

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.