Examples of GUID


Examples of org.apache.poi.hssf.record.HyperlinkRecord.GUID

      throw new AssertionFailedError("Identified bug with option URL and UNC set at same time");
    }
  }
 
  public void testGUID() {
    GUID g;
    g = GUID.parse("3F2504E0-4F89-11D3-9A0C-0305E82C3301");
    confirmGUID(g, 0x3F2504E0, 0x4F89, 0x11D3, 0x9A0C0305E82C3301L);
    assertEquals("3F2504E0-4F89-11D3-9A0C-0305E82C3301", g.formatAsString());

    g = GUID.parse("13579BDF-0246-8ACE-0123-456789ABCDEF");
    confirmGUID(g, 0x13579BDF, 0x0246, 0x8ACE, 0x0123456789ABCDEFL);
    assertEquals("13579BDF-0246-8ACE-0123-456789ABCDEF", g.formatAsString());

    byte[] buf = new byte[16];
    g.serialize(new LittleEndianByteArrayOutputStream(buf, 0));
    String expectedDump = "[DF, 9B, 57, 13, 46, 02, CE, 8A, 01, 23, 45, 67, 89, AB, CD, EF]";
    assertEquals(expectedDump, HexDump.toHex(buf));

    // STD Moniker
    g = createFromStreamDump("[D0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9D0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // URL Moniker
    g = createFromStreamDump("[E0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9E0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // File Moniker
    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }
View Full Code Here

Examples of org.eclipse.swt.internal.ole.win32.GUID

  // CHECKSTYLE_OFF
  public int QueryInterface(int riid, int ppvObject) {
    if (riid == 0 || ppvObject == 0) {
      return COM.E_NOINTERFACE;
    }
    GUID guid = new GUID();
    COM.MoveMemory(guid, riid, GUID.sizeof);
    if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
      OS.MoveMemory(ppvObject, new int[]{getAddress()}, 4);
      AddRef();
      return COM.S_OK;
View Full Code Here

Examples of org.jboss.util.id.GUID

                       
            PagingFilteredQueue q;
           
            if (postOffice.isLocal() || !mDest.isClustered())
            {
               q = new PagingFilteredQueue(new GUID().toString(), idm.getID(), ms, pm, true, false,
                        mDest.getMaxSize(), selector,
                        mDest.getFullSize(),
                        mDest.getPageSize(),
                        mDest.getDownCacheSize());
              
               binding = postOffice.bindQueue(topicCond, q);
            }
            else
           
               q = new LocalClusteredQueue((ClusteredPostOffice)postOffice, nodeId, new GUID().toString(),
                                           idm.getID(), ms, pm, true, false,
                                           mDest.getMaxSize(), selector, tr,
                                           mDest.getFullSize(),
                                           mDest.getPageSize(),
                                           mDest.getDownCacheSize());
View Full Code Here

Examples of org.jboss.util.id.GUID

  
   // Constructors --------------------------------------------------
  
   public JBossTemporaryQueue(SessionDelegate delegate)
   {
      super(new GUID().toString());
      this.delegate = delegate;
   }
View Full Code Here

Examples of org.jboss.util.id.GUID

         for (int outerCount = 0; outerCount < iterations; outerCount++)
         {
            MessagingXid xid = null;
            if (commitSize > 0)
            {
               xid = new MessagingXid("bq1".getBytes(), 1, new GUID().toString().getBytes());
               xaResource.start(xid, XAResource.TMNOFLAGS);
            }
            for (int innerCount = 0; innerCount < commitSize; innerCount++)
            {
               Message m = sess.createMessage();
               m.setStringProperty("PROD_NAME", prodName);
               m.setIntProperty("MSG_NUMBER", outerCount * commitSize + innerCount);  
               prod.send(m);
            }
            if (commitSize > 0)
            {
               xaResource.end(xid, XAResource.TMSUCCESS);
               xaResource.prepare(xid);
               xaResource.commit(xid, false);
            }
            if (rollbackSize > 0)
            {
               xid = new MessagingXid("bq1".getBytes(), 1, new GUID().toString().getBytes());
               xaResource.start(xid, XAResource.TMNOFLAGS);
            }
            for (int innerCount = 0; innerCount < rollbackSize; innerCount++)
            {
               Message m = sess.createMessage();
View Full Code Here

Examples of org.jboss.util.id.GUID

  
   // Constructors --------------------------------------------------
  
   public JBossTemporaryTopic(SessionDelegate delegate)
   {
      super(new GUID().toString());
      this.delegate = delegate;
   }
View Full Code Here

Examples of org.jboss.util.id.GUID

      {     
         int iterations = numMessages / commitSize;
        
         MessagingXid xid = null;
        
         xid = new MessagingXid("bq1".getBytes(), 1, new GUID().toString().getBytes());
            xaResource.start(xid, XAResource.TMNOFLAGS);
        
         for (int outerCount = 0; outerCount < iterations; outerCount++)
         {
                                               
            for (int innerCount = 0; innerCount < commitSize; innerCount++)
            {
               Message m = getMessage();
                       
               if (m == null)
               {
                  log.error("Message is null");
                  failed = true;
                  return;
               }
               String prodName = m.getStringProperty("PROD_NAME");
               Integer msgCount = new Integer(m.getIntProperty("MSG_NUMBER"));
              
        //       log.info("got " + prodName + ":" + msgCount);
                    
               Count count = (Count)counts.get(prodName);
               if (count == null)
               {
                  //First time
                  if (msgCount.intValue() != 0)
                  {
                     log.error("First message from " + prodName + " is not 0, it is " + msgCount);
                     failed = true;
                     return;
                  }
                  else
                  {
                     count = new Count();
                     counts.put(prodName, count);
                  }
               }
               else
               {
                  if (count.lastCommitted != msgCount.intValue() - 1)
                  {
                     log.error("Message out of sequence for " + prodName + ", expected " + (count.lastCommitted + 1) + ", actual " + msgCount);
                     failed = true;
                     return;
                  }
               }
               count.lastCommitted = msgCount.intValue();
              
               count.lastReceived = msgCount.intValue();
              
               if (innerCount == commitSize -1)
               {
                  xaResource.end(xid, XAResource.TMSUCCESS);
                  xaResource.prepare(xid);
                  xaResource.commit(xid, false);
                                   
                  //Starting new tx
                  xid = new MessagingXid("bq1".getBytes(), 1, new GUID().toString().getBytes());
                  xaResource.start(xid, XAResource.TMNOFLAGS);
                
               }
              
               processingDone();           
            }           
                       
            if (outerCount == iterations - 1)
            {
               break;
            }
                                      
            for (int innerCount = 0; innerCount < rollbackSize; innerCount++)
            {
               Message m = getMessage();
              
               if (m == null)
               {
                  log.error("Message is null (rollback)");
                  failed = true;
                  return;
               }
               String prodName = m.getStringProperty("PROD_NAME");              
               Integer msgCount = new Integer(m.getIntProperty("MSG_NUMBER"));
              
         //      log.info("got " + prodName + ":" + msgCount);
              
               Count count = (Count)counts.get(prodName);
               if (count == null)
               {
                  // First time
                  if (msgCount.intValue() != 0)
                  {
                     log.error("First message from " + prodName + " is not 0, it is " + msgCount);
                     failed = true;
                     return;
                  }
                  else
                  {
                     count = new Count();
                     count.lastCommitted = -1;
                     counts.put(prodName, count);
                  }                
               }
               else
               {
                  if (count.lastReceived != msgCount.intValue() - 1)
                  {
                     log.error("Message out of sequence");
                     failed = true;
                     return;
                  }
               }
               count.lastReceived = msgCount.intValue();         
              
               if (innerCount == rollbackSize -1)
               {
                  xaResource.end(xid, XAResource.TMSUCCESS);
                  xaResource.prepare(xid);
                  xaResource.rollback(xid);
                 
                  xid = new MessagingXid("bq1".getBytes(), 1, new GUID().toString().getBytes());
                  xaResource.start(xid, XAResource.TMNOFLAGS);
               }
               processingDone();
            }           
         }
View Full Code Here

Examples of org.jboss.util.id.GUID

   public static JMSException handleJMSInvocation(Throwable t, String msg)
   {
      //We create a GUID and log it and send it in the client exception.
      //This allows what is received at the client to be correlated if necessary
      //to what is logged in the server logs
      String id = new GUID().toString();
     
      //First we log the Throwable
      log.error(msg + " [" + id + "]", t);
     
      if (t instanceof JMSException)
View Full Code Here

Examples of org.jboss.util.id.GUID

            // Setting the port prevents the Remoting Client from using PortUtil.findPort(), which
            // creates ServerSockets. The actual value of the port shouldn't matter. To "guarantee"
            // that each InvokerLocator is unique, a GUID is appended to the InvokerLocator.
            if (propertyPort == null)
            {
               String guid = new GUID().toString();
               int hash = guid.hashCode();
              
               // Make sure the hash code is > 0.
               // See http://jira.jboss.org/jira/browse/JBMESSAGING-863.
               while(hash <= 0)
               {
                  if (hash == 0)
                  {
                     guid = new GUID().toString();
                     hash = guid.hashCode();
                  }
                  if (hash < 0)
                  {
                     if (hash == Integer.MIN_VALUE)
View Full Code Here

Examples of org.jboss.util.id.GUID

   }
  
   protected void setDestination(JBossMessage m, int i) throws JMSException
   {
      JBossDestination dest = null;
      String name =  new GUID().toString();
      if (i % 2 == 0)
      {        
         dest = new JBossQueue(name);
      }
      else if (i % 2 == 1)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.