Also, I don't know of any mechanism for actually getting a GeneratedValue outside of inserting an object via the JPA. So, if the need for the counter is for something besides a key, the counter solution is more generic as well.
Although it should be made clear that the JPA solution, with an increment of 1, is doing exactly the same thing I presented.
[Message sent by forum member 'whartung' (whartung)]
http://forums.java.net/jive/thread.jspa?messageID=252359