Package org.jboss.util.id

Examples of org.jboss.util.id.GUID


         String objectStoreDir = System.getProperty("objectstore.dir");
         log.trace("ObjectStoreDir===" + objectStoreDir);

         //We must ensure each node has its own object store

         String newObjectStore = name + new GUID().toString();

         if (objectStoreDir != null)
         {
           //Delete the old one
           //deleteDirectory(new File(objectStoreDir));
          
            newObjectStore = objectStoreDir + "/" + newObjectStore;
         }

         log.info("Setting com.arjuna.ats.arjuna.common.Environment.OBJECTSTORE_DIR to " + newObjectStore);

         System.setProperty(com.arjuna.ats.arjuna.common.Environment.OBJECTSTORE_DIR, newObjectStore);

         //We must also make sure the node identifier is unique for each node
         //Otherwise xids might overlap
         String arjunanodeId = "TestNodeID-" + new GUID().toString();

         log.info("Setting com.arjuna.ats.arjuna.common.Environment.XA_NODE_IDENTIFIER to " + arjunanodeId);

         System.setProperty(com.arjuna.ats.arjuna.common.Environment.XA_NODE_IDENTIFIER, arjunanodeId);
View Full Code Here


   }
  
   protected Transaction createXATx() throws Exception
   {
      MessagingXid xid =
         new MessagingXid(new GUID().toString().getBytes(), 345, new GUID().toString().getBytes());
     
      return tr.createTransaction(xid);
   }
View Full Code Here

         }
        
         switch (k)
         {
            case 0:
               headers.put(new GUID().toString(), randString(1000));
            case 1:
               headers.put(new GUID().toString(), randByte());
            case 2:
               headers.put(new GUID().toString(), randShort());
            case 3:
               headers.put(new GUID().toString(), randInt());
            case 4:
               headers.put(new GUID().toString(), randLong());
            case 5:
               headers.put(new GUID().toString(), randBool());
            case 6:
               headers.put(new GUID().toString(), randFloat());
            case 7:
               headers.put(new GUID().toString(), randDouble());
            case 8:
               headers.put(new GUID().toString(), randLong());
            case 9:
               headers.put(new GUID().toString(), randByteArray(500));
            case 10:
               headers.put(new GUID().toString(), new WibblishObject());              
         }
      }
      return headers;
   }
View Full Code Here

   {
      private static final long serialVersionUID = -822739710811857027L;
      public String wibble;
      public WibblishObject()
      {
         this.wibble = new GUID().toString();
      }
View Full Code Here

      int formatID;
      byte[] globalTxId;
     
      protected MockXid()
      {
         branchQual = new GUID().toString().getBytes();
         formatID = randInt().intValue();
         globalTxId = new GUID().toString().getBytes();
      }
View Full Code Here

            // 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)
View Full Code Here

      Proxy instance = (Proxy) clazz.newInstance();
      instance.instanceAdvisor = advisor;
      instance.mixins = mixins;
      instance.interfaces = interfaces;
      instance.guid = new GUID();

      synchronized (proxyCache)
      {
         proxyCache.put(instance.guid, clazz);
      }
View Full Code Here

   }

   public static GUID generateProxyClass(ClassLoader loader, ProxyMixin[] mixins, Class<?>[] interfaces) throws Exception
   {
      Class<?> clazz = createProxyClass(loader, mixins, interfaces);
      GUID guid = new GUID();

      synchronized (proxyCache)
      {
         proxyCache.put(guid, clazz);
      }
View Full Code Here

*/
public class GUIDGenerator
{
  public static String generateGUID()
  {
    String guid = new GUID().toString();
   
    //We reverse the guid - this is because the JBoss GUID generates strings which are often the same up until
    //the last few characters, this means comparing them can be slow (when they're not equal) since many characters need
    //to be scanned
   
View Full Code Here

            // 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)
View Full Code Here

TOP

Related Classes of org.jboss.util.id.GUID

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.