Using Groovy to populate sequence value in primary key attribute in ADF 11g
In ADF 11g there is a better and much simpler way to populated primary key attribute of your entity using a db sequence.
You can simply to to your entity pk attribute change the default value type to expression and put
(new oracle.jbo.server.SequenceImpl("YOUR_SEQ_NAME",object.getDBTransaction())).getSequenceNumber()
other ways could be found at http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcentities.htm#BABGHJFG
and

Comments
Here is yet another way: http://forums.oracle.com/forums/messageview.jspa?messageID=3774998
Well, it's not really a way yet, but it's quite an easy task, I believe, to implement, even if its not within the base capability of ADF yet.
John