2 package com
.interrupt
.util
;
4 /* Uses RMI's VMID in 'distributed garbage collection' package (java.rmi.dgc.VMID)
5 * to generate Unique IDs accross virtual machines
8 public class IdGenerator
{
10 public static String
generateId() {
12 java
.rmi
.dgc
.VMID iid
= new java
.rmi
.dgc
.VMID();
13 //String id = iid.toString().replaceAll(":", "");
14 return iid
.toString().replaceAll(":", "");