Using system time in reverse order to millisecond precision is probably good enough for most applications, if a little wasteful. Why use long if a smaller datatype (e.g. int) will do, especially if you may have hundreds of thousands, or even millions, of them - that's a lot of wasted bytes. Another alternative is to use the sequencing or identity generation capabilities of many RDBMS, though this is not without its problems (through
Java).
Best practice is not simple. You can find an example of a Sequencer class if you download the examples from
O'Reilly's Java Enterprise Best Practices.
Jules